bt747.j2se_view
Class GpsFileProxyTemplate

java.lang.Object
  extended by bt747.j2se_view.GpsFileProxyTemplate
All Implemented Interfaces:
GPSFileConverterInterface, GPSFileConfInterface, GPSFileInterface
Direct Known Subclasses:
ExternalToolConvert

public class GpsFileProxyTemplate
extends java.lang.Object
implements GPSFileInterface

Pure template to gpsFile class

Author:
Mario De Weerd

Constructor Summary
GpsFileProxyTemplate(GPSFileInterface gpsFile)
           
 
Method Summary
 void addLogRecord(GPSRecord r)
           
 void finaliseFile()
           
 BT747HashSet getFilesCreated()
           
 int getNbrFilesCreated()
           
 GPSConversionParameters getParamObject()
           
 void initialiseFile(BT747Path baseName, java.lang.String extension, int fileSeparationFreq)
          This function has to be called at some time to initialize the file conversion.
 boolean needPassToFindFieldsActivatedInLog()
           
 boolean nextPass()
           
 void setActiveFileFields(GPSRecord activeFileFieldsFormat)
          Called to set the fields that are active in the current input.
 void setAddLogConditionInfo(boolean addLogConditionInfo)
           
 void setBadTrackColor(java.lang.String badTrackColor)
           
 void setFilenameBuilder(BT747FileName filenameBuilder)
           
 void setFilters(GPSFilter[] ourFilters)
          Set the track point and way point filters.
 void setGoodTrackColor(java.lang.String goodTrackColor)
           
 void setImperial(boolean useImperial)
          Indicate whether Imperial units (miles, knots, mph) should be used.
 void setIncludeTrkComment(boolean isTrkComment)
           
 void setIncludeTrkName(boolean isIncludeTrkName)
           
 void setMaxDiff(int maxDiff)
           
 void setOutputFields(GPSRecord selectedOutputFields)
          Set the fields that should be written to the output.
 void setOverridePreviousTag(boolean overridePreviousTag)
           
 void setParamObject(GPSConversionParameters paramObject)
           
 void setRecordNbrInLogs(boolean recordNbrInLogs)
           
 void setTimeOffset(int offset)
          The time offset to apply to the output records in seconds.
 void setTrackSepTime(int time)
          Set the track separation time.
 void setUserWayPointList(GPSRecord[] list)
          Entry must be an ordered list (UTC time).
 void setWayPointTimeCorrection(int seconds)
           
 void writeLogFmtHeader(GPSRecord f)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GpsFileProxyTemplate

public GpsFileProxyTemplate(GPSFileInterface gpsFile)
Method Detail

addLogRecord

public final void addLogRecord(GPSRecord r)
Specified by:
addLogRecord in interface GPSFileConverterInterface

finaliseFile

public final void finaliseFile()
Specified by:
finaliseFile in interface GPSFileConverterInterface

getNbrFilesCreated

public final int getNbrFilesCreated()
Specified by:
getNbrFilesCreated in interface GPSFileConverterInterface

getFilesCreated

public final BT747HashSet getFilesCreated()
Specified by:
getFilesCreated in interface GPSFileConverterInterface

needPassToFindFieldsActivatedInLog

public final boolean needPassToFindFieldsActivatedInLog()
Specified by:
needPassToFindFieldsActivatedInLog in interface GPSFileConverterInterface

nextPass

public boolean nextPass()
Specified by:
nextPass in interface GPSFileConverterInterface

setActiveFileFields

public final void setActiveFileFields(GPSRecord activeFileFieldsFormat)
Description copied from interface: GPSFileConfInterface
Called to set the fields that are active in the current input. This is set by the internal algorithm that analyses the input file.

Specified by:
setActiveFileFields in interface GPSFileConverterInterface
Specified by:
setActiveFileFields in interface GPSFileConfInterface

writeLogFmtHeader

public final void writeLogFmtHeader(GPSRecord f)
Specified by:
writeLogFmtHeader in interface GPSFileConverterInterface

getParamObject

public final GPSConversionParameters getParamObject()
Specified by:
getParamObject in interface GPSFileConfInterface

initialiseFile

public void initialiseFile(BT747Path baseName,
                           java.lang.String extension,
                           int fileSeparationFreq)
Description copied from interface: GPSFileConfInterface
This function has to be called at some time to initialize the file conversion. Other parameters can be set through other methods.

Specified by:
initialiseFile in interface GPSFileConfInterface
Parameters:
baseName - Base name of the output file. This value will be provided to the filename builder.
extension - Extension of the output file. This value will be provided to the filename builder.
fileSeparationFreq - Indicates how the file must be separated.
See Also:
AppSettings.SPLIT_ONE_FILE, AppSettings.SPLIT_ONE_FILE_PER_DAY, AppSettings.SPLIT_ONE_FILE_PER_TRACK

setAddLogConditionInfo

public final void setAddLogConditionInfo(boolean addLogConditionInfo)
Specified by:
setAddLogConditionInfo in interface GPSFileConfInterface

setBadTrackColor

public final void setBadTrackColor(java.lang.String badTrackColor)
Specified by:
setBadTrackColor in interface GPSFileConfInterface
Parameters:
badTrackColor - The badTrackColor to set.

setFilenameBuilder

public void setFilenameBuilder(BT747FileName filenameBuilder)
Specified by:
setFilenameBuilder in interface GPSFileConfInterface

setFilters

public void setFilters(GPSFilter[] ourFilters)
Description copied from interface: GPSFileConfInterface
Set the track point and way point filters. To be called from the application.

Specified by:
setFilters in interface GPSFileConfInterface
Parameters:
ourFilters - Track point and way point filters.

setGoodTrackColor

public void setGoodTrackColor(java.lang.String goodTrackColor)
Specified by:
setGoodTrackColor in interface GPSFileConfInterface
Parameters:
goodTrackColor - The goodTrackColor to set.

setImperial

public void setImperial(boolean useImperial)
Description copied from interface: GPSFileConfInterface
Indicate whether Imperial units (miles, knots, mph) should be used.

Specified by:
setImperial in interface GPSFileConfInterface
Parameters:
useImperial - when true, use imperial units.

setIncludeTrkComment

public void setIncludeTrkComment(boolean isTrkComment)
Specified by:
setIncludeTrkComment in interface GPSFileConfInterface

setIncludeTrkName

public void setIncludeTrkName(boolean isIncludeTrkName)
Specified by:
setIncludeTrkName in interface GPSFileConfInterface

setMaxDiff

public void setMaxDiff(int maxDiff)
Specified by:
setMaxDiff in interface GPSFileConfInterface
Parameters:
maxDiff - the maxDiff to set

setOutputFields

public void setOutputFields(GPSRecord selectedOutputFields)
Description copied from interface: GPSFileConfInterface
Set the fields that should be written to the output. This can be a superset of the active file fields, but only the fields that are both active and selected for output will be available in the output files. This is to be configured from the application.

Specified by:
setOutputFields in interface GPSFileConfInterface

setOverridePreviousTag

public void setOverridePreviousTag(boolean overridePreviousTag)
Specified by:
setOverridePreviousTag in interface GPSFileConfInterface
Parameters:
overridePreviousTag - the overridePreviousTag to set

setParamObject

public void setParamObject(GPSConversionParameters paramObject)
Specified by:
setParamObject in interface GPSFileConfInterface

setRecordNbrInLogs

public void setRecordNbrInLogs(boolean recordNbrInLogs)
Specified by:
setRecordNbrInLogs in interface GPSFileConfInterface
Parameters:
recordNbrInLogs - The recordNbrInLogs to set.

setTimeOffset

public void setTimeOffset(int offset)
Description copied from interface: GPSFileConfInterface
The time offset to apply to the output records in seconds.

Specified by:
setTimeOffset in interface GPSFileConfInterface
Parameters:
offset - The time offset in seconds.

setTrackSepTime

public void setTrackSepTime(int time)
Description copied from interface: GPSFileConfInterface
Set the track separation time.

Specified by:
setTrackSepTime in interface GPSFileConfInterface
Parameters:
time - Seconds of unavailable positions require before deciding to hava a new track.

setUserWayPointList

public void setUserWayPointList(GPSRecord[] list)
Description copied from interface: GPSFileConfInterface
Entry must be an ordered list (UTC time).

Specified by:
setUserWayPointList in interface GPSFileConfInterface

setWayPointTimeCorrection

public void setWayPointTimeCorrection(int seconds)
Specified by:
setWayPointTimeCorrection in interface GPSFileConfInterface