public abstract class ALcdDAFIFAerodromeDecoder extends ALcdDAFIFSingleModelDecoder
ALcdDAFIFSingleModelDecoder
class
provides read methods to retrieve data from a aerodrome or heliport data file.
Records containing information about airports and about airport communication have the same structure as records containing information about heliports. Therefore, the read methods will be the same for these objects.
Modifier and Type | Field and Description |
---|---|
protected String[] |
fCommunicationFeaturesToBeDecoded
The set of all communications features to be decoded
This may be set by the user.
|
protected String[] |
fCommunicationFeaturesType1
For each of the 4 formats, the particular features to decode.
|
protected String[] |
fCommunicationFeaturesType2 |
protected String[] |
fCommunicationFeaturesType3 |
protected String[] |
fCommunicationFeaturesType4 |
DAFIF_PROP_EXTENSION, fRecordCount
Constructor and Description |
---|
ALcdDAFIFAerodromeDecoder(Properties aDAFIFProperties)
Initializes the DAFIFProperties field with the
specified properties object.
|
Modifier and Type | Method and Description |
---|---|
protected TLcdAerodromeOperationsType |
getTypeForChar(char aType)
Returns the unique
TLcdAirportType object attached to the given character. |
protected TLcdFeaturedService |
readCommunicationFeaturesFromType1(char[] aRecord)
Reads a full record having format 16 (airports) / 13 (heliports)
The created TLcdFeaturedService has the same number of features as specified by
fCommunicationFeaturesToBeDecoded, but only the
fCommunicationFeaturesType1 are actually filled in.
|
protected TLcdFeaturedService |
readCommunicationFeaturesFromType2(char[] aRecord)
Reads a full record having format 17 (airports) / 14 (heliports)
The created TLcdFeaturedService has the same number of features as specified by
fCommunicationFeaturesToBeDecoded, but only the
fCommunicationFeaturesType1 are actually filled in.
|
protected TLcdFeaturedService |
readCommunicationFeaturesFromType3(char[] aRecord)
Reads a full record having format 18 (airports) / 15 (heliports)
The created TLcdFeaturedService has the same number of features as specified by
fCommunicationFeaturesToBeDecoded, but only the
fCommunicationFeaturesType1 are actually filled in.
|
protected String |
readCommunicationRemark(char[] aRecord)
Reads the remark text from a communication record of format 19 - airports
or 16 - heliports
|
protected Integer |
readCommunicationRemarkSequenceNumber(char[] aRecord)
Reads the remark sequence number from a communication record of
format 19 - airports or 16 - heliports
|
protected TLcdCommunicationType |
readCommunicationType(char[] aRecord)
Reads the communication type from a communication record
|
protected Integer |
readCommunicationTypeMultiplierFromType1(char[] aRecord)
Reads the communication type multiplier from a communication record
of format 16 - airports or 13 - heliports.
|
protected Integer |
readCommunicationTypeMultiplierFromType2(char[] aRecord)
Reads the communication type multiplier from a communication record
of format 17 - airports or 14 - heliports.
|
protected Integer |
readCommunicationTypeMultiplierFromType3(char[] aRecord)
Reads the communication type multiplier from a communication record
of format 18 - airports or 15 - heliports.
|
protected Integer |
readCommunicationTypeMultiplierFromType4(char[] aRecord)
Reads the communication type multiplier from a communication record
of format 19 - airports or 16 - heliports.
|
protected String |
readCountryCodeFromFmt1(char[] aRecord)
Returns the country code of an aerodrome.
|
protected double |
readElevationFromFmt1(char[] aRecord)
Reads the elevation of an aerodrome.
|
protected String |
readFAAHostCountryIdentifierFromFmt1(char[] aRecord)
Reads the Federal Aviation Administration identifier/host country identifier.
|
protected double |
readGeodeticLat(char[] aRecord)
Reads a geodetic latitude.
|
protected double |
readGeodeticLon(char[] aRecord)
Reads a geodetic longitude.
|
protected String |
readICAOCodeFromFmt1(char[] aRecord)
Reads an aerodromes ICAO code from a record of format 01.
|
protected String |
readIdentification(char[] aRecord)
Reads the identification of an aerodrome from a given record.
|
protected double |
readLat(char[] aRecord)
Reads a latitude.
|
protected ILcdGeodeticDatum |
readLocalHorizontalDatumFromFmt1(char[] aRecord)
Reads the local horizontal datum from a record of format 01.
|
protected double |
readLon(char[] aRecord)
Reads a longitude.
|
protected String |
readMagneticVariation(char[] aRecord)
Reads the magnetic variation from a record of format 01.
|
protected String |
readNameFromFmt1(char[] aRecord)
Reads the name of an aerodrome.
|
protected TLcdAerodromeOperationsType |
readOperationsTypeFromFmt1(char[] aRecord)
Reads an aerodromes type from a record of format 01.
|
protected boolean |
readRotatingBeaconFromFmt1(char[] aRecord)
Reads the rotating beacon of an aerodrome.
|
protected Integer |
readStateProvinceCodeFromFmt1(char[] aRecord)
Reads the state province code from a record of format 01.
|
protected String |
readWACFromFmt1(char[] aRecord)
Reads the world area code from a record of format 01.
|
void |
setCommunicationFeaturesToBeDecoded(String[] aAerodromeCommunicationsFeaturesToBeDecoded)
Sets the airport/heliport communications features to be decoded.
|
protected void |
splitAerodromeFeatures()
Given the complete fCommunicationFeaturesToBeDecoded list,
it finds the features that have to be extracted from each type of format.
|
cleanUp, createModelDescriptor, decode, handleRecord, setKeyFeatureNames
addErrorReport, canDecodeSource, getAltitudeType, getBearingTypeForChar, getBounds, getDAFIFProperties, getDataObjectFactory, getDecodingBounds, getDisplayName, 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
getDecodeFileName
canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
protected String[] fCommunicationFeaturesToBeDecoded
protected String[] fCommunicationFeaturesType1
protected String[] fCommunicationFeaturesType2
protected String[] fCommunicationFeaturesType3
protected String[] fCommunicationFeaturesType4
public ALcdDAFIFAerodromeDecoder(Properties aDAFIFProperties)
If you don't have a properties object here, you can still specify it by decoding a .toc file containing the dafif properties. The decoder will read the properties from the .toc file and look for the data file to be decoded in the directory containing this .toc file.
aDAFIFProperties
- a Properties
object containing for each domain
object the name of its data file or NULLprotected String readIdentification(char[] aRecord)
The identification has no spaces.
aRecord
- the record to read fromprotected String readCountryCodeFromFmt1(char[] aRecord)
The country code is part of the aerodromes identification. The identification consists of 7 characters: 5 numbers preceded by the country code.
aRecord
- the record to read fromprotected String readNameFromFmt1(char[] aRecord)
Aerodrome names are found in records of format 01. A name has 38 characters and starts at the 14th position of the record. It should contain at least one character. An exception will be thrown if the name is empty.
aRecord
- the record to read fromprotected String readICAOCodeFromFmt1(char[] aRecord)
The ICAO code has 4 characters and starts at the 3th position of the record. It should contain at least 2 non-space characters. If not, an exception will be thrown
aRecord
- the record to read fromprotected Integer readStateProvinceCodeFromFmt1(char[] aRecord)
This code has length 2. The field may be empty.
aRecord
- the record to read fromprotected String readFAAHostCountryIdentifierFromFmt1(char[] aRecord)
This 4 letter - String contains at least 1 character. If it 's empty, an exception will be thrown.
aRecord
- the record to read fromprotected double readLon(char[] aRecord)
aRecord
- the record to read fromprotected double readLat(char[] aRecord)
aRecord
- the record to read fromprotected double readGeodeticLon(char[] aRecord)
aRecord
- the record to read fromprotected double readGeodeticLat(char[] aRecord)
aRecord
- the record to read fromprotected ILcdGeodeticDatum readLocalHorizontalDatumFromFmt1(char[] aRecord)
This field must not be empty. If it is, an exception will be thrown.
aRecord
- the record to read fromprotected TLcdAerodromeOperationsType readOperationsTypeFromFmt1(char[] aRecord)
A type is defined by one single character (values 'A',
'B', 'C' or 'D') and results in an object of TLcdAirportType
.
aRecord
- the record to read fromprotected double readElevationFromFmt1(char[] aRecord)
The elevation starts at the 102nd position of a record of format 01 and it consists of 5 characters. The elevation is measured in meter.
aRecord
- the record to read fromprotected boolean readRotatingBeaconFromFmt1(char[] aRecord)
This field should contain 'Y' or ' '. If not, an IllegalArgumentException
will be thrown.
aRecord
- the record to read fromprotected String readMagneticVariation(char[] aRecord)
The magnetic variation has length 12. If not, an exception will be thrown.
aRecord
- the record to read fromprotected String readWACFromFmt1(char[] aRecord)
This code has length 4 and at least 2 characters are no space. If less than 2 characters are found, an exception will be thrown.
aRecord
- the record to read fromprotected TLcdAerodromeOperationsType getTypeForChar(char aType)
TLcdAirportType
object attached to the given character.
If there's no TLcdAirportType
object provided for the given character, an
IllegalArgumentException
is thrown.
aType
- a code for the operationsTypeprotected TLcdCommunicationType readCommunicationType(char[] aRecord)
aRecord
- protected Integer readCommunicationTypeMultiplierFromType1(char[] aRecord)
aRecord
- protected Integer readCommunicationTypeMultiplierFromType2(char[] aRecord)
aRecord
- protected Integer readCommunicationTypeMultiplierFromType3(char[] aRecord)
aRecord
- protected Integer readCommunicationTypeMultiplierFromType4(char[] aRecord)
aRecord
- protected Integer readCommunicationRemarkSequenceNumber(char[] aRecord)
aRecord
- protected String readCommunicationRemark(char[] aRecord)
aRecord
- public void setCommunicationFeaturesToBeDecoded(String[] aAerodromeCommunicationsFeaturesToBeDecoded)
ILcdDAFIFCommunicationFeature
.aAerodromeCommunicationsFeaturesToBeDecoded
- an array of communication featuresTLcdDAFIFAerodromeDecoder
,
TLcdDAFIFHeliportDecoder
protected TLcdFeaturedService readCommunicationFeaturesFromType1(char[] aRecord)
protected TLcdFeaturedService readCommunicationFeaturesFromType2(char[] aRecord)
protected TLcdFeaturedService readCommunicationFeaturesFromType3(char[] aRecord)
protected void splitAerodromeFeatures()