public class TLcdDAFIFILSDecoder extends ALcdDAFIFMultiModelDecoder
ALcdDAFIFMultiModelDecoder
decodes
ILS components (DMEs, glide paths, localizers and markers) from a DAFIF source file.
Decoded models have as model descriptor an instance of TLcdDAFIFILSModelListDescriptor
.
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 handler, the types of the decoded objects are TLcdDAFIFDataTypes.ILSDME
,
TLcdDAFIFDataTypes.GlidePath
, TLcdDAFIFDataTypes.Localizer
and
TLcdDAFIFDataTypes.Marker
, which can also be retrieved through
ILcdDataObject.getDataType()
.
The available properties of the objects are defined in TLcdDAFIFILSDMEDataProperties
,
TLcdDAFIFGlidePathDataProperties
, TLcdDAFIFLocalizerDataProperties
and TLcdDAFIFMarkerDataProperties
.
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 setGlidePathFeaturesToBeDecoded
method,
the setDMEFeaturesToBeDecoded
method,
the setLocalizerFeaturesToBeDecoded
method,
and the setMarkerFeaturesToBeDecoded
method,
the 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.
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 glide paths the key features are:
For localizers the key features are: For DMEs the key features are: For markers the key features are:DAFIF_PROP_EXTENSION, fRecordCount
Constructor and Description |
---|
TLcdDAFIFILSDecoder(ALcdAISObjectFactory aFactory)
Deprecated.
|
TLcdDAFIFILSDecoder(ALcdAISObjectFactory aFactory,
Properties aDAFIFProperties)
Deprecated.
|
TLcdDAFIFILSDecoder(TLcdAISDataObjectFactory aFactory)
Constructs a new
TLcdDAFIFILSDecoder object. |
TLcdDAFIFILSDecoder(TLcdAISDataObjectFactory aFactory,
Properties aDAFIFProperties)
Constructs a new
TLcdDAFIFILSDecoder object. |
Modifier and Type | Method and Description |
---|---|
protected ILcdModelDescriptor |
createModelDescriptor(int aIndex,
String aSource)
Creates and returns the model descriptor to be set on the model with index aIndex
in the model (i.e. in the model returned in the
decode method). |
TLcdEditableModelListDescriptor |
createModelDescriptor(String aSource)
Creates and returns the model descriptor to be set on the model returned in the
decode method.
|
void |
createRequiredIndices(ILcdFeatureIndexedAnd2DBoundsIndexedModel aModel)
Adds two indices on the specified model of runways.
|
ILcdModel |
decode(String aSource)
Calls the decode method of
ALcdDAFIFMultiModelDecoder . |
String |
getDecodeFileName()
Returns the name of the file to be decoded.
|
String |
getDisplayName()
Returns a short, displayable name for the format that is decoded by this
ILcdModelDecoder . |
protected void |
handleRecord(int aFormat,
char[] aRecord)
Deals with one record of input.
|
void |
setDMEDefaultDisplayNameIndex(int aIndex)
Specifies the index of the feature to be the
DME display name.
|
void |
setDMEFeaturesToBeDecoded(String[] aDMEFeaturesToBeDecoded)
Specifies the features that should be decoded into the DME objects
of the modelList that will be returned by the
decode method. |
void |
setGlidePathDefaultDisplayNameIndex(int aIndex)
Specifies the index of the feature to be the
glide path display name.
|
void |
setGlidePathFeaturesToBeDecoded(String[] aGlidePathFeaturesToBeDecoded)
Specifies the features that should be decoded into the glide path objects
of the model that will be returned by the
decode method. |
void |
setLocalizerDefaultDisplayNameIndex(int aIndex)
Specifies the index of the feature to be the
localizer display name.
|
void |
setLocalizerFeaturesToBeDecoded(String[] aLocalizerFeaturesToBeDecoded)
Specifies the features that should be decoded into the localizer objects
of the model that will be returned by the
decode method. |
void |
setMarkerDefaultDisplayNameIndex(int aIndex)
Specifies the index of the feature to be the
marker display name.
|
void |
setMarkerFeaturesToBeDecoded(String[] aMarkerFeaturesToBeDecoded)
Specifies the features that should be decoded into the marker objects
of the model that will be returned by the
decode method. |
void |
setRunwayModel(ILcdFeatureIndexedAnd2DBoundsIndexedModel aRunwayModel)
Specifies a runway model.
|
cleanUp, getModelCount, postProcess, setKeyFeatureNames, setModelCount
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBounds, getDAFIFProperties, getDataObjectFactory, getDecodingBounds, getDomainFactory, getErrorMessage, setBounds, setDAFIFModelFilter, setDAFIFProperties, setDataObjectFactory, setDecodingBounds, setDomainFactory, setStoreOriginalReference
canDecodeSource, canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
@Deprecated public TLcdDAFIFILSDecoder(ALcdAISObjectFactory aFactory)
TLcdDAFIFILSDecoder
object. The user
should specify which domainFactory he or she wants to use to create the ILS objects.aFactory
- the factory to be used to create the model objectspublic TLcdDAFIFILSDecoder(TLcdAISDataObjectFactory aFactory)
TLcdDAFIFILSDecoder
object. The user
should specify which factory he or she wants to use to create the ILS objects.aFactory
- the factory to be used to create the model objects@Deprecated public TLcdDAFIFILSDecoder(ALcdAISObjectFactory aFactory, Properties aDAFIFProperties)
TLcdDAFIFILSDecoder
object.aFactory
- the factory to be used to create the model objectsaDAFIFProperties
- a Properties
object that contains for each domain object
the appropriate file namepublic TLcdDAFIFILSDecoder(TLcdAISDataObjectFactory aFactory, Properties aDAFIFProperties)
TLcdDAFIFILSDecoder
object.aFactory
- the factory to be used to create the model objectsaDAFIFProperties
- a Properties
object that contains for each domain object
the appropriate file namepublic String getDisplayName()
ILcdModelDecoder
ILcdModelDecoder
.getDisplayName
in interface ILcdModelDecoder
getDisplayName
in class ALcdDAFIFDecoder
ILcdModelDecoder
.public String getDecodeFileName()
ILcdDAFIFDecoder
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.
protected ILcdModelDescriptor createModelDescriptor(int aIndex, String aSource)
ALcdDAFIFMultiModelDecoder
decode
method).createModelDescriptor
in class ALcdDAFIFMultiModelDecoder
aSource
- the source to be decodedpublic TLcdEditableModelListDescriptor createModelDescriptor(String aSource)
ILcdDAFIFMultiModelDecoder
createModelDescriptor
in interface ILcdDAFIFMultiModelDecoder
createModelDescriptor
in class ALcdDAFIFMultiModelDecoder
aSource
- the source that will be used to build the modelpublic ILcdModel decode(String aSource) throws IOException
ALcdDAFIFMultiModelDecoder
.
Checks whether a runway model is set before starting the decode process.
If no runway model is specified, an IllegalStateException
object
will be thrown.
decode
in interface ILcdModelDecoder
decode
in class ALcdDAFIFMultiModelDecoder
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) or a .toc file
containing the Dafif properties (the data file should be in the same directory as the .toc file)IOException
- if an error occurs during the reading processIllegalStateException
- if no runway model has been specifiedILcdModelDecoder.canDecodeSource(String)
protected final void handleRecord(int aFormat, char[] aRecord)
ALcdDAFIFMultiModelDecoder
handleRecord
in class ALcdDAFIFMultiModelDecoder
aFormat
- the format of the recordaRecord
- the record to deal withpublic void setRunwayModel(ILcdFeatureIndexedAnd2DBoundsIndexedModel aRunwayModel)
aRunwayModel
- the runway model whose directions will be completed with an ILScreateRequiredIndices(com.luciad.model.ILcdFeatureIndexedAnd2DBoundsIndexedModel)
public void createRequiredIndices(ILcdFeatureIndexedAnd2DBoundsIndexedModel aModel)
setRunwayModel
method.
Please make sure that the following features were decoded into the model objects of the specified runway model:
aModel
- a model containing runwayssetRunwayModel(com.luciad.model.ILcdFeatureIndexedAnd2DBoundsIndexedModel)
public void setGlidePathDefaultDisplayNameIndex(int aIndex)
aIndex
- the index of the feature to be used as display namepublic void setMarkerDefaultDisplayNameIndex(int aIndex)
aIndex
- the index of the feature to be used as display namepublic void setDMEDefaultDisplayNameIndex(int aIndex)
aIndex
- the index of the feature to be used as display namepublic void setLocalizerDefaultDisplayNameIndex(int aIndex)
aIndex
- the index of the feature to be used as display namepublic void setDMEFeaturesToBeDecoded(String[] aDMEFeaturesToBeDecoded)
decode
method.
Please make sure that the AIRPORT_ID
, RUNWAY_ID
and COMPONENT_TYPE
features are in your list.
aDMEFeaturesToBeDecoded
- a list of features that should be decoded into the DME objectspublic void setLocalizerFeaturesToBeDecoded(String[] aLocalizerFeaturesToBeDecoded)
decode
method.
Please make sure that the AIRPORT_ID
, RUNWAY_ID
and COMPONENT_TYPE
features are in your list.
aLocalizerFeaturesToBeDecoded
- a list of features that should be decoded into the localizer objectspublic void setGlidePathFeaturesToBeDecoded(String[] aGlidePathFeaturesToBeDecoded)
decode
method.
Please make sure that the AIRPORT_ID
, RUNWAY_ID
and COMPONENT_TYPE
features are in your list.
aGlidePathFeaturesToBeDecoded
- a list of features that should be decoded into the glide path objectspublic void setMarkerFeaturesToBeDecoded(String[] aMarkerFeaturesToBeDecoded)
decode
method.
Please make sure that the AIRPORT_ID
, RUNWAY_ID
and COMPONENT_TYPE
features are in your list.
aMarkerFeaturesToBeDecoded
- a list of features that should be decoded into the marker objects