Class TLcdDAFIFTDataPreparatorMain

java.lang.Object
com.luciad.format.dafift.tools.TLcdDAFIFTDataPreparatorMain
All Implemented Interfaces:
ILcdStatusSource

public class TLcdDAFIFTDataPreparatorMain extends Object implements ILcdStatusSource
A tool to split large DAFIFT files into smaller ones. The division of the DAFIFT data is based on the two letter ICAO region found in some records and the corresponding object identifiers (e.g. aerodrome id, airspace id,...).

Given a directory containing one or more DAFIFT files, the TLcdDAFIFTDataPreparatorMain class will create a directory tree. The top directory, that should be specified in the config file, will contain a sub directory for each ICAO region found in the source data. Each sub directory contains

  • the records having the ICAO region mentioned in the sub directory's name, organized in files having the same names as the source files and
  • a file named dafift.toc, containing the property: icao.region=<ICAO code>. This code represents the ICAO region of this data structure.

Besides reorganizing a given data set, the TLcdDAFIFDataPreparatorMain class also writes a dafift.toc file into the top directory. This dafif.toc properties file is empty.

The result of running the TLcdDAFIFTDataPreparatorMain class will look like this:

     - <split_directory>
            - AG
              - ARPT
                ACOM.TXT
                ACOM_RMK.TXT
                ...
              - BDRY
                BDRY.TXT
                BDRY_PAR.TXT
                ...
              ...
              dafift.toc
            - AN
              - ARPT
                ACOM.TXT
                ACOM_RMK.TXT
                ...
              - BDRY
                BDRY.TXT
                BDRY_PAR.TXT
                ...
              ...
              dafift.toc
            ...
            dafift.toc
 

Note that entities, such as waypoints and routes, are not split independently. This means, for example, that when a certain route depends on waypoints not in its own ICAO region, this waypoint will be added to the waypoint file for this region, and the affected route segments will be added to the route.

Since:
7.2
  • Constructor Details

    • TLcdDAFIFTDataPreparatorMain

      public TLcdDAFIFTDataPreparatorMain()
  • Method Details

    • addStatusListener

      public void addStatusListener(ILcdStatusListener aListener)
      Adds an ILcdStatusListener, which will be triggered with progress messages during the data preparation process.
      Specified by:
      addStatusListener in interface ILcdStatusSource
      Parameters:
      aListener - an ILcdStatusListener
    • removeStatusListener

      public void removeStatusListener(ILcdStatusListener aListener)
      Removes the specified status listener.
      Specified by:
      removeStatusListener in interface ILcdStatusSource
      Parameters:
      aListener - an ILcdStatusListener
    • isTraceOn

      public static boolean isTraceOn()
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Returns true if tracing is enabled for this class.
      Returns:
      true if tracing is enabled for this class, false otherwise.
    • setTraceOn

      public static void setTraceOn(boolean aTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for this class instance. Calling this method with either true or false as argument automatically turns off tracing for all other class instances for which setTraceOn has not been called. If the argument is false then only the informative, warning and error log messages are recorded.
      Parameters:
      aTraceOn - if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
    • getDecoderErrorMessages

      public String getDecoderErrorMessages()
      Returns the concatenated error messages of the different decoders used to split the DAFIFT data. This message is available (and changed) after each prepareData call.
      Returns:
      the concatenated error messages of the different decoders used to split the DAFIFT data
    • setProperties

      public void setProperties(Properties aProperties)
      Specifies a properties object. This properties object should contain
      • the source directory or a directory that can be used as initial directory of a fileChooser,
      • the destination directory.
      Parameters:
      aProperties - the properties object to be used during the splitting process
      See Also:
    • prepareData

      public void prepareData()
      Separates all DAFIFT data files found in the source directory over a set of subdirectories. Each sub directory contains the data located in a certain ICAO region.

      The data in each sub directory is organized in files like the data in the source directory (same file names are used).

    • main

      public static void main(String[] aArguments)
      Configures the data preparator and starts the data preparing process.

      To configure the data preparator, the user should specify the path to a configuration file on the command line. This configuration file should contain the following attributes:

      • filechooser_initial_directory : specifies the base directory for the file chooser that will be used to choose the source directory. The user should define this attribute or the fullall_directory attribute.
      • fullall_directory : specifies the path to the source directory. The user should define this attribute or the filechooser_initial_directory attribute.
      • split_directory : specifies the top directory for the result of the splitting process.
      Parameters:
      aArguments - The main argument list.