Class TLcdDAFIFIndependentHoldingDecoder

All Implemented Interfaces:
ILcdDAFIFDecoder, ILcdInputStreamFactoryCapable, ILcdModelDecoder

public class TLcdDAFIFIndependentHoldingDecoder extends TLcdDAFIFHoldingDecoder
This extension of the TLcdDAFIFHoldingDecoder class can be used to produce a model without having to specify a waypoint model first. Decoded models have as model descriptor an instance of TLcdDAFIFHoldingModelDescriptor.

The TLcdDAFIFIndependentHoldingDecoder will decode the waypoints himself. The waypoints used in the final model will be retrieved from this self-made model.

To decode a waypoint model, the TLcdDAFIFIndependentHoldingDecoder will look for a waypoint source file in the same directory as the source file to be decoded. If no waypoint source file is found in this directory, or the waypoint source file does not cover the waypoints needed to build the holding patterns, exceptions will occur during the decode process.

See Also:
  • Constructor Details

    • TLcdDAFIFIndependentHoldingDecoder

      @Deprecated public TLcdDAFIFIndependentHoldingDecoder(ALcdAISObjectFactory aDomainFactory)
      Deprecated.
      Creates a new TLcdDAFIFIndependentHoldingDecoder object. The user should specify which domainFactory he or she wants to use to create the waypoints and the holding patterns.
      Parameters:
      aDomainFactory - the factory to be used to create the waypoints and the holding patterns
    • TLcdDAFIFIndependentHoldingDecoder

      public TLcdDAFIFIndependentHoldingDecoder(TLcdAISDataObjectFactory aDomainFactory)
      Creates a new TLcdDAFIFIndependentHoldingDecoder object. The user should specify which domainFactory he or she wants to use to create the waypoints and the holding patterns.
      Parameters:
      aDomainFactory - the factory to be used to create the waypoints and the holding patterns
    • TLcdDAFIFIndependentHoldingDecoder

      @Deprecated public TLcdDAFIFIndependentHoldingDecoder(ALcdAISObjectFactory aDomainFactory, Properties aDAFIFProperties)
      Deprecated.
      Creates a new TLcdDAFIFIndependentHoldingDecoder object. The user should specify which domainFactory he or she wants to use to create the waypoints and the holding patterns.
      Parameters:
      aDomainFactory - the factory to be used to create the waypoints and the holding patterns
      aDAFIFProperties - a Properties object that contains for each domain object the appropriate file name
    • TLcdDAFIFIndependentHoldingDecoder

      public TLcdDAFIFIndependentHoldingDecoder(TLcdAISDataObjectFactory aDomainFactory, Properties aDAFIFProperties)
      Creates a new TLcdDAFIFIndependentHoldingDecoder object. The user should specify which domainFactory he or she wants to use to create the waypoints and the holding patterns.
      Parameters:
      aDomainFactory - the factory to be used to create the waypoints and the holding patterns
      aDAFIFProperties - a Properties object that contains for each domain object the appropriate file name
  • Method Details

    • canDecodeSource

      public boolean canDecodeSource(String aSource)
      Tests whether the canDecodeSource method of all decoders on which this decoder depends return true.

      Furthermore, the specified source should be a .toc file, or it should be a directory containing a file with the result of the getDecodeFileName method as file name.

      Specified by:
      canDecodeSource in interface ILcdModelDecoder
      Overrides:
      canDecodeSource in class ALcdDAFIFDecoder
      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
      See Also:
    • decode

      public ILcdModel decode(String aSource) throws IOException
      Creates a waypoint model first. This waypoint model will be decoded using aSource. Then the decode method of the TLcdDAFIFHoldingDecoder class is called.
      Specified by:
      decode in interface ILcdModelDecoder
      Overrides:
      decode in class TLcdDAFIFHoldingDecoder
      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
      See Also: