Class TLcdDAFIFTRefuelingTrackDecoder
- All Implemented Interfaces:
ILcdInputStreamFactoryCapable
,ILcdModelDecoder
ILcdModelDecoder
that decodes DAFIFT refueling track or anchor
objects from the specified source directory. The decoded models have as model descriptor an
instance of TLcdDAFIFRefuelingTrackModelListDescriptor
.
The model list resulting from the decode
method will contain submodels for
- refueling track (or anchor) airspaces,
- the refueling tracks themselves (connected list of refueling track points)
The objects in decoded models are based on the AIS domain objects available in com.luciad.ais.model
,
which all implement ILcdDataObject
. This interface provides a generic and
format-independent way of accessing the type and properties (features) of a domain object.
For this handler, the types of the decoded objects are TLcdDAFIFTDataTypes.RefuelingAirspace
,
and TLcdDAFIFTDataTypes.RefuelingTrack
, which can also be retrieved through
ILcdDataObject.getDataType()
.
The available properties of the objects are defined in TLcdDAFIFTRefuelingAirspaceDataProperties
,
and TLcdDAFIFTRefuelingTrackDataProperties
.
The values for these properties can be retrieved through ILcdDataObject.getValue(com.luciad.datamodel.TLcdDataProperty)
.
Next to ILcdDataObject
, the objects in decoded models also implement ILcdFeatured
,
the former interface to access the properties (features) of a domain object.
This is still fully supported, and explained in the following comments.
The setAirspaceFeaturesToBeDecoded
and setTrackFeaturesToBeDecoded
methods allow the user to specify
which DAFIFT features are to be decoded into the featured model objects. If no features are
specified, all features will be decoded.
- IDENTIFIER:
ILcdDAFIFRefuelingAirspaceFeature.IDENTIFIER
,ILcdDAFIFRefuelingTrackFeature.IDENTIFIER
- DIRECTION:
ILcdDAFIFRefuelingAirspaceFeature.DIRECTION
,ILcdDAFIFRefuelingTrackFeature.DIRECTION
- ICAO CODE:
ILcdDAFIFRefuelingTrackFeature.ICAO_CODE
- TYPE:
ILcdDAFIFRefuelingTrackFeature.TYPE
- COUNTRY CODE:
ILcdDAFIFRefuelingTrackFeature.COUNTRY_CODE
- PRIMARY UHF FREQUENCY:
ILcdDAFIFRefuelingTrackFeature.PRIMARY_UHF_FREQUENCY
,ILcdDAFIFRefuelingTrackFeature.PRIMARY_UHF_FREQUENCY_UNIT
- BACK-UP UHF FREQUENCY:
ILcdDAFIFRefuelingTrackFeature.BACK_UP_UHF_FREQUENCY
,ILcdDAFIFRefuelingTrackFeature.BACK_UP_UHF_FREQUENCY_UNIT
- APN 69/134/135 SETTING:
ILcdDAFIFRefuelingTrackFeature.APN_SETTING
- APX 78 ENCODE/DECODE:
ILcdDAFIFRefuelingTrackFeature.APX_ENCODE_DECODE
- RECEIVER/TANKER CHANNEL:
ILcdDAFIFRefuelingTrackFeature.RECEIVER_CHANNEL
,ILcdDAFIFRefuelingTrackFeature.TANKER_CHANNEL
- ALTITUDE 1 DESCRIPTION:
ILcdDAFIFRefuelingTrackFeature.ALTITUDE_1_DESCRIPTION
- REFUELING 1 ALTITUDE 1:
ILcdDAFIFRefuelingTrackFeature.REFUELING_1_ALTITUDE_1
,ILcdDAFIFRefuelingTrackFeature.ALTITUDE_UNIT
- REFUELING 1 ALTITUDE 2:
ILcdDAFIFRefuelingTrackFeature.REFUELING_1_ALTITUDE_2
,ILcdDAFIFRefuelingTrackFeature.ALTITUDE_UNIT
- ALTITUDE 2 DESCRIPTION:
ILcdDAFIFRefuelingTrackFeature.ALTITUDE_2_DESCRIPTION
- REFUELING 2 ALTITUDE 1:
ILcdDAFIFRefuelingTrackFeature.REFUELING_2_ALTITUDE_1
,ILcdDAFIFRefuelingTrackFeature.ALTITUDE_UNIT
- REFUELING 2 ALTITUDE 2:
ILcdDAFIFRefuelingTrackFeature.REFUELING_2_ALTITUDE_2
,ILcdDAFIFRefuelingTrackFeature.ALTITUDE_UNIT
- ALTITUDE 3 DESCRIPTION:
ILcdDAFIFRefuelingTrackFeature.ALTITUDE_3_DESCRIPTION
- REFUELING 3 ALTITUDE 1:
ILcdDAFIFRefuelingTrackFeature.REFUELING_3_ALTITUDE_1
,ILcdDAFIFRefuelingTrackFeature.ALTITUDE_UNIT
- REFUELING 3 ALTITUDE 2:
ILcdDAFIFRefuelingTrackFeature.REFUELING_3_ALTITUDE_2
,ILcdDAFIFRefuelingTrackFeature.ALTITUDE_UNIT
- SCHEDULING UNIT:
ILcdDAFIFRefuelingTrackFeature.SCHEDULING_UNIT
- ASSIGNED ATC:
ILcdDAFIFRefuelingTrackFeature.ASSIGNED_ATC
- CYCLE DATE:
ILcdDAFIFRefuelingAirspaceFeature.CYCLE_DATE
,ILcdDAFIFRefuelingTrackFeature.CYCLE_DATE
- USAGE:
ILcdDAFIFRefuelingTrackPointFeature.USAGE_CODE
- NAVAID IDENTIFIER:
ILcdDAFIFRefuelingTrackPointFeature.NAVAID_IDENTIFIER
- NAVAID TYPE:
ILcdDAFIFRefuelingTrackPointFeature.NAVAID_TYPE
- NAVAID COUNTRY CODE:
ILcdDAFIFRefuelingTrackPointFeature.NAVAID_COUNTRY_CODE
- NAVAID KEY CODE:
ILcdDAFIFRefuelingTrackPointFeature.NAVAID_KEY_CODE
- FIX:
ILcdDAFIFRefuelingTrackPointFeature.FIX
- POINT IDENTIFICATION:
ILcdDAFIFRefuelingTrackPointFeature.POINT_IDENTIFIER
- ILcdDAFIFRefuelingAirspaceFeature.IDENTIFIER
- ILcdDAFIFRefuelingAirspaceFeature.DIRECTION
- ILcdDAFIFRefuelingTrackFeature.IDENTIFIER
- ILcdDAFIFRefuelingTrackFeature.DIRECTION
- Since:
- 7.2
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTLcdDAFIFTRefuelingTrackDecoder
(ALcdAISObjectFactory aDomainFactory) Deprecated.Constructs a newTLcdDAFIFTRefuelingTrackDecoder
object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canDecodeSource
(String aSource) Returnstrue
if the specified source is: A file with the specific name corresponding to the object type of this decoder A directory containing such a file A.toc
file in a directory, pointing to such a fileReturns a model list containing one or more submodels.Returns the factory that is used to create domain objects.Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder
.Deprecated.Returns the error message of the last decode call.Returns the input stream factory that is currently used for creating the input streams for the given source names.int
Returns the number of error reports to be added to the error message.Returns the record filter that is currently used.String[]
getUniqueKeyFeatureNames
(int aIndex) Returns for the given submodel the array ofString
objects containing the names of the features that will be used as a unique key to insert objects into the submodel.void
setAirspaceDefaultDisplayNameIndex
(int aIndex) Specifies the index of the feature to be the refueling airspace display name.void
setAirspaceFeaturesToBeDecoded
(String[] aFeaturesToBeDecoded) Specifies the refueling airspace features to be be decoded into the model objects.void
setDataObjectFactory
(TLcdAISDataObjectFactory aFactory) Specifies the data factory.void
setDomainFactory
(ALcdAISObjectFactory aDomainFactory) Deprecated.void
setInputStreamFactory
(ILcdInputStreamFactory aInputStreamFactory) Sets the input stream factory that will be used for creating the input streams for the given source names.void
setMaxNumberOfErrorReports
(int aMaxNumberOfErrorReports) Specifies a value for the maximum number of error reports.void
setRecordFilter
(ILcdDAFIFTRecordFilter aRecordFilter) Specifies a filter to be used while creating the model.void
setTrackDefaultDisplayNameIndex
(int aIndex) Specifies the index of the feature to be the refueling track display name.void
setTrackFeaturesToBeDecoded
(String[] aFeaturesToBeDecoded) Specifies the refueling track features to be decoded into the model objects.Methods inherited from class com.luciad.format.dafift.decoder.ALcdDAFIFTModelDecoder
getDecodingBounds, getModelFilter, setDecodingBounds, setModelFilter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.model.ILcdModelDecoder
canDecodeSource, canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
-
Field Details
-
TRACK_INDEX
public static final int TRACK_INDEX- See Also:
-
AIRSPACE_INDEX
public static final int AIRSPACE_INDEX- See Also:
-
-
Constructor Details
-
TLcdDAFIFTRefuelingTrackDecoder
Deprecated.Constructs a newTLcdDAFIFTRefuelingTrackDecoder
object. The user should specify which aDomainFactory he or she wants to use to create the refueling track objects.- Parameters:
aDomainFactory
- The factory to be used to create the model objects.
-
TLcdDAFIFTRefuelingTrackDecoder
Constructs a newTLcdDAFIFTRefuelingTrackDecoder
object. The user should specify which factory he or she wants to use to create the refueling track objects.- Parameters:
aFactory
- The factory to be used to create the model objects.
-
-
Method Details
-
getDisplayName
Description copied from interface:ILcdModelDecoder
Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder
.- Specified by:
getDisplayName
in interfaceILcdModelDecoder
- Overrides:
getDisplayName
in classALcdDAFIFTModelDecoder
- Returns:
- the displayable name of this
ILcdModelDecoder
.
-
setTrackDefaultDisplayNameIndex
public void setTrackDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the refueling track display name.- Parameters:
aIndex
- The index of the feature to be the refueling track display name.
-
setAirspaceDefaultDisplayNameIndex
public void setAirspaceDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the refueling airspace display name.- Parameters:
aIndex
- The index of the feature to be the refueling airspace display name.
-
setTrackFeaturesToBeDecoded
Specifies the refueling track features to be decoded into the model objects. Please make sure that theIDENTIFIER
andDIRECTION
features are in your list of features to be decoded!- Parameters:
aFeaturesToBeDecoded
- A list of features that should be decoded into the refueling track model objects.
-
setAirspaceFeaturesToBeDecoded
Specifies the refueling airspace features to be be decoded into the model objects. Please make sure that theIDENTIFIER
andDIRECTION
features are in your list of features to be decoded!- Parameters:
aFeaturesToBeDecoded
- A list of features that should be decoded into the refueling airspace model objects.
-
decode
Returns a model list containing one or more submodels. Each submodel contains domain objects of the same type. The models will be build by looping through the records found in the source file. Each record that passes the record filter (getRecordFilter()
) will be decoded. A decoded record needs to pass two additional filters (a model filtergetModelFilter()
and a bounds filtergetDecodingBounds()
) before it can be added to the model. Furthermore, an error message will be initialized and filled with reports about errors occurred during the decode process. By default, all reports will be added into the error message. The methodsetMaxNumberOfErrorReports(int)
can be used to adjust this setting.- Parameters:
aSource
- Either the directory containing the DAFIFT source file to decode or the DAFIFT source file itself.- Returns:
- the model build by reading the file found with the given source.
- Throws:
IOException
- if an error occurs during the reading process.- See Also:
-
getUniqueKeyFeatureNames
Returns for the given submodel the array ofString
objects containing the names of the features that will be used as a unique key to insert objects into the submodel.- Parameters:
aIndex
- The index of the submodel whose unique key feature names are being retrieved.- Returns:
- for the given submodel the unique key feature names.
-
canDecodeSource
Returnstrue
if the specified source is:- A file with the specific name corresponding to the object type of this decoder
- A directory containing such a file
- A
.toc
file in a directory, pointing to such a file
- Parameters:
aSource
- the name of the source file or directory that you want to decode- Returns:
- a boolean indicating whether the given source can be decoded
-
getDomainFactory
Deprecated.Returns the factory that is used to create domain objects.- Returns:
- the factory that is used to create domain objects.
- See Also:
-
setDomainFactory
Deprecated.Specifies the domain factory. The domain factory will be used to create the domain objects decoded by this DAFIFT decoder.- Parameters:
aDomainFactory
- The factory that will be used to create domain objects.- See Also:
-
getDataObjectFactory
Returns the factory that is used to create domain objects.- Returns:
- the factory that is used to create domain objects.
- See Also:
-
setDataObjectFactory
Specifies the data factory. The data factory will be used to create the domain objects decoded by this DAFIFT decoder. Decoders equipped with a data object factory that is notnull
, will NOT use their associated domain factory (seegetDomainFactory()
).- Parameters:
aFactory
- The factory that will be used to create domain objects.- See Also:
-
getInputStreamFactory
Returns the input stream factory that is currently used for creating the input streams for the given source names.- Specified by:
getInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Returns:
- the input stream factory that is currently used.
- See Also:
-
setInputStreamFactory
Sets the input stream factory that will be used for creating the input streams for the given source names.- Specified by:
setInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Parameters:
aInputStreamFactory
- The input stream factory to be used.- See Also:
-
getRecordFilter
Returns the record filter that is currently used.- Returns:
- the record filter that is currently used.
- See Also:
-
setRecordFilter
Specifies a filter to be used while creating the model. Only records that pass through this filter will be decoded into model objects.- Parameters:
aRecordFilter
- The record filter that should be passed before a record can be decoded.- See Also:
-
getMaxNumberOfErrorReports
public int getMaxNumberOfErrorReports()Returns the number of error reports to be added to the error message. If there are more errors than the maxNumberOfErrorReports property, they won't be stored and you won't be able to see these errors in the error message after the decoding process.- Returns:
- the number of error reports to be added to the error message.
- See Also:
-
setMaxNumberOfErrorReports
public void setMaxNumberOfErrorReports(int aMaxNumberOfErrorReports) Specifies a value for the maximum number of error reports. If a negative value is set, all reported errors will be added to the error message.- Parameters:
aMaxNumberOfErrorReports
- The maximum number of error reports to be added to the error message.- See Also:
-
getErrorMessage
Returns the error message of the last decode call. Note that the error message can only be retrieved once after a decode call.- Returns:
- a
String
object containing the errors occurred during the last decode process.
-
getDataObjectFactory()