org.geotools.filter
Class FilterCapabilities

java.lang.Object
  extended byorg.geotools.filter.FilterCapabilities
Direct Known Subclasses:
FilterCapabilitiesMask

public class FilterCapabilities
extends java.lang.Object

Represents the Filter capabilities that are supported by a SQLEncoder. Each SQLEncoder class should have one static FilterCapabilities, representing the filter encoding operations that it can successfully perform.

Author:
Chris Holmes, TOPP

Constructor Summary
FilterCapabilities()
          No argument Constructor.
 
Method Summary
 void addType(short type)
          Adds a new support type to capabilities.
 boolean fullySupports(Filter filter)
          Determines if the filter and all its sub filters are supported.
 boolean supports(Filter filter)
          Determines if the filter passed in is supported.
 boolean supports(short type)
          Determines if the filter type passed in is supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterCapabilities

public FilterCapabilities()
No argument Constructor.

Method Detail

addType

public void addType(short type)
Adds a new support type to capabilities.

Parameters:
type - The AbstractFilter type that is supported

supports

public boolean supports(short type)
Determines if the filter type passed in is supported.

Parameters:
type - The AbstractFilter type to be tested
Returns:
true if supported, false otherwise.

supports

public boolean supports(Filter filter)
Determines if the filter passed in is supported.

Parameters:
filter - The Filter to be tested.
Returns:
true if supported, false otherwise.

fullySupports

public boolean fullySupports(Filter filter)
Determines if the filter and all its sub filters are supported. Is most important for logic filters, as they are the only ones with subFilters. Null filters should not be used here, if nothing should be filtered than Filter.NONE can be used. Embedded nulls can be a particular source of problems, buried in logic filters.

Parameters:
filter - the filter to be tested.
Returns:
true if all sub filters are supported, false otherwise.
Throws:
java.lang.IllegalArgumentException - If a null filter is passed in. As this function is recursive a null in a logic filter will also cause an error.


Copyright © GeoTools. All Rights Reserved.