public class TLcdDAFIFVFRRouteDecoder extends ALcdDAFIFMultiModelDecoder
ALcdDAFIFMultiModelDecoder
decodes VFR routes from a DAFIF
source file. Decoded models have as model descriptor an instance of
TLcdDAFIFVFRRouteModelListDescriptor
.
The resulting modelList 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.VFRRoute
,
TLcdDAFIFDataTypes.VFROffsetRoute
and TLcdDAFIFDataTypes.VFRRoutePoint
,
which can also be retrieved through ILcdDataObject.getDataType()
.
The available properties of the objects are defined in TLcdDAFIFVFRRouteDataProperties
,
TLcdDAFIFVFROffsetRouteDataProperties
and TLcdDAFIFVFRRoutePointDataProperties
.
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.
VFR route data includes data about aerodromes and heliports, served by the VFR and offset routes.
To decode the available aerodrome and heliport information as well, use the
setAddAerodromes
method. For the aerodromes and heliports, there is no
feature selection possible; all features will be decoded.
The setVFRRouteFeaturesToBeDecoded
method, the
setOffsetRouteFeaturesToBeDecoded
method and the
setVFRRoutePointFeaturesToBeDecoded
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. VFR Arrival/Departure route 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 VFR routes and offset routes the key features are:
DAFIF_PROP_EXTENSION, fRecordCount
Constructor and Description |
---|
TLcdDAFIFVFRRouteDecoder(ALcdAISObjectFactory aFactory)
Deprecated.
|
TLcdDAFIFVFRRouteDecoder(ALcdAISObjectFactory aFactory,
boolean aAddAerodromes)
Deprecated.
|
TLcdDAFIFVFRRouteDecoder(ALcdAISObjectFactory aFactory,
Properties aDAFIFProperties)
Deprecated.
|
TLcdDAFIFVFRRouteDecoder(ALcdAISObjectFactory aFactory,
Properties aDAFIFProperties,
boolean aAddAerodromes)
Deprecated.
|
TLcdDAFIFVFRRouteDecoder(TLcdAISDataObjectFactory aFactory)
Constructs a new
TLcdDAFIFVFRRouteDecoder . |
TLcdDAFIFVFRRouteDecoder(TLcdAISDataObjectFactory aFactory,
boolean aAddAerodromes)
Constructs a new
TLcdDAFIFVFRRouteDecoder . |
TLcdDAFIFVFRRouteDecoder(TLcdAISDataObjectFactory aFactory,
Properties aDAFIFProperties)
Constructs a new
TLcdDAFIFVFRRouteDecoder . |
TLcdDAFIFVFRRouteDecoder(TLcdAISDataObjectFactory aFactory,
Properties aDAFIFProperties,
boolean aAddAerodromes)
Constructs a new
TLcdDAFIFVFRRouteDecoder . |
Modifier and Type | Method and Description |
---|---|
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.
|
ILcdModel |
decode(String aSource)
If the isAddAerodrome property is true, the aerodrome and heliport model are decoded first.
|
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.
|
boolean |
isAddAerodromes()
Returns the addAerodromes property.
|
void |
setAddAerodromes(boolean aValue)
Specifies a value for the addAerodromes property.
|
void |
setOffsetRouteFeaturesToBeDecoded(String[] aOffsetRouteFeaturesToBeDecoded)
Specifies the features that should be decoded into the offset route objects
of the model that will be returned by the
decode method. |
void |
setRouteDefaultDisplayNameIndex(int aIndex)
Specifies the index of the feature to be the
route display name.
|
void |
setRoutePointDefaultDisplayNameIndex(int aIndex)
Specifies the index of the feature to be the
route point display name.
|
void |
setVFRRouteFeaturesToBeDecoded(String[] aVFRRouteFeaturesToBeDecoded)
Specifies the features that should be decoded into the VFR route objects
of the model that will be returned by the
decode method. |
void |
setVFRRoutePointFeaturesToBeDecoded(String[] aVFRRoutePointFeaturesToBeDecoded)
Specifies the features that should be decoded into the VFR route point
objects of the model that will be returned by the
decode method. |
cleanUp, getModelCount, postProcess, 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
@Deprecated public TLcdDAFIFVFRRouteDecoder(ALcdAISObjectFactory aFactory)
TLcdDAFIFVFRRouteDecoder
. The isAddAerodromes property will be set
to true. The user should specify which domainFactory he or she wants to use to create the VFR routes, the aerodromes and the heliports.
aFactory
- the factory to be used to create the model objects@Deprecated public TLcdDAFIFVFRRouteDecoder(ALcdAISObjectFactory aFactory, boolean aAddAerodromes)
TLcdDAFIFVFRRouteDecoder
. The user
should specify which domainFactory he or she wants to use to create the VFR routes, the aerodromes
and the heliports (if requested).aFactory
- the factory to be used to create the model objectsaAddAerodromes
- a boolean
indicating whether a submodel containing
the aerodromes should be added or not@Deprecated public TLcdDAFIFVFRRouteDecoder(ALcdAISObjectFactory aFactory, Properties aDAFIFProperties)
TLcdDAFIFVFRRouteDecoder
. The isAddAerodromes property will be set
to true. The user should specify which domainFactory he or she wants to use to create the VFR routes, the aerodromes and the heliports.
aFactory
- the factory to be used to create the model objectsaDAFIFProperties
- a Properties
object that contains for each domain object
the appropriate file name@Deprecated public TLcdDAFIFVFRRouteDecoder(ALcdAISObjectFactory aFactory, Properties aDAFIFProperties, boolean aAddAerodromes)
TLcdDAFIFVFRRouteDecoder
. The user should specify which
domainFactory he or she wants to use to create the VFR routes, the aerodromes and the heliports
(if requested).aFactory
- the factory to be used to create the model objectsaDAFIFProperties
- a Properties
object that contains for each domain object
the appropriate file nameaAddAerodromes
- a boolean
indicating whether submodels containing the
aerodromes and heliports should be added or notpublic TLcdDAFIFVFRRouteDecoder(TLcdAISDataObjectFactory aFactory)
TLcdDAFIFVFRRouteDecoder
. The isAddAerodromes property will be set
to true. The user should specify which factory he or she wants to use to create the VFR routes, the aerodromes and the heliports.
aFactory
- the factory to be used to create the model objectspublic TLcdDAFIFVFRRouteDecoder(TLcdAISDataObjectFactory aFactory, boolean aAddAerodromes)
TLcdDAFIFVFRRouteDecoder
. The user
should specify which factory he or she wants to use to create the VFR routes, the aerodromes
and the heliports (if requested).aFactory
- the factory to be used to create the model objectsaAddAerodromes
- a boolean
indicating whether a submodel containing
the aerodromes should be added or notpublic TLcdDAFIFVFRRouteDecoder(TLcdAISDataObjectFactory aFactory, Properties aDAFIFProperties)
TLcdDAFIFVFRRouteDecoder
. The isAddAerodromes property will be set
to true. The user should specify which factory he or she wants to use to create the VFR routes, the aerodromes and the heliports.
aFactory
- the factory to be used to create the model objectsaDAFIFProperties
- a Properties
object that contains for each domain object
the appropriate file namepublic TLcdDAFIFVFRRouteDecoder(TLcdAISDataObjectFactory aFactory, Properties aDAFIFProperties, boolean aAddAerodromes)
TLcdDAFIFVFRRouteDecoder
. The user should specify which
factory he or she wants to use to create the VFR routes, the aerodromes and the heliports
(if requested).aFactory
- the factory to be used to create the model objectsaDAFIFProperties
- a Properties
object that contains for each domain object
the appropriate file nameaAddAerodromes
- a boolean
indicating whether submodels containing the
aerodromes and heliports should be added or notpublic String getDisplayName()
ILcdModelDecoder
ILcdModelDecoder
.getDisplayName
in interface ILcdModelDecoder
getDisplayName
in class ALcdDAFIFDecoder
ILcdModelDecoder
.public ILcdModel decode(String aSource) throws IOException
ALcdDAFIFMultiModelDecoder
class will be called.
Prints additional information to the log.
decode
in interface ILcdModelDecoder
decode
in class ALcdDAFIFMultiModelDecoder
aSource
- either the directory containing the Dafif source file to decode (if you did not
specify a properties file in the constructor, the default file name will be used) or a .toc file
containing the Dafif properties (the data file should be in the same directory as the .toc file)IOException
- if an error occurs during the reading processILcdModelDecoder.canDecodeSource(String)
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 modelpublic 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 void setRouteDefaultDisplayNameIndex(int aIndex)
aIndex
- the index of the feature to be used as display namepublic void setRoutePointDefaultDisplayNameIndex(int aIndex)
aIndex
- the index of the feature to be used as display namepublic void setVFRRouteFeaturesToBeDecoded(String[] aVFRRouteFeaturesToBeDecoded)
decode
method.
Please make sure that the AIRPORT_ID
feature
and the ROUTE_ID
feature are in your list.
aVFRRouteFeaturesToBeDecoded
- a list of features that should be decoded into the VFR route objectspublic void setVFRRoutePointFeaturesToBeDecoded(String[] aVFRRoutePointFeaturesToBeDecoded)
decode
method.aVFRRoutePointFeaturesToBeDecoded
- a list of features that should be decoded into the VRF route point objectspublic void setOffsetRouteFeaturesToBeDecoded(String[] aOffsetRouteFeaturesToBeDecoded)
decode
method.
Please make sure that the ILcdDAFIFVFRRouteFeature.AIRPORT_ID
feature
and the ILcdDAFIFVFRRouteFeature.ROUTE_ID
feature are in your list.
aOffsetRouteFeaturesToBeDecoded
- a list of features that should be decoded into the offset route objectspublic boolean isAddAerodromes()
The aerodromes and heliports in the model are retrieved from the aerodrome and the heliport model decoded by this decoder using the source to be decoded.
boolean
indicating whether submodel of aerodromes and heliports should
be addedsetAddAerodromes(boolean)
public void setAddAerodromes(boolean aValue)
aValue
- a boolean
indicating whether submodel of aerodromes and heliports
should be addedisAddAerodromes()