Class TLcdDAFIFILSDecoder

All Implemented Interfaces:
ILcdDAFIFDecoder, ILcdDAFIFMultiModelDecoder, ILcdInputStreamFactoryCapable, ILcdModelDecoder
Direct Known Subclasses:
TLcdDAFIFIndependentILSDecoder

public class TLcdDAFIFILSDecoder extends ALcdDAFIFMultiModelDecoder
This extension of the 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.

  • AIRPORT IDENTIFICATION: ILcdDAFIFGlidePathFeature.AIRPORT_ID, ILcdDAFIFGlidePathFeature.AIRPORT_ID, ILcdDAFIFLocalizerFeature.AIRPORT_ID, ILcdDAFIFMarkerFeature.AIRPORT_ID
  • RUNWAY IDENTIFIER: ILcdDAFIFDMEFeature.RUNWAY_ID, ILcdDAFIFGlidePathFeature.RUNWAY_ID, ILcdDAFIFLocalizerFeature.RUNWAY_ID, ILcdDAFIFMarkerFeature.RUNWAY_ID
  • COMPONENT TYPE: ILcdDAFIFDMEFeature.COMPONENT_TYPE, ILcdDAFIFGlidePathFeature.COMPONENT_TYPE, ILcdDAFIFLocalizerFeature.COMPONENT_TYPE, ILcdDAFIFMarkerFeature.COMPONENT_TYPE, ILcdMarkerFeature.MARKER_TYPE
  • COLLOCATION: ILcdDAFIFDMEFeature.COLLOCATION, ILcdDAFIFGlidePathFeature.COLLOCATION, ILcdDAFIFLocalizerFeature.COLLOCATION, ILcdDAFIFMarkerFeature.COLLOCATION
  • GLIDE SLOPE ANGLE: ILcdGlidePathFeature.GLIDE_PATH_ANGLE
  • NAME: ILcdDAFIFNavaidFeature.NAME, ILcdDAFIFGlidePathFeature.NAME, ILcdDAFIFLocalizerFeature.NAME, ILcdDAFIFMarkerFeature.NAME
  • MAGNETIC VARIATION: ILcdDAFIFNavaidFeature.MAGNETIC_VARIATION, ILcdDAFIFGlidePathFeature.MAGNETIC_VARIATION, ILcdDAFIFLocalizerFeature.MAGNETIC_VARIATION, ILcdDAFIFMarkerFeature.MAGNETIC_VARIATION
  • FREQUENCY: ILcdDAFIFDMEFeature.FREQUENCY, ILcdDAFIFDMEFeature.FREQUENCY_UNIT, ILcdGlidePathFeature.FREQUENCY, ILcdGlidePathFeature.FREQUENCY_UNIT, ILcdLocalizerFeature.FREQUENCY, ILcdLocalizerFeature.FREQUENCY_UNIT, ILcdMarkerFeature.FREQUENCY, ILcdMarkerFeature.FREQUENCY_UNIT
  • CHANNEL: ILcdDAFIFDMEFeature.CHANNEL
  • LOCALIZER OR GLIDE SLOPELOCATION: ILcdDAFIFGlidePathFeature.LOCATION, ILcdDAFIFLocalizerFeature.LOCATION
  • LOCATOR OR MARKER LOCATION: ILcdDAFIFMarkerFeature.LOCATION
  • ILS/MLS CATEGORY: ILcdDAFIFLocalizerFeature.ILS_MLS_CATEGORY
  • IDENTIFIER: ILcdNavaidFeature.IDENTIFIER, ILcdDAFIFGlidePathFeature.NAVAID_IDENTIFIER, ILcdDAFIFLocalizerFeature.NAVAID_IDENTIFIER, ILcdDAFIFMarkerFeature.NAVAID_IDENTIFIER
  • NAVAID TYPE: ILcdDAFIFNavaidFeature.TYPE, ILcdDAFIFGlidePathFeature.NAVAID_TYPE, ILcdDAFIFLocalizerFeature.NAVAID_TYPE, ILcdDAFIFMarkerFeature.NAVAID_TYPE
  • NAVAID COUNTRY CODE: ILcdDAFIFNavaidFeature.COUNTRY_CODE, ILcdDAFIFGlidePathFeature.NAVAID_COUNTRY_CODE, ILcdDAFIFLocalizerFeature.NAVAID_COUNTRY_CODE, ILcdDAFIFMarkerFeature.NAVAID_COUNTRY_CODE
  • NAVAID KEY CODE: ILcdDAFIFNavaidFeature.KEY_CODE, ILcdDAFIFGlidePathFeature.NAVAID_KEY_CODE, ILcdDAFIFLocalizerFeature.NAVAID_KEY_CODE, ILcdDAFIFMarkerFeature.NAVAID_KEY_CODE
  • ILS BEARING COURSE: ILcdDAFIFLocalizerFeature.ILS_BEARING, ILcdDAFIFLocalizerFeature.ILS_BEARING_TYPE
  • LOCALIZER WIDTH: ILcdLocalizerFeature.WIDTH
  • THRESHOLD CROSSING HEIGHT: ILcdDAFIFGlidePathFeature.THRESHOLD_CROSSING_HEIGTH
  • ILS DME BIAS: ILcdDAFIFDMEFeature.ILS_DME_BIAS, ILcdDAFIFDMEFeature.ILS_DME_BIAS_UNIT

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:
See Also:
  • Constructor Details

    • TLcdDAFIFILSDecoder

      @Deprecated public TLcdDAFIFILSDecoder(ALcdAISObjectFactory aFactory)
      Deprecated.
      Constructs a new TLcdDAFIFILSDecoder object. The user should specify which domainFactory he or she wants to use to create the ILS objects.
      Parameters:
      aFactory - the factory to be used to create the model objects
    • TLcdDAFIFILSDecoder

      public TLcdDAFIFILSDecoder(TLcdAISDataObjectFactory aFactory)
      Constructs a new TLcdDAFIFILSDecoder object. The user should specify which factory he or she wants to use to create the ILS objects.
      Parameters:
      aFactory - the factory to be used to create the model objects
    • TLcdDAFIFILSDecoder

      @Deprecated public TLcdDAFIFILSDecoder(ALcdAISObjectFactory aFactory, Properties aDAFIFProperties)
      Deprecated.
      Constructs a new TLcdDAFIFILSDecoder object.
      Parameters:
      aFactory - the factory to be used to create the model objects
      aDAFIFProperties - a Properties object that contains for each domain object the appropriate file name
    • TLcdDAFIFILSDecoder

      public TLcdDAFIFILSDecoder(TLcdAISDataObjectFactory aFactory, Properties aDAFIFProperties)
      Constructs a new TLcdDAFIFILSDecoder object.
      Parameters:
      aFactory - the factory to be used to create the model objects
      aDAFIFProperties - a Properties object that contains for each domain object the appropriate file name
  • Method Details

    • getDisplayName

      public String getDisplayName()
      Description copied from interface: ILcdModelDecoder
      Returns a short, displayable name for the format that is decoded by this ILcdModelDecoder.
      Specified by:
      getDisplayName in interface ILcdModelDecoder
      Overrides:
      getDisplayName in class ALcdDAFIFDecoder
      Returns:
      the displayable name of this ILcdModelDecoder.
    • getDecodeFileName

      public String getDecodeFileName()
      Description copied from interface: ILcdDAFIFDecoder
      Returns 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
    • createModelDescriptor

      protected ILcdModelDescriptor createModelDescriptor(int aIndex, String aSource)
      Description copied from class: ALcdDAFIFMultiModelDecoder
      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).
      Specified by:
      createModelDescriptor in class ALcdDAFIFMultiModelDecoder
      Parameters:
      aSource - the source to be decoded
      Returns:
      a model descriptor describing the data in the submodel at position aIndex in the model produced by this decoder
    • createModelDescriptor

      public TLcdEditableModelListDescriptor createModelDescriptor(String aSource)
      Description copied from interface: ILcdDAFIFMultiModelDecoder
      Creates and returns the model descriptor to be set on the model returned in the decode method.
      Specified by:
      createModelDescriptor in interface ILcdDAFIFMultiModelDecoder
      Specified by:
      createModelDescriptor in class ALcdDAFIFMultiModelDecoder
      Parameters:
      aSource - the source that will be used to build the model
      Returns:
      the model descriptor to be set on the model produced by this decoder
    • decode

      public ILcdModel decode(String aSource) throws IOException
      Calls the decode method of 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.

      Specified by:
      decode in interface ILcdModelDecoder
      Overrides:
      decode in class ALcdDAFIFMultiModelDecoder
      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) or a .toc file containing the Dafif properties (the data file should be in the same directory as the .toc file)
      Returns:
      the model build by reading the file found with aSource
      Throws:
      IOException - if an error occurs during the reading process
      IllegalStateException - if no runway model has been specified
      See Also:
    • handleRecord

      protected final void handleRecord(int aFormat, char[] aRecord)
      Description copied from class: ALcdDAFIFMultiModelDecoder
      Deals with one record of input.
      Specified by:
      handleRecord in class ALcdDAFIFMultiModelDecoder
      Parameters:
      aFormat - the format of the record
      aRecord - the record to deal with
    • setRunwayModel

      public void setRunwayModel(ILcdFeatureIndexedAnd2DBoundsIndexedModel aRunwayModel)
      Specifies a runway model. Please make sure there are two indices on this model!
      Parameters:
      aRunwayModel - the runway model whose directions will be completed with an ILS
      See Also:
    • createRequiredIndices

      public void createRequiredIndices(ILcdFeatureIndexedAnd2DBoundsIndexedModel aModel)
      Adds two indices on the specified model of runways. This method should be called before calling setRunwayModel method.

      Please make sure that the following features were decoded into the model objects of the specified runway model:

      • ILcdRunwayFeature.AERODROME_IDENTIFICATION,
      • ILcdRunwayFeature.HIGH_END_IDENTIFIER,
      • ILcdRunwayFeature.LOW_END_IDENTIFIER.
      If the features mentioned above weren't decoded into the runways, this method will cause exceptions to be thrown!
      Parameters:
      aModel - a model containing runways
      See Also:
    • setGlidePathDefaultDisplayNameIndex

      public void setGlidePathDefaultDisplayNameIndex(int aIndex)
      Specifies the index of the feature to be the glide path display name.
      Parameters:
      aIndex - the index of the feature to be used as display name
    • setMarkerDefaultDisplayNameIndex

      public void setMarkerDefaultDisplayNameIndex(int aIndex)
      Specifies the index of the feature to be the marker display name.
      Parameters:
      aIndex - the index of the feature to be used as display name
    • setDMEDefaultDisplayNameIndex

      public void setDMEDefaultDisplayNameIndex(int aIndex)
      Specifies the index of the feature to be the DME display name.
      Parameters:
      aIndex - the index of the feature to be used as display name
    • setLocalizerDefaultDisplayNameIndex

      public void setLocalizerDefaultDisplayNameIndex(int aIndex)
      Specifies the index of the feature to be the localizer display name.
      Parameters:
      aIndex - the index of the feature to be used as display name
    • setDMEFeaturesToBeDecoded

      public 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.

      Please make sure that the AIRPORT_ID, RUNWAY_ID and COMPONENT_TYPE features are in your list.

      Parameters:
      aDMEFeaturesToBeDecoded - a list of features that should be decoded into the DME objects
    • setLocalizerFeaturesToBeDecoded

      public 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.

      Please make sure that the AIRPORT_ID, RUNWAY_ID and COMPONENT_TYPE features are in your list.

      Parameters:
      aLocalizerFeaturesToBeDecoded - a list of features that should be decoded into the localizer objects
    • setGlidePathFeaturesToBeDecoded

      public 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.

      Please make sure that the AIRPORT_ID, RUNWAY_ID and COMPONENT_TYPE features are in your list.

      Parameters:
      aGlidePathFeaturesToBeDecoded - a list of features that should be decoded into the glide path objects
    • setMarkerFeaturesToBeDecoded

      public 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.

      Please make sure that the AIRPORT_ID, RUNWAY_ID and COMPONENT_TYPE features are in your list.

      Parameters:
      aMarkerFeaturesToBeDecoded - a list of features that should be decoded into the marker objects