public class TLcdDAFIFTVFRRouteDecoder extends ALcdDAFIFTModelDecoder
ILcdModelDecoder
that decodes DAFIFT VFR route objects from
the specified source directory. The decoded models have as model descriptor an instance of
TLcdDAFIFVFRRouteModelListDescriptor
.
The resulting model list will contain submodels for:
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 TLcdDAFIFTDataTypes.VFRRoute
,
TLcdDAFIFTDataTypes.VFROffsetRoute
and TLcdDAFIFTDataTypes.VFRRoutePoint
,
which can also be retrieved through ILcdDataObject.getDataType()
.
The available properties of the objects are defined in TLcdDAFIFTVFRRouteDataProperties
,
TLcdDAFIFTVFROffsetRouteDataProperties
and TLcdDAFIFTVFRRoutePointDataProperties
.
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.
VFR route data includes data about aerodromes, served by the VFR and offset routes. To decode
the available aerodrome information as well, use the setAddAerodromes
method. For the aerodromes, there is no feature selection possible. All aerodrome features will
be decoded.
setVFRRouteFeaturesToBeDecoded
and setOffsetRouteFeaturesToBeDecoded
methods allow the user to
specify which DAFIFT features are to be decoded into the featured model objects. If no features
are specified, all features will be decoded.
The following fields (which are taken from the National Imagery and Mapping Agency (NIMA)
Product Specifications for Digital Aeronautical Flight Information File (DAFIF), Eight Edition,
January 2005) are supported by the decoder. The list indicates into which feature the fields
are decoded. For VFR Arrival/Departure route fields:
ILcdDAFIFVFRRouteFeature.AIRPORT_ID
ILcdDAFIFVFRRouteFeature.ICAO_CODE
ILcdDAFIFVFRRouteFeature.CYCLE_DATE
ILcdDAFIFVFRRoutePointFeature.POINT_NAME
ILcdDAFIFVFRRoutePointFeature.POINT_IDENTITY
ILcdDAFIFVFRRoutePointFeature.UTM_COORDINATES
ILcdDAFIFVFRRoutePointFeature.POINT_TYPE
ILcdDAFIFVFRRoutePointFeature.POINT_SYMBOL
ILcdDAFIFVFRRoutePointFeature.AT_HELIPORT_AIRPORT
ILcdDAFIFVFRRoutePointFeature.SEGMENT_NAME
ILcdDAFIFVFRRoutePointFeature.COURSE
,
ILcdDAFIFVFRRoutePointFeature.COURSE_TYPE
ILcdDAFIFVFRRoutePointFeature.PATH_CODE
ILcdDAFIFVFRRoutePointFeature.ALTITUDE_DESCRIPTION_CODE
ILcdDAFIFVFRRoutePointFeature.ALTITUDE
,
ILcdDAFIFVFRRoutePointFeature.ALTITUDE_UNIT
ILcdDAFIFVFRRoutePointFeature.TURN_DIRECTION
ILcdDAFIFVFRRouteFeature
,
TLcdDAFIFVFRRouteModelListDescriptor
,
ILcdDAFIFVFRRoutePointFeature
Constructor and Description |
---|
TLcdDAFIFTVFRRouteDecoder(ALcdAISObjectFactory aDomainFactory)
Deprecated.
|
TLcdDAFIFTVFRRouteDecoder(ALcdAISObjectFactory aDomainFactory,
boolean aAddAerodromes)
Deprecated.
|
TLcdDAFIFTVFRRouteDecoder(TLcdAISDataObjectFactory aFactory)
Constructs a new
TLcdDAFIFTVFRRouteDecoder object. |
TLcdDAFIFTVFRRouteDecoder(TLcdAISDataObjectFactory aFactory,
boolean aAddAerodromes)
Constructs a new
TLcdDAFIFTVFRRouteDecoder object. |
Modifier and Type | Method and Description |
---|---|
boolean |
canDecodeSource(String aSource)
Returns
true if the specified source is:
A file with the specific name corresponding to the object type of this decoder
A directory containing such a file
A .toc file in a directory, pointing to such a file
|
ILcdModel |
decode(String aSource)
Returns a model list containing one or more submodels.
|
TLcdAISDataObjectFactory |
getDataObjectFactory()
Returns the factory that is used to create domain objects.
|
String |
getDisplayName()
Returns a short, displayable name for the format that is decoded by this
ILcdModelDecoder . |
ALcdAISObjectFactory |
getDomainFactory()
Deprecated.
|
String |
getErrorMessage()
Returns the error message of the last decode call.
|
ILcdInputStreamFactory |
getInputStreamFactory()
Returns the input stream factory that is currently used for creating
the input streams for the given source names.
|
int |
getMaxNumberOfErrorReports()
Returns the number of error reports to be added to the error message.
|
ILcdDAFIFTRecordFilter |
getRecordFilter()
Returns the record filter that is currently used.
|
String[] |
getUniqueKeyFeatureNames(int aIndex)
Returns for the given submodel the array of
String objects containing the names
of the features that will be used as a unique key to insert objects into the submodel. |
boolean |
isAddAerodromes()
Returns a boolean indicating whether the submodel of aerodromes will be added or not.
|
void |
setAddAerodromes(boolean aValue)
Specifies whether a submodel of aerodromes should be added.
|
void |
setDataObjectFactory(TLcdAISDataObjectFactory aFactory)
Specifies the data factory.
|
void |
setDomainFactory(ALcdAISObjectFactory aDomainFactory)
Deprecated.
|
void |
setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
Sets the input stream factory that will be used for creating the
input streams for the given source names.
|
void |
setMaxNumberOfErrorReports(int aMaxNumberOfErrorReports)
Specifies a value for the maximum number of error reports.
|
void |
setOffsetRouteDefaultDisplayNameIndex(int aIndex)
Specifies the index of the feature to be the offset route display name.
|
void |
setOffsetRouteFeaturesToBeDecoded(String[] aFeaturesToBeDecoded)
Specifies the offset route features to be decoded into the model objects.
|
void |
setRecordFilter(ILcdDAFIFTRecordFilter aRecordFilter)
Specifies a filter to be used while creating the model.
|
void |
setVFRRouteDefaultDisplayNameIndex(int aIndex)
Specifies the index of the feature to be the VFR route display name.
|
void |
setVFRRouteFeaturesToBeDecoded(String[] aFeaturesToBeDecoded)
Specifies the VFR route features to be decoded into the model objects.
|
getDecodingBounds, getModelFilter, setDecodingBounds, setModelFilter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canDecodeSource, canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
@Deprecated public TLcdDAFIFTVFRRouteDecoder(ALcdAISObjectFactory aDomainFactory)
TLcdDAFIFTVFRRouteDecoder
object. The user should specify which
aDomainFactory he or she wants to use to create the VFR routes, the aerodromes and the heliports.
The addAerodromes property will be set to true
.aDomainFactory
- The factory to be used to create the model objects.public TLcdDAFIFTVFRRouteDecoder(TLcdAISDataObjectFactory aFactory)
TLcdDAFIFTVFRRouteDecoder
object. The user should specify which
factory he or she wants to use to create the VFR routes, the aerodromes and the heliports.
The addAerodromes property will be set to true
.aFactory
- The factory to be used to create the model objects.@Deprecated public TLcdDAFIFTVFRRouteDecoder(ALcdAISObjectFactory aDomainFactory, boolean aAddAerodromes)
TLcdDAFIFTVFRRouteDecoder
object. The user should specify which
aDomainFactory he or she wants to use to create the VFR routes, the aerodromes and the heliports.aDomainFactory
- The factory to be used to create the model objects.aAddAerodromes
- A boolean
indicating whether a submodel containing
the aerodromes should be added or not.public TLcdDAFIFTVFRRouteDecoder(TLcdAISDataObjectFactory aFactory, boolean aAddAerodromes)
TLcdDAFIFTVFRRouteDecoder
object. The user should specify which
aDomainFactory he or she wants to use to create the VFR routes, the aerodromes and the heliports.aFactory
- The factory to be used to create the model objects.aAddAerodromes
- A boolean
indicating whether a submodel containing
the aerodromes should be added or not.public String getDisplayName()
ILcdModelDecoder
ILcdModelDecoder
.getDisplayName
in interface ILcdModelDecoder
getDisplayName
in class ALcdDAFIFTModelDecoder
ILcdModelDecoder
.public ILcdModel decode(String aSource) throws IOException
getRecordFilter()
) will be decoded.
A decoded record needs to pass two additional filters (a model filter getModelFilter()
and a bounds filter getDecodingBounds()
) before
it can be added to the model.
Furthermore, an error message will be initialized and filled with reports about errors occurred
during the decode process. By default, all reports will be added into the error message. The
method setMaxNumberOfErrorReports(int)
can be used to adjust this setting.
If the property 'addAerodrome' is set to true
, the aerodrome and heliport model
are decoded first, before the actual decoding starts.decode
in interface ILcdModelDecoder
aSource
- Either the directory containing the DAFIFT source file to decode
or the DAFIFT source file itself.IOException
- if an error occurs during the reading process.ILcdModelDecoder.canDecodeSource(String)
public void setVFRRouteDefaultDisplayNameIndex(int aIndex)
aIndex
- The index of the feature to be the VFR route display name.public void setOffsetRouteDefaultDisplayNameIndex(int aIndex)
aIndex
- The index of the feature to be the offset route display name.public void setVFRRouteFeaturesToBeDecoded(String[] aFeaturesToBeDecoded)
AIRPORT_ID
and ROUTE_ID
features are in your list of features to be decoded!aFeaturesToBeDecoded
- A list of features that should be decoded into the VFR route model objects.public void setOffsetRouteFeaturesToBeDecoded(String[] aFeaturesToBeDecoded)
AIRPORT_ID
and ROUTE_ID
features are in your list of features to be decoded!aFeaturesToBeDecoded
- A list of features that should be decoded into the offset route model objects.public boolean isAddAerodromes()
true
, an extra submodel will be created.
This model will contain the aerodromes for which a VFR route serves.
The aerodromes in the model are retrieved from the aerodrome and the heliport model
decoded by this decoder using the source directory to be decoded.setAddAerodromes(boolean)
public void setAddAerodromes(boolean aValue)
aValue
- A flag indicating if a submodel of aerodromes should be added.isAddAerodromes()
public String[] getUniqueKeyFeatureNames(int aIndex)
String
objects containing the names
of the features that will be used as a unique key to insert objects into the submodel.aIndex
- The index of the submodel whose unique key feature names are being retrieved.public boolean canDecodeSource(String aSource)
true
if the specified source is:
.toc
file in a directory, pointing to such a fileaSource
- the name of the source file or directory that you want to decode@Deprecated public ALcdAISObjectFactory getDomainFactory()
getDataObjectFactory()
setDomainFactory(ALcdAISObjectFactory)
@Deprecated public void setDomainFactory(ALcdAISObjectFactory aDomainFactory)
setDataObjectFactory(TLcdAISDataObjectFactory)
aDomainFactory
- The factory that will be used to create domain objects.getDomainFactory()
public TLcdAISDataObjectFactory getDataObjectFactory()
setDomainFactory(ALcdAISObjectFactory)
public void setDataObjectFactory(TLcdAISDataObjectFactory aFactory)
null
, will
NOT use their associated domain factory (see getDomainFactory()
).aFactory
- The factory that will be used to create domain objects.getDomainFactory()
public ILcdInputStreamFactory getInputStreamFactory()
getInputStreamFactory
in interface ILcdInputStreamFactoryCapable
setInputStreamFactory(ILcdInputStreamFactory)
public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
setInputStreamFactory
in interface ILcdInputStreamFactoryCapable
aInputStreamFactory
- The input stream factory to be used.getInputStreamFactory()
public ILcdDAFIFTRecordFilter getRecordFilter()
setRecordFilter(ILcdDAFIFTRecordFilter)
public void setRecordFilter(ILcdDAFIFTRecordFilter aRecordFilter)
aRecordFilter
- The record filter that should be passed before a record
can be decoded.getRecordFilter()
public int getMaxNumberOfErrorReports()
setMaxNumberOfErrorReports(int)
public void setMaxNumberOfErrorReports(int aMaxNumberOfErrorReports)
aMaxNumberOfErrorReports
- The maximum number of error reports to be added to the error message.getMaxNumberOfErrorReports()
public String getErrorMessage()
String
object containing the errors occurred during
the last decode process.