Class TLcdDAFIFMilitaryTrainingRouteDecoder
- All Implemented Interfaces:
ILcdDAFIFDecoder,ILcdInputStreamFactoryCapable,ILcdModelDecoder
ALcdDAFIFSingleModelDecoder decodes
military training routes from a DAFIF source file. Decoded models have
as model descriptor an instance of TLcdDAFIFMilitaryTrainingRouteModelDescriptor.
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.MilitaryTrainingRoute,
which can also be retrieved through ILcdDataObject.getDataType().
The available properties of the objects are defined in TLcdDAFIFMilitaryTrainingRouteDataProperties.
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 setRouteFeaturesToBeDecoded method, the
setRouteSegmentFeaturesToBeDecoded method
and setRoutePointFeaturesToBeDecoded method
allow 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.
- IDENTIFIER: ILcdDAFIFMilitaryTrainingRouteFeature.IDENTIFIER
- POINT IDENT: ILcdDAFIFMilitaryTrainingRoutePointFeature.POINT_IDENTIFIER
- NEXT POINT IDENT: ILcdDAFIFMilitaryTrainingRoutePointFeature.NEXT_POINT_IDENTIFIER
- ALTITUDE DESCRIPTION: ILcdDAFIFMilitaryTrainingRoutePointFeature.CROSS_ALTITUDE_DESCRIPTION, ILcdDAFIFMilitaryTrainingRoutePointFeature.ENROUTE_ALTITUDE_DESCRIPTION
- CROSS ALTITUDE ONE: ILcdDAFIFMilitaryTrainingRoutePointFeature.CROSS_ALTITUDE_1, ILcdDAFIFMilitaryTrainingRoutePointFeature.CROSS_ALTITUDE_1_UNIT
- CROSS ALTITUDE TWO: ILcdDAFIFMilitaryTrainingRoutePointFeature.CROSS_ALTITUDE_2, ILcdDAFIFMilitaryTrainingRoutePointFeature.CROSS_ALTITUDE_2_UNIT
- ENROUTE ALTITUDE ONE: ILcdDAFIFMilitaryTrainingRoutePointFeature.ENROUTE_ALTITUDE_1, ILcdDAFIFMilitaryTrainingRoutePointFeature.ENROUTE_ALTITUDE_1_UNIT
- ENROUTE ALTITUDE TWO: ILcdDAFIFMilitaryTrainingRoutePointFeature.ENROUTE_ALTITUDE_2, ILcdDAFIFMilitaryTrainingRoutePointFeature.ENROUTE_ALTITUDE_2_UNIT
- WIDTH: ILcdDAFIFMilitaryTrainingRoutePointFeature.WIDTH_LEFT, ILcdDAFIFMilitaryTrainingRoutePointFeature.WIDTH_RIGHT
- USAGE CODE: ILcdDAFIFMilitaryTrainingRoutePointFeature.USAGE_CODE
- TURN RADIUS: ILcdDAFIFMilitaryTrainingRoutePointFeature.TURN_RADIUS, ILcdDAFIFMilitaryTrainingRoutePointFeature.TURN_RADIUS_UNIT
- TURN DIRECTION: ILcdDAFIFMilitaryTrainingRoutePointFeature.TURN_DIRECTION
- ADDITIONAL ROUTE INFO: ILcdDAFIFMilitaryTrainingRoutePointFeature.ADDITIONAL_ROUTE_INFO
- BI-SECTION OF PATH ANGLE: ILcdDAFIFMilitaryTrainingRouteSegmentFeature.BI_SECTION_1, ILcdDAFIFMilitaryTrainingRouteSegmentFeature.BI_SECTION_2
- FIX: ILcdDAFIFMilitaryTrainingRoutePointFeature.FIX
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 military training routes the key features are:
- See Also:
-
Field Summary
Fields inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFDecoder
DAFIF_PROP_EXTENSION, fRecordCount -
Constructor Summary
ConstructorsConstructorDescriptionTLcdDAFIFMilitaryTrainingRouteDecoder(ALcdAISObjectFactory aDomainFactory) Deprecated.TLcdDAFIFMilitaryTrainingRouteDecoder(ALcdAISObjectFactory aDomainFactory, Properties aDAFIFProperties) Deprecated.Creates a newTLcdDAFIFMilitaryTrainingRouteDecoder.TLcdDAFIFMilitaryTrainingRouteDecoder(TLcdAISDataObjectFactory aFactory, Properties aDAFIFProperties) Creates a newTLcdDAFIFMilitaryTrainingRouteDecoder. -
Method Summary
Modifier and TypeMethodDescriptionprotected ILcdModelDescriptorcreateModelDescriptor(String aSource) Creates and returns the model descriptor to be set on the model returned in thedecodemethod.Returns a model containing domain objects read from the given source file.Returns the name of the file to be decoded.Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder.protected final voidhandleRecord(int aFormat, char[] aRecord) Deals with one record of input.voidsetRouteDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the route display name.voidsetRouteFeaturesToBeDecoded(String[] aRouteFeaturesToBeDecoded) Specifies a list of features to be decoded into the military training route model objects.voidsetRoutePointDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the route point display name.voidsetRoutePointFeaturesToBeDecoded(String[] aRoutePointFeaturesToBeDecoded) Specifies a list of features to be decoded into the military training route points.voidsetRouteSegmentFeaturesToBeDecoded(String[] aRouteSegmentFeaturesToBeDecoded) Specifies a list of features to be decoded into the military training route segments.Methods inherited from class com.luciad.format.dafif.decoder.ALcdDAFIFSingleModelDecoder
cleanUp, setKeyFeatureNamesMethods 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, transformPointToReferenceDatumSFCTMethods 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, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
-
Constructor Details
-
TLcdDAFIFMilitaryTrainingRouteDecoder
Deprecated.Creates a newTLcdDAFIFMilitaryTrainingRouteDecoder. The user should specify which domainFactory he or she wants to use to create the military training routes.- Parameters:
aDomainFactory- the factory to be used to create the model objects
-
TLcdDAFIFMilitaryTrainingRouteDecoder
Creates a newTLcdDAFIFMilitaryTrainingRouteDecoder. The user should specify which factory he or she wants to use to create the military training routes.- Parameters:
aFactory- the factory to be used to create the model objects
-
TLcdDAFIFMilitaryTrainingRouteDecoder
@Deprecated public TLcdDAFIFMilitaryTrainingRouteDecoder(ALcdAISObjectFactory aDomainFactory, Properties aDAFIFProperties) Deprecated.Creates a newTLcdDAFIFMilitaryTrainingRouteDecoder. The user should specify which domainFactory he or she wants to use to create the military training routes.- Parameters:
aDomainFactory- the factory to be used to create the model objectsaDAFIFProperties- aPropertiesobject that contains for each domain object the appropriate file name
-
TLcdDAFIFMilitaryTrainingRouteDecoder
public TLcdDAFIFMilitaryTrainingRouteDecoder(TLcdAISDataObjectFactory aFactory, Properties aDAFIFProperties) Creates a newTLcdDAFIFMilitaryTrainingRouteDecoder. The user should specify which domainFactory he or she wants to use to create the military training routes.- Parameters:
aFactory- the factory to be used to create the model objectsaDAFIFProperties- aPropertiesobject that contains for each domain object the appropriate file name
-
-
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 classALcdDAFIFDecoder- Returns:
- the displayable name of this
ILcdModelDecoder.
-
getDecodeFileName
Description copied from interface:ILcdDAFIFDecoderReturns 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
Description copied from class:ALcdDAFIFSingleModelDecoderReturns a model containing 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 will be manipulated by the abstract
handleRecordmethod.Furthermore, the error message will be initialized and filled with reports about errors occurred during the decode proces.
- Specified by:
decodein interfaceILcdModelDecoder- Overrides:
decodein classALcdDAFIFSingleModelDecoder- 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), a .toc file containing the DAFIF properties (the data file should be in the same directory as the .toc file) or a single file which name corresponds to the file name associated with this decoder (seegetDecodeFileName()).- Returns:
- the model build by reading the file found with aSource
- Throws:
IOException- if an error occurs during the reading process- See Also:
-
handleRecord
protected final void handleRecord(int aFormat, char[] aRecord) Description copied from class:ALcdDAFIFSingleModelDecoderDeals with one record of input.- Specified by:
handleRecordin classALcdDAFIFSingleModelDecoder- Parameters:
aFormat- the format of the recordaRecord- the record
-
createModelDescriptor
Description copied from class:ALcdDAFIFSingleModelDecoderCreates and returns the model descriptor to be set on the model returned in thedecodemethod.- Specified by:
createModelDescriptorin 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
-
setRouteDefaultDisplayNameIndex
public void setRouteDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the route display name.- Parameters:
aIndex- the index of the feature to be used as display name
-
setRoutePointDefaultDisplayNameIndex
public void setRoutePointDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the route point display name.- Parameters:
aIndex- the index of the feature to be used as display name
-
setRouteFeaturesToBeDecoded
Specifies a list of features to be decoded into the military training route model objects.Please make sure that the
IDENTIFIERfeature is in your list of features to be decoded!- Parameters:
aRouteFeaturesToBeDecoded- a list of features that should be decoded into the route objects
-
setRouteSegmentFeaturesToBeDecoded
Specifies a list of features to be decoded into the military training route segments.- Parameters:
aRouteSegmentFeaturesToBeDecoded- a list of features that should be decoded into the route segment objects
-
setRoutePointFeaturesToBeDecoded
Specifies a list of features to be decoded into the military training route points.- Parameters:
aRoutePointFeaturesToBeDecoded- a list of features that should be decoded into the route point objects
-