Class TLcdDAFIFAerodromeDecoder
- All Implemented Interfaces:
ILcdDAFIFDecoder
,ILcdInputStreamFactoryCapable
,ILcdModelDecoder
ALcdDAFIFAerodromeDecoder
decodes
aerodromes from a DAFIF source file. Decoded models have as model descriptor
an instance of TLcdDAFIFAerodromeModelDescriptor
.
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 TLcdDAFIFDataTypes.Aerodrome
,
which can also be retrieved through ILcdDataObject.getDataType()
.
The available properties of the objects are defined in TLcdDAFIFAerodromeDataProperties
.
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 setAerodromeFeaturesToBeDecoded
method allows
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.
- AIRPORT IDENTIFICATION: ILcdAerodromeFeature.IDENTIFICATION
- COUNTRY CODE(first two characters of Airport Identification): ILcdDAFIFAerodromeFeature.COUNTRY_CODE
- STATE/PROVINCE CODE: ILcdDAFIFAerodromeFeature.STATE_PROVINCE_CODE
- NAME: ILcdAerodromeFeature.NAME
- FEDERAL AVIATION ADMINISTRATION IDENTIFIER/HOST COUNTRY IDENTIFIER: ILcdDAFIFAerodromeFeature.FAA_HOST_COUNTRY_IDENTIFIER
- PRIMARY OPERATING AGENCY: ILcdDAFIFAerodromeFeature.OPERATING_AGENCY
- ROTATING BEACON: ILcdDAFIFAerodromeFeature.ROTATING_BEACON
- ICAO CODE (only if the ICAO CODE field has length 4): ILcdAerodromeFeature.ICAO_CODE
- ICAO CODE (first two characters only): ILcdAerodromeFeature.ICAO_REGION
- TYPE: ILcdAerodromeFeature.OPERATIONS_TYPE
- WORLD AREA CODE (WAC): ILcdDAFIFAerodromeFeature.WORLD_AREA_CODE
- MAGNETIC VARIATION: ILcdAerodromeFeature.MAGNETIC_VARIATION
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 aerodromes the key features are:
In addition to the fields of the aerodrome records, this class also decodes communication records
as described in the specifications of formats 16,17,18 of FILE0 (airports) and 13,14,15 of FILE1 (heliports).
The communication objects corresponding to an aerodrome are stored in a Vector
feature
of the aerodrome:
- AIRPORT COMMUNICATION: ILcdDAFIFAerodromeFeature.AERODROME_COMMUNICATIONS
setCommunicationFeaturesToBeDecoded
.
If no communication features to be decoded are specified, all features will be decoded.
The following fields of the communication records are supported by the decoder. The list indicates into which communication feature the fields are decoded.
- COMMUNICATION_TYPE: ILcdDAFIFCommunicationFeature.COMMUNICATION_TYPE
- COMMUNICATION_NAME: ILcdDAFIFCommunicationFeature.COMMUNICATION_NAME
- SYMBOLS: ILcdDAFIFCommunicationFeature.SYMBOLS
- FREQUENCY_1: ILcdDAFIFCommunicationFeature.FREQUENCY_1
- FREQUENCY_2: ILcdDAFIFCommunicationFeature.FREQUENCY_2
- FREQUENCY_3: ILcdDAFIFCommunicationFeature.FREQUENCY_3
- FREQUENCY_4: ILcdDAFIFCommunicationFeature.FREQUENCY_4
- FREQUENCY_5: ILcdDAFIFCommunicationFeature.FREQUENCY_5
- COMMUNICATION_TYPE_MULTIPLIER: ILcdDAFIFCommunicationFeature.COMMUNICATION_TYPE_MULTIPLIER
- SECTOR: ILcdDAFIFCommunicationFeature.SECTOR
- SPECIFIC_OPERATING_HOURS: ILcdDAFIFCommunicationFeature.SPECIFIC_OPERATING_HOURS
In the aerodrome's vector of communication objects, each element is of type
TLcdFeaturedService
.
Each of these elements contains all the communication features specified in
setCommunicationFeaturesToBeDecoded
but some of the features may have null values, depending on the communication record
from which they have been decoded.
- See Also:
-
Field Summary
Fields inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFAerodromeDecoder
fCommunicationFeaturesToBeDecoded, fCommunicationFeaturesType1, fCommunicationFeaturesType2, fCommunicationFeaturesType3, fCommunicationFeaturesType4
Fields inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFDecoder
DAFIF_PROP_EXTENSION, fRecordCount
-
Constructor Summary
ConstructorDescriptionDeprecated.TLcdDAFIFAerodromeDecoder
(ALcdAISObjectFactory aFactory, Properties aDAFIFProperties) Deprecated.Creates a newTLcdDAFIFAerodromeDecoder
object.TLcdDAFIFAerodromeDecoder
(TLcdAISDataObjectFactory aFactory, Properties aDAFIFProperties) Creates a newTLcdDAFIFAerodromeDecoder
object. -
Method Summary
Modifier and TypeMethodDescriptionprotected ILcdModelDescriptor
createModelDescriptor
(String aSource) Creates and returns the model descriptor to be set on the model returned in thedecode
method.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
setAerodromeDefaultDisplayNameIndex
(int aIndex) Specifies the index of the feature to be used as display name.void
setAerodromeFeaturesToBeDecoded
(String[] aFeaturesToBeDecoded) Specifies the names of the features that should be decoded into the aerodrome objects of the model that will be returned by thedecode
method.void
setCollocatedAerodromeFeaturesToBeDecoded
(String[] aCollocatedAerodromeFeaturesToBeDecoded) Specifies the names of the features that should be decoded into the collocated aerodrome objects of the model that will be returned by thedecode
method.Methods inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFAerodromeDecoder
getTypeForChar, readCommunicationFeaturesFromType1, readCommunicationFeaturesFromType2, readCommunicationFeaturesFromType3, readCommunicationRemark, readCommunicationRemarkSequenceNumber, readCommunicationType, readCommunicationTypeMultiplierFromType1, readCommunicationTypeMultiplierFromType2, readCommunicationTypeMultiplierFromType3, readCommunicationTypeMultiplierFromType4, readCountryCodeFromFmt1, readElevationFromFmt1, readFAAHostCountryIdentifierFromFmt1, readGeodeticLat, readGeodeticLon, readICAOCodeFromFmt1, readIdentification, readLat, readLocalHorizontalDatumFromFmt1, readLon, readMagneticVariation, readNameFromFmt1, readOperationsTypeFromFmt1, readRotatingBeaconFromFmt1, readStateProvinceCodeFromFmt1, readWACFromFmt1, setCommunicationFeaturesToBeDecoded, splitAerodromeFeatures
Methods inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFSingleModelDecoder
cleanUp, decode, setKeyFeatureNames
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.model.ILcdModelDecoder
canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
-
Constructor Details
-
TLcdDAFIFAerodromeDecoder
Deprecated.Creates a newTLcdDAFIFAerodromeDecoder
object. The user should specify which domainFactory he or she wants to use to create the aerodromes.- Parameters:
aFactory
- the factory to be used to create the aerodromes
-
TLcdDAFIFAerodromeDecoder
Creates a newTLcdDAFIFAerodromeDecoder
object. The user should specify which data object factory he or she wants to use to create the aerodromes.- Parameters:
aFactory
- the factory to be used to create the aerodromes
-
TLcdDAFIFAerodromeDecoder
@Deprecated public TLcdDAFIFAerodromeDecoder(ALcdAISObjectFactory aFactory, Properties aDAFIFProperties) Deprecated.Creates a newTLcdDAFIFAerodromeDecoder
object.- Parameters:
aFactory
- the factory to be used to create the aerodromesaDAFIFProperties
- aProperties
object that contains for each domain object the associated file name
-
TLcdDAFIFAerodromeDecoder
Creates a newTLcdDAFIFAerodromeDecoder
object.- Parameters:
aFactory
- the factory to be used to create the aerodromesaDAFIFProperties
- aProperties
object that contains for each domain object the associated file name
-
-
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
-
handleRecord
protected final void handleRecord(int aFormat, char[] aRecord) Description copied from class:ALcdDAFIFSingleModelDecoder
Deals with one record of input.- Specified by:
handleRecord
in classALcdDAFIFSingleModelDecoder
- Parameters:
aFormat
- the format of the recordaRecord
- the record
-
createModelDescriptor
Description copied from class:ALcdDAFIFSingleModelDecoder
Creates and returns the model descriptor to be set on the model returned in thedecode
method.- Specified by:
createModelDescriptor
in classALcdDAFIFSingleModelDecoder
- Parameters:
aSource
- the source that will be used to decode- Returns:
- a model descriptor describing the data in the model created in the decode method
-
setAerodromeDefaultDisplayNameIndex
public void setAerodromeDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be used as display name.- Parameters:
aIndex
- the index of the feature to be used as display name
-
setAerodromeFeaturesToBeDecoded
Specifies the names of the features that should be decoded into the aerodrome objects of the model that will be returned by thedecode
method.Note: Please make sure that the
IDENTIFICATION
feature is in your list.- Parameters:
aFeaturesToBeDecoded
- a list of features that should be decoded into the aerodrome objects
-
setCollocatedAerodromeFeaturesToBeDecoded
public void setCollocatedAerodromeFeaturesToBeDecoded(String[] aCollocatedAerodromeFeaturesToBeDecoded) Specifies the names of the features that should be decoded into the collocated aerodrome objects of the model that will be returned by thedecode
method.- Parameters:
aCollocatedAerodromeFeaturesToBeDecoded
- a list of features that should be decoded into the collocated aerodrome objects
-