Class DMSFilter
- java.lang.Object
-
- org.opensextant.extractors.xcoord.DMSFilter
-
- All Implemented Interfaces:
GeocoordMatchFilter
public class DMSFilter extends java.lang.Object implements GeocoordMatchFilter
DMS Filters include ignoring these patterns: dd-dd-dd HH:MM:ss (where dd-dd-dd HH-MM-ss would be a valid coordinate as the field separators for lat/lon are the same). Assumption: Date fields are separated by / and -; Time fields are separated by : So if you have a lat/lon with a [date] [time] pattern it is most likely not a [lat] [lon] pattern. As of 2012 Fall -- DMS-02 is very open ended pattern and matches parts of dates- Author:
- ubaldino
-
-
Field Summary
Fields Modifier and Type Field Description java.util.List<java.text.DateFormat>
general_dates
static java.lang.String[]
general_formats
-
Constructor Summary
Constructors Constructor Description DMSFilter()
-
Method Summary
Modifier and Type Method Description boolean
pass(GeocoordMatch m)
pass a matchboolean
stop(GeocoordMatch m)
stop a match if it is a bad DMS pattern, e.g., date or date/time.
-
-
-
Method Detail
-
pass
public boolean pass(GeocoordMatch m)
pass a match- Specified by:
pass
in interfaceGeocoordMatchFilter
- Parameters:
m
- coord match- Returns:
- true if match is not filtered
-
stop
public boolean stop(GeocoordMatch m)
stop a match if it is a bad DMS pattern, e.g., date or date/time.- Specified by:
stop
in interfaceGeocoordMatchFilter
- Parameters:
m
- coord match- Returns:
- true if match is filtered out
-
-