public class TLcdDAFIFRefuelingTrackDecoder extends ALcdDAFIFMultiModelDecoder
ALcdDAFIFMultiModelDecoder
decodes
refueling tracks or anchors from a DAFIF source file.
The modelList 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 TLcdDAFIFDataTypes.RefuelingAirspace
,
and TLcdDAFIFDataTypes.RefuelingTrack
, which can also be retrieved through
ILcdDataObject.getDataType()
.
The available properties of the objects are defined in TLcdDAFIFRefuelingAirspaceDataProperties
,
and TLcdDAFIFRefuelingTrackDataProperties
.
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
method, the
setPointFeaturesToBeDecoded
method
and setTrackFeaturesToBeDecoded
method
allow the user to specify which DAFIF features are decoded into the featured model objects.
If no features to be decoded are specified, all features will be decoded.
The following fields (taken from the National Imagery and Mapping Agency (NIMA) Product Specifications for Digital Aeronautical Flight Information File (DAFIF), Seventh Edition, May 2001) are supported by the decoder. The list indicates into which feature the fields are decoded.
Refueling track or anchor fields:
DAFIF decoders rely on a specific set of key features that uniquely define an object. This set of features must always be included in the set of features to be decoded. For refueling track or anchor airspaces, the key features are:
For refueling tracks, the key features are:
Modifier and Type | Field and Description |
---|---|
static int |
AIRSPACE_INDEX |
static int |
TRACK_INDEX |
DAFIF_PROP_EXTENSION, fRecordCount
Constructor and Description |
---|
TLcdDAFIFRefuelingTrackDecoder(ALcdAISObjectFactory aFactory)
Deprecated.
|
TLcdDAFIFRefuelingTrackDecoder(ALcdAISObjectFactory aFactory,
Properties aDAFIFProperties)
Deprecated.
|
TLcdDAFIFRefuelingTrackDecoder(TLcdAISDataObjectFactory aFactory)
Constructs a new
TLcdDAFIFRefuelingTrackDecoder object. |
TLcdDAFIFRefuelingTrackDecoder(TLcdAISDataObjectFactory aFactory,
Properties aDAFIFProperties)
Constructs a new
TLcdDAFIFRefuelingTrackDecoder object. |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanUp()
This method should be implemented by a concrete class.
|
protected ILcdModelDescriptor |
createModelDescriptor(int aIndex,
String aSource)
Creates and returns the model descriptor to be set on the model with index aIndex
in the model (i.e. in the model returned in the
decode method). |
TLcdEditableModelListDescriptor |
createModelDescriptor(String aSource)
Creates and returns the model descriptor to be set on the model returned in the
decode method.
|
String |
getDecodeFileName()
Returns the name of the file to be decoded.
|
String |
getDisplayName()
Returns a short, displayable name for the format that is decoded by this
ILcdModelDecoder . |
protected void |
handleRecord(int aFormat,
char[] aRecord)
Deals with one record of input.
|
protected void |
postProcess()
This method is usually not implemented.
|
void |
setAirspaceDefaultDisplayNameIndex(int aIndex)
Specifies the index of the feature to be the
airspace display name.
|
void |
setAirspaceFeaturesToBeDecoded(String[] aAirspaceFeaturesToBeDecoded)
Specifies the features that should be decoded into the refueling airspace
objects of the model that will be returned by the
decode method. |
void |
setPointFeaturesToBeDecoded(String[] aPointFeaturesToBeDecoded)
Specifies the features that should be decoded into the refueling point
objects of the model that will be returned by the
decode method. |
void |
setTrackDefaultDisplayNameIndex(int aIndex)
Specifies the index of the feature to be the
track display name.
|
void |
setTrackFeaturesToBeDecoded(String[] aTrackFeaturesToBeDecoded)
Specifies the features that should be decoded into the refueling track
objects of the model that will be returned by the
decode method. |
void |
setTrackPointDefaultDisplayNameIndex(int aIndex)
Specifies the index of the feature to be the
track point display name.
|
decode, getModelCount, setKeyFeatureNames, setModelCount
addErrorReport, canDecodeSource, getAltitudeType, getBearingTypeForChar, getBounds, getDAFIFProperties, getDataObjectFactory, getDecodingBounds, getDomainFactory, getErrorMessage, getInputStream, getInputStreamFactory, getLocalHorizontalDatum, getModelFilter, getRecordCount, initializeErrorMessage, isStoreOriginalReference, isTraceOn, loadCFGProperties, read, readExactValue, readFormat, readMinLength, readRecord, setBounds, setDAFIFModelFilter, setDAFIFProperties, setDataObjectFactory, setDecodingBounds, setDomainFactory, setInputStreamFactory, setStoreOriginalReference, setTraceOn, transformPointToReferenceDatumSFCT
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBounds, getDAFIFProperties, getDataObjectFactory, getDecodingBounds, getDomainFactory, getErrorMessage, setBounds, setDAFIFModelFilter, setDAFIFProperties, setDataObjectFactory, setDecodingBounds, setDomainFactory, setStoreOriginalReference
canDecodeSource, canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
public static final int TRACK_INDEX
public static final int AIRSPACE_INDEX
@Deprecated public TLcdDAFIFRefuelingTrackDecoder(ALcdAISObjectFactory aFactory)
TLcdDAFIFRefuelingTrackDecoder
object. The user
should specify which domainFactory he or she wants to use to create the refueling tracks.aFactory
- the factory to be used to create the model objectspublic TLcdDAFIFRefuelingTrackDecoder(TLcdAISDataObjectFactory aFactory)
TLcdDAFIFRefuelingTrackDecoder
object. The user
should specify which factory he or she wants to use to create the refueling tracks.aFactory
- the factory to be used to create the model objects@Deprecated public TLcdDAFIFRefuelingTrackDecoder(ALcdAISObjectFactory aFactory, Properties aDAFIFProperties)
TLcdDAFIFRefuelingTrackDecoder
object. The user
should specify which domainFactory he or she wants to use to create the refueling tracks.aFactory
- the factory to be used to create the model objectsaDAFIFProperties
- a Properties
object that contains for each domain object
the appropriate file namepublic TLcdDAFIFRefuelingTrackDecoder(TLcdAISDataObjectFactory aFactory, Properties aDAFIFProperties)
TLcdDAFIFRefuelingTrackDecoder
object. The user
should specify which factory he or she wants to use to create the refueling tracks.aFactory
- the factory to be used to create the model objectsaDAFIFProperties
- a Properties
object that contains for each domain object
the appropriate file namepublic String getDecodeFileName()
ILcdDAFIFDecoder
Each domain object has its own file name. This method returns the name of the data file for the domain objects decoded by this DAFIF decoder.
public String getDisplayName()
ILcdModelDecoder
ILcdModelDecoder
.getDisplayName
in interface ILcdModelDecoder
getDisplayName
in class ALcdDAFIFDecoder
ILcdModelDecoder
.protected final void handleRecord(int aFormat, char[] aRecord)
ALcdDAFIFMultiModelDecoder
handleRecord
in class ALcdDAFIFMultiModelDecoder
aFormat
- the format of the recordaRecord
- the record to deal withprotected ILcdModelDescriptor createModelDescriptor(int aIndex, String aSource)
ALcdDAFIFMultiModelDecoder
decode
method).createModelDescriptor
in class ALcdDAFIFMultiModelDecoder
aSource
- the source to be decodedpublic TLcdEditableModelListDescriptor createModelDescriptor(String aSource)
ILcdDAFIFMultiModelDecoder
createModelDescriptor
in interface ILcdDAFIFMultiModelDecoder
createModelDescriptor
in class ALcdDAFIFMultiModelDecoder
aSource
- the source that will be used to build the modelprotected final void postProcess()
ALcdDAFIFMultiModelDecoder
postProcess
in class ALcdDAFIFMultiModelDecoder
protected void cleanUp()
ALcdDAFIFDecoder
It should empty all temporary data structures used during the decoding process.
cleanUp
in class ALcdDAFIFMultiModelDecoder
public void setTrackDefaultDisplayNameIndex(int aIndex)
aIndex
- the index of the feature to be used as display namepublic void setAirspaceDefaultDisplayNameIndex(int aIndex)
aIndex
- the index of the feature to be used as display namepublic void setTrackPointDefaultDisplayNameIndex(int aIndex)
aIndex
- the index of the feature to be used as display namepublic void setTrackFeaturesToBeDecoded(String[] aTrackFeaturesToBeDecoded)
decode
method.
Please make sure that the IDENTIFIER
and DIRECTION
features are in your list.
aTrackFeaturesToBeDecoded
- a list of features that should be decoded into the refueling track objectspublic void setPointFeaturesToBeDecoded(String[] aPointFeaturesToBeDecoded)
decode
method.aPointFeaturesToBeDecoded
- a list of features that should be decoded into the track point objectspublic void setAirspaceFeaturesToBeDecoded(String[] aAirspaceFeaturesToBeDecoded)
decode
method.
Please make sure that the IDENTIFIER
and DIRECTION
features are in your list.
aAirspaceFeaturesToBeDecoded
- a list of features that should be decoded into the airspace objects