Class TLcdDAFIFTICAORegionFilter

java.lang.Object
com.luciad.format.dafift.decoder.TLcdDAFIFTICAORegionFilter
All Implemented Interfaces:
ILcdDAFIFTRecordFilter

public class TLcdDAFIFTICAORegionFilter extends Object implements ILcdDAFIFTRecordFilter
Implementation of ILcdDAFIFTRecordFilter that allows to filter DAFIFT records on a list of ICAO regions. An ICAO region is a two letter code such as EB (Belgium), ... This code refers to the country or the region in which an object is defined.
Since:
7.2
  • Constructor Details

    • TLcdDAFIFTICAORegionFilter

      public TLcdDAFIFTICAORegionFilter(String[] aICAORegions)
      Creates a new DAFIFT record filter which filters on the given ICAO regions.
      Parameters:
      aICAORegions - An array of ICAO regions to filter on.
      Throws:
      IllegalArgumentException - if the argument is null.
  • Method Details

    • accept

      public boolean accept(String[] aRecord, String aFileName)
      Description copied from interface: ILcdDAFIFTRecordFilter
      Tests if a given record of type String[] passes the filter or not. The actual test condition is specified by the implementation of this interface.
      Specified by:
      accept in interface ILcdDAFIFTRecordFilter
      Parameters:
      aRecord - The String[] to be tested by the filter.
      aFileName - The file name which contains the given record.
      Returns:
      true if the String[] passes the filter, false otherwise.
    • addICAORegion

      public void addICAORegion(String aICAORegion)
      Add an ICAO region which needs to be accepted by this filter instance.
      Parameters:
      aICAORegion - The ICAO region to accept.
    • findICAOCodeField

      public static int findICAOCodeField(String aFileName)
      Finds the index of the record field containing the ICAO region information for the specified file name.
      Parameters:
      aFileName - The file name to query.
      Returns:
      the index of the record field containing the ICAO region or -1 if the file does not contain an ICAO region.