public class TLcdDAFIFAerodromeNavaidDecoder extends ALcdDAFIFMultiModelDecoder
ALcdDAFIFMultiModelDecoder
decodes
navaids (VOR, DME, NDB, TACAN, VOR-DME, VORTAC and NDB-DME) from a DAFIF source file.
Decoded models have as model descriptor an instance of TLcdDAFIFAerodromeNavaidModelListDescriptor
.
This descriptor contains instances of TLcdDAFIFDMEModelDescriptor
,
TLcdDAFIFVORModelDescriptor
, TLcdDAFIFNDBModelDescriptor
and/or TLcdDAFIFTACANModelDescriptor
, dependent of the source file.
The navaids produced by this decoder are a subset from the collection of navaids decoded
by the
. To be in the subset, a navaid
should:
TLcdDAFIFNavaidDecoder
The TLcdDAFIFAerodromeNavaidDecoder
won't create navaids itself. It
will retrieve the navaids for its model from a navaid model.
A navaid model should be set by using the setNavaidModel
method.
This model should have an index on some key features that uniquely define the objects.
For navaids the key features are:
createRequiredIndices
method.
The features mentioned above should be decoded into the featured model objects of the navaid model.DAFIF_PROP_EXTENSION, fRecordCount
Constructor and Description |
---|
TLcdDAFIFAerodromeNavaidDecoder(ALcdAISObjectFactory aFactory)
Deprecated.
|
TLcdDAFIFAerodromeNavaidDecoder(ALcdAISObjectFactory aFactory,
Properties aDAFIFProperties)
Deprecated.
|
TLcdDAFIFAerodromeNavaidDecoder(TLcdAISDataObjectFactory aFactory)
Constructs a new
TLcdDAFIFAerodromeNavaidDecoder object. |
TLcdDAFIFAerodromeNavaidDecoder(TLcdAISDataObjectFactory aFactory,
Properties aDAFIFProperties)
Constructs a new
TLcdDAFIFAerodromeNavaidDecoder 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(TLcdModelList aModelList)
Adds an index on the sub models of the specified navaid modelList.
|
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 |
setNavaidModel(TLcdModelList aNavaidModel)
Specifies a modelList of navaids.
|
void |
setNDBDefaultDisplayNameIndex(int aIndex)
Specifies the index of the feature to be the
NDB display name.
|
void |
setTACANDefaultDisplayNameIndex(int aIndex)
Specifies the index of the feature to be the
TACAN display name.
|
void |
setVORDefaultDisplayNameIndex(int aIndex)
Specifies the index of the feature to be the
VOR display name.
|
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 TLcdDAFIFAerodromeNavaidDecoder(ALcdAISObjectFactory aFactory)
TLcdDAFIFAerodromeNavaidDecoder
object. The domainFactory
specified here, may be null.aFactory
- a domainFactory that won't be used.TLcdDAFIFIndependentAerodromeNavaidDecoder
public TLcdDAFIFAerodromeNavaidDecoder(TLcdAISDataObjectFactory aFactory)
TLcdDAFIFAerodromeNavaidDecoder
object. The domainFactory
specified here, may be null.aFactory
- a domainFactory that won't be used.TLcdDAFIFIndependentAerodromeNavaidDecoder
@Deprecated public TLcdDAFIFAerodromeNavaidDecoder(ALcdAISObjectFactory aFactory, Properties aDAFIFProperties)
TLcdDAFIFAerodromeNavaidDecoder
object.aFactory
- a domainFactory that won't be used.aDAFIFProperties
- a Properties
object that contains for each domain object
the appropriate file nameTLcdDAFIFIndependentAerodromeNavaidDecoder
public TLcdDAFIFAerodromeNavaidDecoder(TLcdAISDataObjectFactory aFactory, Properties aDAFIFProperties)
TLcdDAFIFAerodromeNavaidDecoder
object.aFactory
- a domainFactory that won't be used.aDAFIFProperties
- a Properties
object that contains for each domain object
the appropriate file nameTLcdDAFIFIndependentAerodromeNavaidDecoder
public 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.
public ILcdModel decode(String aSource) throws IOException
ALcdDAFIFMultiModelDecoder
.
Checks whether a navaid model is set before starting the decode process.
If no navaid 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 navaid 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 withprotected 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 void setVORDefaultDisplayNameIndex(int aIndex)
aIndex
- the index of the feature to be used as display namepublic void setTACANDefaultDisplayNameIndex(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 setNDBDefaultDisplayNameIndex(int aIndex)
aIndex
- the index of the feature to be used as display namepublic void setNavaidModel(TLcdModelList aNavaidModel)
Please make sure there's a unique index on this modelList!
aNavaidModel
- a modelList containing navaidscreateRequiredIndices(com.luciad.model.TLcdModelList)
public void createRequiredIndices(TLcdModelList aModelList)
This method should be called before calling setNavaidModel
method.
Please make sure that the following features were decoded into the model objects of the specified navaid modellist:
aModelList
- a modelList containing navaidssetNavaidModel(com.luciad.model.TLcdModelList)