Package com.luciad.format.dafift.decoder
Class TLcdDAFIFTAerodromeNavaidDecoder
java.lang.Object
com.luciad.format.dafift.decoder.ALcdDAFIFTModelDecoder
com.luciad.format.dafift.decoder.TLcdDAFIFTAerodromeNavaidDecoder
- All Implemented Interfaces:
ILcdInputStreamFactoryCapable,ILcdModelDecoder
- Direct Known Subclasses:
TLcdDAFIFTIndependentAerodromeNavaidDecoder
Implementation of
ILcdModelDecoder that decodes DAFIFT navaid objects (VOR, DME, NDB,
TACAN, VOR-DME, VORTAC and NDB-DME) from the specified source directory. The decoded models have
as model descriptor an instance of TLcdDAFIFAerodromeNavaidModelListDescriptor. This
model list descriptor contains instances of the descriptor TLcdDAFIFDMEModelDescriptor,
TLcdDAFIFVORModelDescriptor, TLcdDAFIFNDBModelDescriptor and/or
TLcdDAFIFTACANModelDescriptor, dependent of the source directory.
The navaid objects produced by this decoder are a subset from the collection of navaids decoded by
the TLcdDAFIFTNavaidDecoder. To be in the subset, a navaid
should:
- 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) and
- be used to furnish final approach procedure guidance on an IAP serving the airport or heliport it belongs to.
TLcdDAFIFTAerodromeNavaidDecoder won't create navaids itself. It will retrieve the
navaids for its model from the specified navaid model. This navaid model should be set by using the
setNavaidModel method. The model should have an index on some key features
that uniquely define the objects. For navaids the key features are:
A unique key with the features mentioned above is added on the aerodrome navaid model. The features
should be decoded into the featured model objects of the aerodrome navaid model.- Since:
- 7.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTLcdDAFIFTAerodromeNavaidDecoder(ALcdAISObjectFactory aDomainFactory) Deprecated.Constructs a newTLcdDAFIFTAerodromeNavaidDecoderobject. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanDecodeSource(String aSource) Returnstrueif 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.tocfile in a directory, pointing to such a fileChecks whether a navaid model is set before starting the decode process.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.intReturns 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 ofStringobjects containing the names of the features that will be used as a unique key to insert objects into the submodel.voidsetDataObjectFactory(TLcdAISDataObjectFactory aFactory) Specifies the data factory.voidsetDMEDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the DME display name.voidsetDomainFactory(ALcdAISObjectFactory aDomainFactory) Deprecated.voidsetInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory) Sets the input stream factory that will be used for creating the input streams for the given source names.voidsetMaxNumberOfErrorReports(int aMaxNumberOfErrorReports) Specifies a value for the maximum number of error reports.voidsetNavaidModel(TLcdModelList aNavaidModel) Specifies the model list containing the navaid objects this decoder should use.voidsetNDBDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the NDB display name.voidsetRecordFilter(ILcdDAFIFTRecordFilter aRecordFilter) Specifies a filter to be used while creating the model.voidsetTACANDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the TACAN display name.voidsetVORDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the VOR display name.Methods inherited from class com.luciad.format.dafift.decoder.ALcdDAFIFTModelDecoder
getDecodingBounds, getModelFilter, setDecodingBounds, setModelFilterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.model.ILcdModelDecoder
canDecodeSource, canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
-
Constructor Details
-
TLcdDAFIFTAerodromeNavaidDecoder
Deprecated.Constructs a newTLcdDAFIFTAerodromeNavaidDecoderobject. The aDomainFactory specified here, may benull.- Parameters:
aDomainFactory- The factory to be used to create the model objects.
-
TLcdDAFIFTAerodromeNavaidDecoder
Constructs a newTLcdDAFIFTAerodromeNavaidDecoderobject. The factory specified here, may benull.- Parameters:
aFactory- The factory to be used to create the model objects.
-
-
Method Details
-
getDisplayName
Description copied from interface:ILcdModelDecoderReturns a short, displayable name for the format that is decoded by thisILcdModelDecoder.- Specified by:
getDisplayNamein interfaceILcdModelDecoder- Overrides:
getDisplayNamein classALcdDAFIFTModelDecoder- Returns:
- the displayable name of this
ILcdModelDecoder.
-
decode
Checks whether a navaid model is set before starting the decode process. If no navaid model is specified, anIllegalStateExceptionobject will be thrown. 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.- Specified by:
decodein interfaceILcdModelDecoder- 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.IllegalStateException- if no navaid model has been specified.- See Also:
-
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 the VOR 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 the NDB 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 the DME 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 the TACAN display name.
-
getUniqueKeyFeatureNames
Returns for the given submodel the array ofStringobjects 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
Returnstrueif 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
.tocfile 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:
getInputStreamFactoryin 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:
setInputStreamFactoryin 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
Stringobject containing the errors occurred during the last decode process.
-
getDataObjectFactory()