@Test public void testGetFilterType() { assertEquals(FilterType.COMPARE_GREATER_THAN, Filters.getFilterType(a)); }
public static short getFilterType( org.opengis.filter.Filter filter ){ if( filter == org.opengis.filter.Filter.EXCLUDE ) return FilterType.ALL; if( filter == org.opengis.filter.Filter.INCLUDE ) return FilterType.NONE; if( filter instanceof org.geotools.filter.Filter){ return ((org.geotools.filter.Filter)filter).getFilterType(); } if( filter instanceof PropertyIsBetween ) return FilterType.BETWEEN; if( filter instanceof PropertyIsEqualTo ) return FilterType.COMPARE_EQUALS; if( filter instanceof PropertyIsGreaterThan ) return FilterType.COMPARE_GREATER_THAN; if( filter instanceof PropertyIsGreaterThanOrEqualTo ) return FilterType.COMPARE_GREATER_THAN_EQUAL; if( filter instanceof PropertyIsLessThan) return FilterType.COMPARE_LESS_THAN; if( filter instanceof PropertyIsLessThanOrEqualTo ) return FilterType.COMPARE_LESS_THAN_EQUAL; if( filter instanceof PropertyIsNotEqualTo ) return FilterType.COMPARE_NOT_EQUALS; if( filter instanceof Id ) return FilterType.FID; if( filter instanceof BBOX ) return FilterType.GEOMETRY_BBOX; if( filter instanceof Beyond) return FilterType.GEOMETRY_BEYOND; if( filter instanceof Contains ) return FilterType.GEOMETRY_CONTAINS; if( filter instanceof Crosses ) return FilterType.GEOMETRY_CROSSES; if( filter instanceof Disjoint ) return FilterType.GEOMETRY_DISJOINT; if( filter instanceof DWithin) return FilterType.GEOMETRY_DWITHIN; if( filter instanceof Equals) return FilterType.GEOMETRY_EQUALS; if( filter instanceof Intersects) return FilterType.GEOMETRY_INTERSECTS; if( filter instanceof Overlaps) return FilterType.GEOMETRY_OVERLAPS; if( filter instanceof Touches) return FilterType.GEOMETRY_TOUCHES; if( filter instanceof Within) return FilterType.GEOMETRY_WITHIN; if( filter instanceof PropertyIsLike) return FilterType.LIKE; if( filter instanceof And) return FilterType.LOGIC_AND; if( filter instanceof Not) return FilterType.LOGIC_NOT; if( filter instanceof Or ) return FilterType.LOGIC_OR; if( filter instanceof PropertyIsNull) return FilterType.NULL; if( filter instanceof Filter){ return 0; } return 0; }
Filters { public static short getFilterType( org.opengis.filter.Filter filter ){ if( filter == org.opengis.filter.Filter.EXCLUDE ) return FilterType.ALL; if( filter == org.opengis.filter.Filter.INCLUDE ) return FilterType.NONE; if( filter instanceof org.geotools.filter.Filter){ return ((org.geotools.filter.Filter)filter).getFilterType(); } if( filter instanceof PropertyIsBetween ) return FilterType.BETWEEN; if( filter instanceof PropertyIsEqualTo ) return FilterType.COMPARE_EQUALS; if( filter instanceof PropertyIsGreaterThan ) return FilterType.COMPARE_GREATER_THAN; if( filter instanceof PropertyIsGreaterThanOrEqualTo ) return FilterType.COMPARE_GREATER_THAN_EQUAL; if( filter instanceof PropertyIsLessThan) return FilterType.COMPARE_LESS_THAN; if( filter instanceof PropertyIsLessThanOrEqualTo ) return FilterType.COMPARE_LESS_THAN_EQUAL; if( filter instanceof PropertyIsNotEqualTo ) return FilterType.COMPARE_NOT_EQUALS; if( filter instanceof Id ) return FilterType.FID; if( filter instanceof BBOX ) return FilterType.GEOMETRY_BBOX; if( filter instanceof Beyond) return FilterType.GEOMETRY_BEYOND; if( filter instanceof Contains ) return FilterType.GEOMETRY_CONTAINS; if( filter instanceof Crosses ) return FilterType.GEOMETRY_CROSSES; if( filter instanceof Disjoint ) return FilterType.GEOMETRY_DISJOINT; if( filter instanceof DWithin) return FilterType.GEOMETRY_DWITHIN; if( filter instanceof Equals) return FilterType.GEOMETRY_EQUALS; if( filter instanceof Intersects) return FilterType.GEOMETRY_INTERSECTS; if( filter instanceof Overlaps) return FilterType.GEOMETRY_OVERLAPS; if( filter instanceof Touches) return FilterType.GEOMETRY_TOUCHES; if( filter instanceof Within) return FilterType.GEOMETRY_WITHIN; if( filter instanceof PropertyIsLike) return FilterType.LIKE; if( filter instanceof And) return FilterType.LOGIC_AND; if( filter instanceof Not) return FilterType.LOGIC_NOT; if( filter instanceof Or ) return FilterType.LOGIC_OR; if( filter instanceof PropertyIsNull) return FilterType.NULL; if( filter instanceof Filter){ return 0; } return 0; } }
Filters { public static short getFilterType( org.opengis.filter.Filter filter ){ if( filter == org.opengis.filter.Filter.EXCLUDE ) return FilterType.ALL; if( filter == org.opengis.filter.Filter.INCLUDE ) return FilterType.NONE; if( filter instanceof org.geotools.filter.Filter){ return ((org.geotools.filter.Filter)filter).getFilterType(); } if( filter instanceof PropertyIsBetween ) return FilterType.BETWEEN; if( filter instanceof PropertyIsEqualTo ) return FilterType.COMPARE_EQUALS; if( filter instanceof PropertyIsGreaterThan ) return FilterType.COMPARE_GREATER_THAN; if( filter instanceof PropertyIsGreaterThanOrEqualTo ) return FilterType.COMPARE_GREATER_THAN_EQUAL; if( filter instanceof PropertyIsLessThan) return FilterType.COMPARE_LESS_THAN; if( filter instanceof PropertyIsLessThanOrEqualTo ) return FilterType.COMPARE_LESS_THAN_EQUAL; if( filter instanceof PropertyIsNotEqualTo ) return FilterType.COMPARE_NOT_EQUALS; if( filter instanceof Id ) return FilterType.FID; if( filter instanceof BBOX ) return FilterType.GEOMETRY_BBOX; if( filter instanceof Beyond) return FilterType.GEOMETRY_BEYOND; if( filter instanceof Contains ) return FilterType.GEOMETRY_CONTAINS; if( filter instanceof Crosses ) return FilterType.GEOMETRY_CROSSES; if( filter instanceof Disjoint ) return FilterType.GEOMETRY_DISJOINT; if( filter instanceof DWithin) return FilterType.GEOMETRY_DWITHIN; if( filter instanceof Equals) return FilterType.GEOMETRY_EQUALS; if( filter instanceof Intersects) return FilterType.GEOMETRY_INTERSECTS; if( filter instanceof Overlaps) return FilterType.GEOMETRY_OVERLAPS; if( filter instanceof Touches) return FilterType.GEOMETRY_TOUCHES; if( filter instanceof Within) return FilterType.GEOMETRY_WITHIN; if( filter instanceof PropertyIsLike) return FilterType.LIKE; if( filter instanceof And) return FilterType.LOGIC_AND; if( filter instanceof Not) return FilterType.LOGIC_NOT; if( filter instanceof Or ) return FilterType.LOGIC_OR; if( filter instanceof PropertyIsNull) return FilterType.NULL; if( filter instanceof Filter){ return 0; } return 0; } Filters();  Filters(org.opengis.filter.FilterFactory2 factory); }
Filters { public static short getFilterType( org.opengis.filter.Filter filter ){ if( filter == org.opengis.filter.Filter.EXCLUDE ) return FilterType.ALL; if( filter == org.opengis.filter.Filter.INCLUDE ) return FilterType.NONE; if( filter instanceof org.geotools.filter.Filter){ return ((org.geotools.filter.Filter)filter).getFilterType(); } if( filter instanceof PropertyIsBetween ) return FilterType.BETWEEN; if( filter instanceof PropertyIsEqualTo ) return FilterType.COMPARE_EQUALS; if( filter instanceof PropertyIsGreaterThan ) return FilterType.COMPARE_GREATER_THAN; if( filter instanceof PropertyIsGreaterThanOrEqualTo ) return FilterType.COMPARE_GREATER_THAN_EQUAL; if( filter instanceof PropertyIsLessThan) return FilterType.COMPARE_LESS_THAN; if( filter instanceof PropertyIsLessThanOrEqualTo ) return FilterType.COMPARE_LESS_THAN_EQUAL; if( filter instanceof PropertyIsNotEqualTo ) return FilterType.COMPARE_NOT_EQUALS; if( filter instanceof Id ) return FilterType.FID; if( filter instanceof BBOX ) return FilterType.GEOMETRY_BBOX; if( filter instanceof Beyond) return FilterType.GEOMETRY_BEYOND; if( filter instanceof Contains ) return FilterType.GEOMETRY_CONTAINS; if( filter instanceof Crosses ) return FilterType.GEOMETRY_CROSSES; if( filter instanceof Disjoint ) return FilterType.GEOMETRY_DISJOINT; if( filter instanceof DWithin) return FilterType.GEOMETRY_DWITHIN; if( filter instanceof Equals) return FilterType.GEOMETRY_EQUALS; if( filter instanceof Intersects) return FilterType.GEOMETRY_INTERSECTS; if( filter instanceof Overlaps) return FilterType.GEOMETRY_OVERLAPS; if( filter instanceof Touches) return FilterType.GEOMETRY_TOUCHES; if( filter instanceof Within) return FilterType.GEOMETRY_WITHIN; if( filter instanceof PropertyIsLike) return FilterType.LIKE; if( filter instanceof And) return FilterType.LOGIC_AND; if( filter instanceof Not) return FilterType.LOGIC_NOT; if( filter instanceof Or ) return FilterType.LOGIC_OR; if( filter instanceof PropertyIsNull) return FilterType.NULL; if( filter instanceof Filter){ return 0; } return 0; } Filters();  Filters(org.opengis.filter.FilterFactory2 factory); void setFilterFactory(org.opengis.filter.FilterFactory2 factory); static Filter and( org.opengis.filter.FilterFactory ff, Filter filter1, Filter filter2 ); static Filter or( org.opengis.filter.FilterFactory ff, Filter filter1, Filter filter2 ); static void accept( org.opengis.filter.Filter filter, FilterVisitor visitor ); Filter duplicate( Filter filter ); static short getFilterType( org.opengis.filter.Filter filter ); static int asInt( Expression expr ); static String asString(Expression expr); static double asDouble(Expression expr); static T asType(Expression expr, Class<T> TYPE); static double number(Object value); static T gets(String text, Class<T> TYPE); static String puts(double number); static String puts(Object obj); static String puts(Color color); Filter remove(Filter baseFilter, Filter targetFilter); static Filter removeFilter( Filter baseFilter, Filter targetFilter ); Filter remove(Filter baseFilter, final Filter targetFilter, boolean recurse); static Filter removeFilter(Filter baseFilter, Filter targetFilter, boolean recurse); Set<String> attributeNames( Filter filter ); static String[] attributeNames(Filter filter, final SimpleFeatureType featureType); static Set<PropertyName> propertyNames(Filter filter, final SimpleFeatureType featureType); static Set<PropertyName> propertyNames(Filter filter); static Set<PropertyName> propertyNames(Expression expression,
            final SimpleFeatureType featureType); static Set<PropertyName> propertyNames(Expression expression); static boolean hasChildren( Filter filter ); static ArrayList<Filter> children( Filter filter ); static ArrayList<Filter> children( Filter filter, boolean all ); static T search(Filter filter, Class<T> filterType, String propertyName ); static String findPropertyName(Filter filter); }
Filters { public static short getFilterType( org.opengis.filter.Filter filter ){ if( filter == org.opengis.filter.Filter.EXCLUDE ) return FilterType.ALL; if( filter == org.opengis.filter.Filter.INCLUDE ) return FilterType.NONE; if( filter instanceof org.geotools.filter.Filter){ return ((org.geotools.filter.Filter)filter).getFilterType(); } if( filter instanceof PropertyIsBetween ) return FilterType.BETWEEN; if( filter instanceof PropertyIsEqualTo ) return FilterType.COMPARE_EQUALS; if( filter instanceof PropertyIsGreaterThan ) return FilterType.COMPARE_GREATER_THAN; if( filter instanceof PropertyIsGreaterThanOrEqualTo ) return FilterType.COMPARE_GREATER_THAN_EQUAL; if( filter instanceof PropertyIsLessThan) return FilterType.COMPARE_LESS_THAN; if( filter instanceof PropertyIsLessThanOrEqualTo ) return FilterType.COMPARE_LESS_THAN_EQUAL; if( filter instanceof PropertyIsNotEqualTo ) return FilterType.COMPARE_NOT_EQUALS; if( filter instanceof Id ) return FilterType.FID; if( filter instanceof BBOX ) return FilterType.GEOMETRY_BBOX; if( filter instanceof Beyond) return FilterType.GEOMETRY_BEYOND; if( filter instanceof Contains ) return FilterType.GEOMETRY_CONTAINS; if( filter instanceof Crosses ) return FilterType.GEOMETRY_CROSSES; if( filter instanceof Disjoint ) return FilterType.GEOMETRY_DISJOINT; if( filter instanceof DWithin) return FilterType.GEOMETRY_DWITHIN; if( filter instanceof Equals) return FilterType.GEOMETRY_EQUALS; if( filter instanceof Intersects) return FilterType.GEOMETRY_INTERSECTS; if( filter instanceof Overlaps) return FilterType.GEOMETRY_OVERLAPS; if( filter instanceof Touches) return FilterType.GEOMETRY_TOUCHES; if( filter instanceof Within) return FilterType.GEOMETRY_WITHIN; if( filter instanceof PropertyIsLike) return FilterType.LIKE; if( filter instanceof And) return FilterType.LOGIC_AND; if( filter instanceof Not) return FilterType.LOGIC_NOT; if( filter instanceof Or ) return FilterType.LOGIC_OR; if( filter instanceof PropertyIsNull) return FilterType.NULL; if( filter instanceof Filter){ return 0; } return 0; } Filters();  Filters(org.opengis.filter.FilterFactory2 factory); void setFilterFactory(org.opengis.filter.FilterFactory2 factory); static Filter and( org.opengis.filter.FilterFactory ff, Filter filter1, Filter filter2 ); static Filter or( org.opengis.filter.FilterFactory ff, Filter filter1, Filter filter2 ); static void accept( org.opengis.filter.Filter filter, FilterVisitor visitor ); Filter duplicate( Filter filter ); static short getFilterType( org.opengis.filter.Filter filter ); static int asInt( Expression expr ); static String asString(Expression expr); static double asDouble(Expression expr); static T asType(Expression expr, Class<T> TYPE); static double number(Object value); static T gets(String text, Class<T> TYPE); static String puts(double number); static String puts(Object obj); static String puts(Color color); Filter remove(Filter baseFilter, Filter targetFilter); static Filter removeFilter( Filter baseFilter, Filter targetFilter ); Filter remove(Filter baseFilter, final Filter targetFilter, boolean recurse); static Filter removeFilter(Filter baseFilter, Filter targetFilter, boolean recurse); Set<String> attributeNames( Filter filter ); static String[] attributeNames(Filter filter, final SimpleFeatureType featureType); static Set<PropertyName> propertyNames(Filter filter, final SimpleFeatureType featureType); static Set<PropertyName> propertyNames(Filter filter); static Set<PropertyName> propertyNames(Expression expression,
            final SimpleFeatureType featureType); static Set<PropertyName> propertyNames(Expression expression); static boolean hasChildren( Filter filter ); static ArrayList<Filter> children( Filter filter ); static ArrayList<Filter> children( Filter filter, boolean all ); static T search(Filter filter, Class<T> filterType, String propertyName ); static String findPropertyName(Filter filter); static final int NOTFOUND; }