Class TLcdDAFIFAerodromeNavaidDecoder
- All Implemented Interfaces:
ILcdDAFIFDecoder
,ILcdDAFIFMultiModelDecoder
,ILcdInputStreamFactoryCapable
,ILcdModelDecoder
- Direct Known Subclasses:
TLcdDAFIFIndependentAerodromeNavaidDecoder
ALcdDAFIFMultiModelDecoder
decodes
navaids (VOR, DME, NDB, TACAN, VOR-DME, VORTAC and NDB-DME) from a DAFIF source file.
Decoded models have as model descriptor an instance of TLcdDAFIFAerodromeNavaidModelListDescriptor
.
This descriptor contains instances of TLcdDAFIFDMEModelDescriptor
,
TLcdDAFIFVORModelDescriptor
, TLcdDAFIFNDBModelDescriptor
and/or TLcdDAFIFTACANModelDescriptor
, dependent of the source file.
The navaids produced by this decoder are a subset from the collection of navaids decoded
by the
. To be in the subset, a navaid
should:
TLcdDAFIFNavaidDecoder
- have the same name as the airport or heliport it belongs to,
- be located on the airport or heliport it belongs to (and have a different name),
- be used to furnish final approach procedure guidance on a IAP serving the airport or heliport it belongs to.
The TLcdDAFIFAerodromeNavaidDecoder
won't create navaids itself. It
will retrieve the navaids for its model from a navaid model.
A navaid model should be set by using the setNavaidModel
method.
This model should have an index on some key features that uniquely define the objects.
For navaids the key features are:
createRequiredIndices
method.
The features mentioned above should be decoded into the featured model objects of the navaid model.- See Also:
-
Field Summary
Fields inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFDecoder
DAFIF_PROP_EXTENSION, fRecordCount
-
Constructor Summary
ConstructorDescriptionDeprecated.TLcdDAFIFAerodromeNavaidDecoder
(ALcdAISObjectFactory aFactory, Properties aDAFIFProperties) Deprecated.Constructs a newTLcdDAFIFAerodromeNavaidDecoder
object.TLcdDAFIFAerodromeNavaidDecoder
(TLcdAISDataObjectFactory aFactory, Properties aDAFIFProperties) Constructs a newTLcdDAFIFAerodromeNavaidDecoder
object. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 thedecode
method).createModelDescriptor
(String aSource) Creates and returns the model descriptor to be set on the model returned in the decode method.void
createRequiredIndices
(TLcdModelList aModelList) Adds an index on the sub models of the specified navaid modelList.Calls the decode method ofALcdDAFIFMultiModelDecoder
.Returns the name of the file to be decoded.Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder
.protected final void
handleRecord
(int aFormat, char[] aRecord) Deals with one record of input.void
setDMEDefaultDisplayNameIndex
(int aIndex) Specifies the index of the feature to be the DME display name.void
setNavaidModel
(TLcdModelList aNavaidModel) Specifies a modelList of navaids.void
setNDBDefaultDisplayNameIndex
(int aIndex) Specifies the index of the feature to be the NDB display name.void
setTACANDefaultDisplayNameIndex
(int aIndex) Specifies the index of the feature to be the TACAN display name.void
setVORDefaultDisplayNameIndex
(int aIndex) Specifies the index of the feature to be the VOR display name.Methods inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFMultiModelDecoder
cleanUp, getModelCount, postProcess, setKeyFeatureNames, setModelCount
Methods inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFDecoder
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.format.dafif.decoder.ILcdDAFIFDecoder
getBounds, getDAFIFProperties, getDataObjectFactory, getDecodingBounds, getDomainFactory, getErrorMessage, setBounds, setDAFIFModelFilter, setDAFIFProperties, setDataObjectFactory, setDecodingBounds, setDomainFactory, setStoreOriginalReference
Methods inherited from interface com.luciad.model.ILcdModelDecoder
canDecodeSource, canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
-
Constructor Details
-
TLcdDAFIFAerodromeNavaidDecoder
Deprecated.Constructs a newTLcdDAFIFAerodromeNavaidDecoder
object. The domainFactory specified here, may be null.- Parameters:
aFactory
- a domainFactory that won't be used.- See Also:
-
TLcdDAFIFAerodromeNavaidDecoder
Constructs a newTLcdDAFIFAerodromeNavaidDecoder
object. The domainFactory specified here, may be null.- Parameters:
aFactory
- a domainFactory that won't be used.- See Also:
-
TLcdDAFIFAerodromeNavaidDecoder
@Deprecated public TLcdDAFIFAerodromeNavaidDecoder(ALcdAISObjectFactory aFactory, Properties aDAFIFProperties) Deprecated.Constructs a newTLcdDAFIFAerodromeNavaidDecoder
object.- Parameters:
aFactory
- a domainFactory that won't be used.aDAFIFProperties
- aProperties
object that contains for each domain object the appropriate file name- See Also:
-
TLcdDAFIFAerodromeNavaidDecoder
public TLcdDAFIFAerodromeNavaidDecoder(TLcdAISDataObjectFactory aFactory, Properties aDAFIFProperties) Constructs a newTLcdDAFIFAerodromeNavaidDecoder
object.- Parameters:
aFactory
- a domainFactory that won't be used.aDAFIFProperties
- aProperties
object that contains for each domain object the appropriate file name- See Also:
-
-
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 classALcdDAFIFDecoder
- Returns:
- the displayable name of this
ILcdModelDecoder
.
-
getDecodeFileName
Description copied from interface:ILcdDAFIFDecoder
Returns the name of the file to be decoded.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.
- Returns:
- the name of the source file
-
decode
Calls the decode method ofALcdDAFIFMultiModelDecoder
.Checks whether a navaid model is set before starting the decode process. If no navaid model is specified, an
IllegalStateException
object will be thrown.- Specified by:
decode
in interfaceILcdModelDecoder
- Overrides:
decode
in classALcdDAFIFMultiModelDecoder
- Parameters:
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)- Returns:
- the model build by reading the file found with aSource
- Throws:
IOException
- if an error occurs during the reading processIllegalStateException
- if no navaid model has been specified- See Also:
-
handleRecord
protected final void handleRecord(int aFormat, char[] aRecord) Description copied from class:ALcdDAFIFMultiModelDecoder
Deals with one record of input.- Specified by:
handleRecord
in classALcdDAFIFMultiModelDecoder
- Parameters:
aFormat
- the format of the recordaRecord
- the record to deal with
-
createModelDescriptor
Description copied from class:ALcdDAFIFMultiModelDecoder
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 thedecode
method).- Specified by:
createModelDescriptor
in classALcdDAFIFMultiModelDecoder
- Parameters:
aSource
- the source to be decoded- Returns:
- a model descriptor describing the data in the submodel at position aIndex in the model produced by this decoder
-
createModelDescriptor
Description copied from interface:ILcdDAFIFMultiModelDecoder
Creates and returns the model descriptor to be set on the model returned in the decode method.- Specified by:
createModelDescriptor
in interfaceILcdDAFIFMultiModelDecoder
- Specified by:
createModelDescriptor
in classALcdDAFIFMultiModelDecoder
- Parameters:
aSource
- the source that will be used to build the model- Returns:
- the model descriptor to be set on the model produced by this decoder
-
setVORDefaultDisplayNameIndex
public void setVORDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the VOR display name.- Parameters:
aIndex
- the index of the feature to be used as display name
-
setTACANDefaultDisplayNameIndex
public void setTACANDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the TACAN display name.- Parameters:
aIndex
- the index of the feature to be used as display name
-
setDMEDefaultDisplayNameIndex
public void setDMEDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the DME display name.- Parameters:
aIndex
- the index of the feature to be used as display name
-
setNDBDefaultDisplayNameIndex
public void setNDBDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the NDB display name.- Parameters:
aIndex
- the index of the feature to be used as display name
-
createRequiredIndices
Adds an index on the sub models of the specified navaid modelList.This method should be called before calling
setNavaidModel
method.Please make sure that the following features were decoded into the model objects of the specified navaid modellist:
- ILcdNavaidFeature.IDENTIFIER,
- ILcdNavaidFeature.TYPE,
- ILcdNavaidFeature.COUNTRY_CODE,
- ILcdNavaidFeature.KEY_CODE.
- Parameters:
aModelList
- a modelList containing navaids- See Also:
-