public class TLcdDAFIFTRefuelingTrackDecoder extends ALcdDAFIFTModelDecoder
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
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.
ILcdDAFIFRefuelingAirspaceFeature.IDENTIFIER
,
ILcdDAFIFRefuelingTrackFeature.IDENTIFIER
ILcdDAFIFRefuelingAirspaceFeature.DIRECTION
,
ILcdDAFIFRefuelingTrackFeature.DIRECTION
ILcdDAFIFRefuelingTrackFeature.ICAO_CODE
ILcdDAFIFRefuelingTrackFeature.TYPE
ILcdDAFIFRefuelingTrackFeature.COUNTRY_CODE
ILcdDAFIFRefuelingTrackFeature.PRIMARY_UHF_FREQUENCY
,
ILcdDAFIFRefuelingTrackFeature.PRIMARY_UHF_FREQUENCY_UNIT
ILcdDAFIFRefuelingTrackFeature.BACK_UP_UHF_FREQUENCY
,
ILcdDAFIFRefuelingTrackFeature.BACK_UP_UHF_FREQUENCY_UNIT
ILcdDAFIFRefuelingTrackFeature.APN_SETTING
ILcdDAFIFRefuelingTrackFeature.APX_ENCODE_DECODE
ILcdDAFIFRefuelingTrackFeature.RECEIVER_CHANNEL
,
ILcdDAFIFRefuelingTrackFeature.TANKER_CHANNEL
ILcdDAFIFRefuelingTrackFeature.ALTITUDE_1_DESCRIPTION
ILcdDAFIFRefuelingTrackFeature.REFUELING_1_ALTITUDE_1
,
ILcdDAFIFRefuelingTrackFeature.ALTITUDE_UNIT
ILcdDAFIFRefuelingTrackFeature.REFUELING_1_ALTITUDE_2
,
ILcdDAFIFRefuelingTrackFeature.ALTITUDE_UNIT
ILcdDAFIFRefuelingTrackFeature.ALTITUDE_2_DESCRIPTION
ILcdDAFIFRefuelingTrackFeature.REFUELING_2_ALTITUDE_1
,
ILcdDAFIFRefuelingTrackFeature.ALTITUDE_UNIT
ILcdDAFIFRefuelingTrackFeature.REFUELING_2_ALTITUDE_2
,
ILcdDAFIFRefuelingTrackFeature.ALTITUDE_UNIT
ILcdDAFIFRefuelingTrackFeature.ALTITUDE_3_DESCRIPTION
ILcdDAFIFRefuelingTrackFeature.REFUELING_3_ALTITUDE_1
,
ILcdDAFIFRefuelingTrackFeature.ALTITUDE_UNIT
ILcdDAFIFRefuelingTrackFeature.REFUELING_3_ALTITUDE_2
,
ILcdDAFIFRefuelingTrackFeature.ALTITUDE_UNIT
ILcdDAFIFRefuelingTrackFeature.SCHEDULING_UNIT
ILcdDAFIFRefuelingTrackFeature.ASSIGNED_ATC
ILcdDAFIFRefuelingAirspaceFeature.CYCLE_DATE
,
ILcdDAFIFRefuelingTrackFeature.CYCLE_DATE
ILcdDAFIFRefuelingTrackPointFeature.USAGE_CODE
ILcdDAFIFRefuelingTrackPointFeature.NAVAID_IDENTIFIER
ILcdDAFIFRefuelingTrackPointFeature.NAVAID_TYPE
ILcdDAFIFRefuelingTrackPointFeature.NAVAID_COUNTRY_CODE
ILcdDAFIFRefuelingTrackPointFeature.NAVAID_KEY_CODE
ILcdDAFIFRefuelingTrackPointFeature.FIX
ILcdDAFIFRefuelingTrackPointFeature.POINT_IDENTIFIER
ILcdDAFIFRefuelingTrackFeature
,
ILcdDAFIFRefuelingTrackPointFeature
,
ILcdDAFIFRefuelingAirspaceFeature
Modifier and Type | Field and Description |
---|---|
static int |
AIRSPACE_INDEX |
static int |
TRACK_INDEX |
Constructor and Description |
---|
TLcdDAFIFTRefuelingTrackDecoder(ALcdAISObjectFactory aDomainFactory)
Deprecated.
|
TLcdDAFIFTRefuelingTrackDecoder(TLcdAISDataObjectFactory aFactory)
Constructs a new
TLcdDAFIFTRefuelingTrackDecoder object. |
Modifier and Type | Method and Description |
---|---|
boolean |
canDecodeSource(String aSource)
Returns
true 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
|
ILcdModel |
decode(String aSource)
Returns a model list containing one or more submodels.
|
TLcdAISDataObjectFactory |
getDataObjectFactory()
Returns the factory that is used to create domain objects.
|
String |
getDisplayName()
Returns a short, displayable name for the format that is decoded by this
ILcdModelDecoder . |
ALcdAISObjectFactory |
getDomainFactory()
Deprecated.
|
String |
getErrorMessage()
Returns the error message of the last decode call.
|
ILcdInputStreamFactory |
getInputStreamFactory()
Returns the input stream factory that is currently used for creating
the input streams for the given source names.
|
int |
getMaxNumberOfErrorReports()
Returns the number of error reports to be added to the error message.
|
ILcdDAFIFTRecordFilter |
getRecordFilter()
Returns the record filter that is currently used.
|
String[] |
getUniqueKeyFeatureNames(int aIndex)
Returns for the given submodel the array of
String 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.
|
getDecodingBounds, getModelFilter, setDecodingBounds, setModelFilter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canDecodeSource, canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
public static final int TRACK_INDEX
public static final int AIRSPACE_INDEX
@Deprecated public TLcdDAFIFTRefuelingTrackDecoder(ALcdAISObjectFactory aDomainFactory)
TLcdDAFIFTRefuelingTrackDecoder
object. The user should specify which
aDomainFactory he or she wants to use to create the refueling track objects.aDomainFactory
- The factory to be used to create the model objects.public TLcdDAFIFTRefuelingTrackDecoder(TLcdAISDataObjectFactory aFactory)
TLcdDAFIFTRefuelingTrackDecoder
object. The user should specify which
factory he or she wants to use to create the refueling track objects.aFactory
- The factory to be used to create the model objects.public String getDisplayName()
ILcdModelDecoder
ILcdModelDecoder
.getDisplayName
in interface ILcdModelDecoder
getDisplayName
in class ALcdDAFIFTModelDecoder
ILcdModelDecoder
.public void setTrackDefaultDisplayNameIndex(int aIndex)
aIndex
- The index of the feature to be the refueling track display name.public void setAirspaceDefaultDisplayNameIndex(int aIndex)
aIndex
- The index of the feature to be the refueling airspace display name.public void setTrackFeaturesToBeDecoded(String[] aFeaturesToBeDecoded)
IDENTIFIER
and DIRECTION
features are
in your list of features to be decoded!aFeaturesToBeDecoded
- A list of features that should be decoded into the refueling track model objects.public void setAirspaceFeaturesToBeDecoded(String[] aFeaturesToBeDecoded)
IDENTIFIER
and DIRECTION
features are
in your list of features to be decoded!aFeaturesToBeDecoded
- A list of features that should be decoded into the refueling airspace model objects.public ILcdModel decode(String aSource) throws IOException
getRecordFilter()
) will be decoded.
A decoded record needs to pass two additional filters (a model filter getModelFilter()
and a bounds filter getDecodingBounds()
) 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
method setMaxNumberOfErrorReports(int)
can be used to adjust this setting.aSource
- Either the directory containing the DAFIFT source file to decode
or the DAFIFT source file itself.IOException
- if an error occurs during the reading process.ILcdModelDecoder.canDecodeSource(String)
public String[] getUniqueKeyFeatureNames(int aIndex)
String
objects containing the names
of the features that will be used as a unique key to insert objects into the submodel.aIndex
- The index of the submodel whose unique key feature names are being retrieved.public boolean canDecodeSource(String aSource)
true
if the specified source is:
.toc
file in a directory, pointing to such a fileaSource
- the name of the source file or directory that you want to decode@Deprecated public ALcdAISObjectFactory getDomainFactory()
getDataObjectFactory()
setDomainFactory(ALcdAISObjectFactory)
@Deprecated public void setDomainFactory(ALcdAISObjectFactory aDomainFactory)
setDataObjectFactory(TLcdAISDataObjectFactory)
aDomainFactory
- The factory that will be used to create domain objects.getDomainFactory()
public TLcdAISDataObjectFactory getDataObjectFactory()
setDomainFactory(ALcdAISObjectFactory)
public void setDataObjectFactory(TLcdAISDataObjectFactory aFactory)
null
, will
NOT use their associated domain factory (see getDomainFactory()
).aFactory
- The factory that will be used to create domain objects.getDomainFactory()
public ILcdInputStreamFactory getInputStreamFactory()
getInputStreamFactory
in interface ILcdInputStreamFactoryCapable
setInputStreamFactory(ILcdInputStreamFactory)
public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
setInputStreamFactory
in interface ILcdInputStreamFactoryCapable
aInputStreamFactory
- The input stream factory to be used.getInputStreamFactory()
public ILcdDAFIFTRecordFilter getRecordFilter()
setRecordFilter(ILcdDAFIFTRecordFilter)
public void setRecordFilter(ILcdDAFIFTRecordFilter aRecordFilter)
aRecordFilter
- The record filter that should be passed before a record
can be decoded.getRecordFilter()
public int getMaxNumberOfErrorReports()
setMaxNumberOfErrorReports(int)
public void setMaxNumberOfErrorReports(int aMaxNumberOfErrorReports)
aMaxNumberOfErrorReports
- The maximum number of error reports to be added to the error message.getMaxNumberOfErrorReports()
public String getErrorMessage()
String
object containing the errors occurred during
the last decode process.