Package com.luciad.format.dafift.decoder
Class TLcdDAFIFTICAORegionFilter
java.lang.Object
com.luciad.format.dafift.decoder.TLcdDAFIFTICAORegionFilter
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionTLcdDAFIFTICAORegionFilter
(String[] aICAORegions) Creates a new DAFIFT record filter which filters on the given ICAO regions. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests if a given record of typeString[]
passes the filter or not.void
addICAORegion
(String aICAORegion) Add an ICAO region which needs to be accepted by this filter instance.static int
findICAOCodeField
(String aFileName) Finds the index of the record field containing the ICAO region information for the specified file name.
-
Constructor Details
-
TLcdDAFIFTICAORegionFilter
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 isnull
.
-
-
Method Details
-
accept
Description copied from interface:ILcdDAFIFTRecordFilter
Tests if a given record of typeString[]
passes the filter or not. The actual test condition is specified by the implementation of this interface.- Specified by:
accept
in interfaceILcdDAFIFTRecordFilter
- Parameters:
aRecord
- The String[] to be tested by the filter.aFileName
- The file name which contains the given record.- Returns:
true
if theString[]
passes the filter,false
otherwise.
-
addICAORegion
Add an ICAO region which needs to be accepted by this filter instance.- Parameters:
aICAORegion
- The ICAO region to accept.
-
findICAOCodeField
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.
-