Class TLcdDAFIFTRunwayDecoder
- All Implemented Interfaces:
ILcdInputStreamFactoryCapable,ILcdModelDecoder
- Direct Known Subclasses:
TLcdDAFIFTIndependentRunwayDecoder
ILcdModelDecoder that decodes DAFIFT runway objects from the
specified source directory. The decoded models have as model descriptor an instance of
TLcdDAFIFRunwayModelDescriptor.
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 decoder, the type of the decoded objects is TLcdDAFIFTDataTypes.Runway,
which can also be retrieved through ILcdDataObject.getDataType().
The available properties of the objects are defined in TLcdDAFIFTRunwayDataProperties.
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.
setRunwayFeaturesToBeDecoded and setRunwayDirectionFeaturesToBeDecoded 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.
The following fields (which are taken from the National Imagery and Mapping Agency (NIMA)
Product Specifications for Digital Aeronautical Flight Information File (DAFIF), Eight Edition,
January 2005) are supported by the decoder. The list indicates into which feature the fields
are decoded. For the runway and runway direction objects:
- AIRPORT IDENTIFICATION:
ILcdDAFIFRunwayFeature.AERODROME_IDENTIFICATION - IDENTIFIER (HIGH END):
ILcdDAFIFRunwayFeature.HIGH_END_IDENTIFIER,ILcdRunwayDirectionFeature.IDENTIFIER - IDENTIFIER (LOW END):
ILcdDAFIFRunwayFeature.LOW_END_IDENTIFIER,ILcdRunwayDirectionFeature.IDENTIFIER - LENGTH:
ILcdRunwayFeature.LENGTH,ILcdRunwayFeature.LENGTH_UNIT - WIDTH:
ILcdRunwayFeature.WIDTH,ILcdRunwayFeature.WIDTH_UNIT - SURFACE:
ILcdRunwayFeature.SURFACE_TYPE - PAVEMENT CLASSIFICATION NO# (PCN):
ILcdDAFIFRunwayFeature.PAVEMENT_CLASSIFICATION_NUMBER - SLOPE (HIGH END), SLOPE (LOW END):
ILcdDAFIFRunwayDirectionFeature.SLOPE - TOUCHDOWN ZONE ELEV (HIGH END)}, TOUCHDOWN ZONE ELEV (LOW END):
ILcdDAFIFRunwayDirectionFeature.TOUCHDOWN_ZONE_ELEVATION,ILcdDAFIFRunwayDirectionFeature.TOUCHDOWN_ZONE_ELEVATION_UNIT - DISP# THRESHOLD ELEV (HIGH END):
ILcdDAFIFRunwayDirectionFeature.THRESHOLD_ELEVATION,ILcdDAFIFRunwayDirectionFeature.THRESHOLD_ELEVATION_UNIT - MAGNETIC HEADING (HIGH END), MAGNETIC HEADING (LOW END):
ILcdRunwayDirectionFeature.MAGNETIC_HEADING - CLOSED/UNUSABLE RUNWAY:
ILcdDAFIFRunwayFeature.CLOSED - LANDING RUN AVAILABLE(HIGH END), LANDING RUN AVAILABLE(LOW END):
ILcdDAFIFRunwayDirectionFeature.LANDING_DISTANCE_AVAILABLE,ILcdDAFIFRunwayDirectionFeature.LANDING_DISTANCE_AVAILABLE_UNIT - TAKEOFF DISTANCE AVAILABLE (HIGH END), TAKEOFF DISTANCE AVAILABLE (LOW END):
ILcdDAFIFRunwayDirectionFeature.TAKEOFF_DISTANCE_AVAILABLE,ILcdDAFIFRunwayDirectionFeature.TAKEOFF_DISTANCE_AVAILABLE_UNIT - CYCLE DATE:
ILcdDAFIFRunwayFeature.CYCLE_DATE
- AIRPORT IDENTIFICATION:
ILcdDAFIFArrestingGearFeature.AERODROME_IDENTIFICATION - RUNWAY IDENTIFIER:
ILcdDAFIFArrestingGearFeature.RUNWAY_IDENTIFIER - TYPE:
ILcdDAFIFArrestingGearFeature.ENERGY_ABSORBING_DEVICE_CODE,ILcdDAFIFArrestingGearFeature.ENGAGING_DEVICE_CODE - ICAO CODE:
ILcdDAFIFArrestingGearFeature.ICAO_CODE
- ILcdDAFIFRunwayFeature.AERODROME_IDENTIFICATION
- ILcdDAFIFRunwayFeature.HIGH_END_IDENTIFIER
- ILcdDAFIFRunwayFeature.LOW_END_IDENTIFIER
TLcdDAFIFTRunwayDecoder does not decode the
aerodromes necessary to produce a runway model. An aerodrome model should be specified by using
the setAerodromeModel method. A unique index containing the ILcdAerodromeFeature.IDENTIFICATION feature is added on this aerodrome model. The feature
should have been decoded into the featured model objects of the aerodrome model.- Since:
- 7.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTLcdDAFIFTRunwayDecoder(ALcdAISObjectFactory aDomainFactory) Deprecated.Constructs a newTLcdDAFIFTRunwayDecoderobject. -
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 aerodrome 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[]Returns the array ofStringobjects containing the names of the features that will be used as a unique key to insert objects into the model.booleanReturns a boolean indicating whether the arresting gear model will be decoded or not.voidsetAerodromeModel(ILcdFeatureIndexedModel aAerodromeModel) Specifies the model containing the aerodrome objects this decoder should use.voidsetDataObjectFactory(TLcdAISDataObjectFactory aFactory) Specifies the data factory.voidsetDecodeArrestingGear(boolean aDecodeArrestingGear) Specify whether the arresting gear model should be added or not while decoding the runways.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.voidsetRecordFilter(ILcdDAFIFTRecordFilter aRecordFilter) Specifies a filter to be used while creating the model.voidsetRunwayDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the runway display name.voidsetRunwayDirectionDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the runway direction display name.voidsetRunwayDirectionFeaturesToBeDecoded(String[] aFeaturesToBeDecoded) Specifies the runway direction features to be decoded into the model objects.voidsetRunwayFeaturesToBeDecoded(String[] aFeaturesToBeDecoded) Specifies the runway features to be decoded into the model objects.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
-
TLcdDAFIFTRunwayDecoder
Deprecated.Constructs a newTLcdDAFIFTRunwayDecoderobject. The user should specify which aDomainFactory he or she wants to use to create the runways.- Parameters:
aDomainFactory- The factory to be used to create the model objects.
-
TLcdDAFIFTRunwayDecoder
Constructs a newTLcdDAFIFTRunwayDecoderobject. The user should specify which factory he or she wants to use to create the runways.- 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 aerodrome model is set before starting the decode process. If no aerodrome model is specified, anIllegalStateExceptionobject will be thrown. Returns a model containing the domain objects read from the given source file. The model 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 aerodrome model has been specified.- See Also:
-
setRunwayDefaultDisplayNameIndex
public void setRunwayDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the runway display name.- Parameters:
aIndex- The index of the feature to be the runway display name.
-
setRunwayDirectionDefaultDisplayNameIndex
public void setRunwayDirectionDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the runway direction display name.- Parameters:
aIndex- The index of the feature to be the runway direction display name.
-
setRunwayFeaturesToBeDecoded
Specifies the runway features to be decoded into the model objects. Please make sure that theAERODROME_IDENTIFICATION,HIGH_END_IDENTIFIERandLOW_END_IDENTIFIERfeatures are in your list of features to be decoded!- Parameters:
aFeaturesToBeDecoded- A list of features that should be decoded into the runway model objects.
-
setRunwayDirectionFeaturesToBeDecoded
Specifies the runway direction features to be decoded into the model objects. Please make sure that theIDENTIFIERfeature is in your list.- Parameters:
aFeaturesToBeDecoded- A list of features that should be decoded into the runway direction objects.
-
setAerodromeModel
Specifies the model containing the aerodrome objects this decoder should use.- Parameters:
aAerodromeModel- A model containing aerodrome objects.
-
isDecodeArrestingGear
public boolean isDecodeArrestingGear()Returns a boolean indicating whether the arresting gear model will be decoded or not.- Returns:
- whether the arresting gear model will be decoded or not.
- See Also:
-
setDecodeArrestingGear
public void setDecodeArrestingGear(boolean aDecodeArrestingGear) Specify whether the arresting gear model should be added or not while decoding the runways.- Parameters:
aDecodeArrestingGear- A flag indicating if the arresting gear should be decoded.- See Also:
-
getUniqueKeyFeatureNames
Returns the array ofStringobjects containing the names of the features that will be used as a unique key to insert objects into the model.- Returns:
- the array of
Stringobjects containing the names of the features that will be used as a unique key to insert objects into the model.
-
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()