Class TLcdDAFIFTAirspaceDecoder
- All Implemented Interfaces:
ILcdDAFIFSubTypeFilteringDecoder
,ILcdInputStreamFactoryCapable
,ILcdModelDecoder
ILcdModelDecoder
that decodes DAFIFT airspace objects from
the specified source directory. The decoded models have as model descriptor an instance of
TLcdDAFIFAirspaceModelDescriptor
. If subtype filtering
is enabled (via setSubTypesToDecode(int[])
), the decoder will produce a
TLcdModelList
with a TLcdDAFIFAirspaceModelListDescriptor
.
Each element of this model list will contain objects of one of the selected subtypes.
The number of models in the list, in other words, will equal the number of chosen
subtypes.
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 TLcdDAFIFTDataTypes.Airspace
,
which can also be retrieved through ILcdDataObject.getDataType()
.
The available properties of the objects are defined in TLcdDAFIFTAirspaceDataProperties
.
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 setAirspaceFeaturesToBeDecoded
method allows 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.
- BOUNDARY IDENTIFICATION:
ILcdDAFIFAirspaceFeature.BOUNDARY_IDENTIFICATION
- TYPE:
ILcdAirspaceFeature.TYPE
- NAME:
ILcdAirspaceFeature.NAME
- ICAO CODE:
ILcdDAFIFAirspaceFeature.ICAO_CODE
,ILcdDAFIFAirspaceFeature.ICAO_REGION
- CONTROLLING AUTHORITY:
ILcdDAFIFAirspaceFeature.CONTROLLING_AGENCY
- COMMUNICATIONS NAME:
ILcdDAFIFAirspaceFeature.COMMUNICATIONS_NAME
- COMMUNICATIONS FREQUENCY 1:
ILcdDAFIFAirspaceFeature.COMMUNICATIONS_FREQUENCY1
- COMMUNICATIONS FREQUENCY 2:
ILcdDAFIFAirspaceFeature.COMMUNICATIONS_FREQUENCY2
- CLASS:
ILcdAirspaceFeature.CLASS
- CLASS EXCEPTION REMARKS:
ILcdDAFIFAirspaceFeature.CLASS_EXCEPTION_REMARKS
- LEVEL:
ILcdDAFIFAirspaceFeature.LEVEL
- UPPER EFFECTIVE ALTITUDE:
ILcdAirspaceFeature.UPPER_LIMIT
,ILcdAirspaceFeature.UPPER_LIMIT_UNIT
,ILcdAirspaceFeature.UPPER_LIMIT_REFERENCE
- LOWER EFFECTIVE ALTITUDE:
ILcdAirspaceFeature.LOWER_LIMIT
,ILcdAirspaceFeature.LOWER_LIMIT_UNIT
,ILcdAirspaceFeature.LOWER_LIMIT_REFERENCE
- REQUIRED NAVIGATION PERFORMANCE:
ILcdDAFIFAirspaceFeature.RNP
- CYCLE DATE:
ILcdDAFIFAirspaceFeature.CYCLE_DATE
- ILcdDAFIFAirspaceFeature.BOUNDARY_IDENTIFICATION
- Since:
- 7.2
- See Also:
-
Constructor Summary
ConstructorDescriptionTLcdDAFIFTAirspaceDecoder
(ALcdAISObjectFactory aDomainFactory) Deprecated.Constructs a newTLcdDAFIFTAirspaceDecoder
object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canDecodeSource
(String aSource) Returnstrue
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 fileDecode the given source and return a TLcdModelList with a submodel per decoded subtype.Object[]
Get an array of enumerated values defining all subtypes of a given DAFIF feature type.Returns the factory that is used to create domain objects.Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder
.Deprecated.Returns the error message of the last decode call.Returns the input stream factory that is currently used for creating the input streams for the given source names.int
Returns the number of error reports to be added to the error message.Returns the record filter that is currently used.int[]
Returns the set of airspace types to be decoded.String[]
Returns the array ofString
objects containing the names of the features that will be used as a unique key to insert objects into the model.void
setAirspaceDefaultDisplayNameIndex
(int aIndex) Specifies the index of the feature to be the airspace display name.void
setAirspaceFeaturesToBeDecoded
(String[] aFeaturesToBeDecoded) Specifies the airspace features to be decoded into the model objects.void
setAirspaceTypeToFilter
(TLcdAirspaceType aAirspaceTypeToFilter) Set the airspace type to be filtered on, ie all other types of airspaces will be filtered out.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
setModelFilter
(ILcdDAFIFModelFilter aFilter) Set the model filter of this decoder.void
setRecordFilter
(ILcdDAFIFTRecordFilter aRecordFilter) Specifies a filter to be used while creating the model.void
setSubTypesToDecode
(int[] aTypes) Set the set of airspace types to be decoded.Methods inherited from class com.luciad.format.dafift.decoder.ALcdDAFIFTModelDecoder
getDecodingBounds, getModelFilter, setDecodingBounds
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.model.ILcdModelDecoder
canDecodeSource, canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
-
Constructor Details
-
TLcdDAFIFTAirspaceDecoder
Deprecated.Constructs a newTLcdDAFIFTAirspaceDecoder
object. The user should specify which aDomainFactory he or she wants to use to create the airspaces.- Parameters:
aDomainFactory
- The factory to be used to create the model objects.
-
TLcdDAFIFTAirspaceDecoder
Constructs a newTLcdDAFIFTAirspaceDecoder
object. The user should specify which factory he or she wants to use to create the airspaces.- Parameters:
aFactory
- The factory to be used to create the model objects.
-
-
Method Details
-
getAvailableSubTypes
Get an array of enumerated values defining all subtypes of a given DAFIF feature type. Note : This array MUST NOT be modified. SeesetSubTypesToDecode(int[])
.- Specified by:
getAvailableSubTypes
in interfaceILcdDAFIFSubTypeFilteringDecoder
- Returns:
- an array of enumerated values defining subtypes of a given DAFIF feature type.
-
setSubTypesToDecode
public void setSubTypesToDecode(int[] aTypes) Set the set of airspace types to be decoded.- Specified by:
setSubTypesToDecode
in interfaceILcdDAFIFSubTypeFilteringDecoder
- Parameters:
aTypes
- an array of indices specifying which type of airspace will be decoded. Ifnull
is passed, reset to the default types.
-
getSubTypesToDecode
public int[] getSubTypesToDecode()Returns the set of airspace types to be decoded.By default,
null
is returned, indicating that all available airspace types are decoded.- Specified by:
getSubTypesToDecode
in interfaceILcdDAFIFSubTypeFilteringDecoder
- Returns:
- the set of airspace types to be decoded.
-
setAirspaceTypeToFilter
Set the airspace type to be filtered on, ie all other types of airspaces will be filtered out. This is equivalent to callingsetSubTypesToDecode(int[])
with an array containing the index of the given type in the array of available subtypes.- Parameters:
aAirspaceTypeToFilter
- The airspace type to be filtered on.
-
setModelFilter
Set the model filter of this decoder. The given filter is combined to the airspace type filtering.- Overrides:
setModelFilter
in classALcdDAFIFTModelDecoder
- Parameters:
aFilter
- The model filter that should be passed before a model object is added to the resulting model.- See Also:
-
decode
Decode the given source and return a TLcdModelList with a submodel per decoded subtype.- Specified by:
decode
in interfaceILcdModelDecoder
- Parameters:
aSourceName
- a DAFIF edition 8 source name- Returns:
- a TLcdModelList with one model per decoded subtype.
- Throws:
IOException
- if the decoding cannot complete.- See Also:
-
getDisplayName
Description copied from interface:ILcdModelDecoder
Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder
.- Specified by:
getDisplayName
in interfaceILcdModelDecoder
- Overrides:
getDisplayName
in classALcdDAFIFTModelDecoder
- Returns:
- the displayable name of this
ILcdModelDecoder
.
-
setAirspaceDefaultDisplayNameIndex
public void setAirspaceDefaultDisplayNameIndex(int aIndex) Specifies the index of the feature to be the airspace display name.- Parameters:
aIndex
- The index of the feature to be the airspace display name.
-
setAirspaceFeaturesToBeDecoded
Specifies the airspace features to be decoded into the model objects. Please add theBOUNDARY_IDENTIFICATION
feature to your list. This feature corresponds to the unique key feature name of an airspace model object. If you want to filter on an airspace type, you should also include the airspace featureILcdAirspaceFeature.TYPE
into your list.- Parameters:
aFeaturesToBeDecoded
- A list of features that should be decoded into the airspace model objects.
-
getUniqueKeyFeatureNames
Returns the array ofString
objects containing the names of the features that will be used as a unique key to insert objects into the model.- Returns:
- the array of
String
objects containing the names of the features that will be used as a unique key to insert objects into the model.
-
canDecodeSource
Returnstrue
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
- Parameters:
aSource
- the name of the source file or directory that you want to decode- Returns:
- a boolean indicating whether the given source can be decoded
-
getDomainFactory
Deprecated.Returns the factory that is used to create domain objects.- Returns:
- the factory that is used to create domain objects.
- See Also:
-
setDomainFactory
Deprecated.Specifies the domain factory. The domain factory will be used to create the domain objects decoded by this DAFIFT decoder.- Parameters:
aDomainFactory
- The factory that will be used to create domain objects.- See Also:
-
getDataObjectFactory
Returns the factory that is used to create domain objects.- Returns:
- the factory that is used to create domain objects.
- See Also:
-
setDataObjectFactory
Specifies the data factory. The data factory will be used to create the domain objects decoded by this DAFIFT decoder. Decoders equipped with a data object factory that is notnull
, will NOT use their associated domain factory (seegetDomainFactory()
).- Parameters:
aFactory
- The factory that will be used to create domain objects.- See Also:
-
getInputStreamFactory
Returns the input stream factory that is currently used for creating the input streams for the given source names.- Specified by:
getInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Returns:
- the input stream factory that is currently used.
- See Also:
-
setInputStreamFactory
Sets the input stream factory that will be used for creating the input streams for the given source names.- Specified by:
setInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Parameters:
aInputStreamFactory
- The input stream factory to be used.- See Also:
-
getRecordFilter
Returns the record filter that is currently used.- Returns:
- the record filter that is currently used.
- See Also:
-
setRecordFilter
Specifies a filter to be used while creating the model. Only records that pass through this filter will be decoded into model objects.- Parameters:
aRecordFilter
- The record filter that should be passed before a record can be decoded.- See Also:
-
getMaxNumberOfErrorReports
public int getMaxNumberOfErrorReports()Returns the number of error reports to be added to the error message. If there are more errors than the maxNumberOfErrorReports property, they won't be stored and you won't be able to see these errors in the error message after the decoding process.- Returns:
- the number of error reports to be added to the error message.
- See Also:
-
setMaxNumberOfErrorReports
public void setMaxNumberOfErrorReports(int aMaxNumberOfErrorReports) Specifies a value for the maximum number of error reports. If a negative value is set, all reported errors will be added to the error message.- Parameters:
aMaxNumberOfErrorReports
- The maximum number of error reports to be added to the error message.- See Also:
-
getErrorMessage
Returns the error message of the last decode call. Note that the error message can only be retrieved once after a decode call.- Returns:
- a
String
object containing the errors occurred during the last decode process.
-
getDataObjectFactory()