org.geotools.filter
Class FilterFactoryImpl

java.lang.Object
  extended byorg.geotools.filter.FilterFactory
      extended byorg.geotools.filter.FilterFactoryImpl
All Implemented Interfaces:
Factory
Direct Known Subclasses:
HsqlFilterFactoryImpl

public class FilterFactoryImpl
extends FilterFactory

Implementation of the FilterFactory, generates the filter implementations in defaultcore.

Version:
$Id: FilterFactoryImpl.java,v 1.7 2003/08/20 20:09:30 cholmesny Exp $
Author:
Ian Turton, CCG

Constructor Summary
FilterFactoryImpl()
          Creates a new instance of FilterFactoryImpl
 
Method Summary
 AttributeExpression createAttributeExpression(AttributeType at)
           
 AttributeExpression createAttributeExpression(FeatureType schema)
          Creates a Attribute Expression with an initial schema.
 AttributeExpression createAttributeExpression(FeatureType schema, java.lang.String path)
          Creates a Attribute Expression given a schema and attribute path.
 BBoxExpression createBBoxExpression(com.vividsolutions.jts.geom.Envelope env)
          Creates a BBox Expression from an envelope.
 BetweenFilter createBetweenFilter()
          Creates an empty Between Filter.
 CompareFilter createCompareFilter(short type)
          Creates a new compare filter of the given type.
 EnvironmentVariable createEnvironmentVariable(java.lang.String name)
          Creates an Environment Variable
 FidFilter createFidFilter()
          Creates a new Fid Filter with no initial fids.
 FidFilter createFidFilter(java.lang.String fid)
          Creates a Fid Filter with an initial fid.
 FunctionExpression createFunctionExpression(java.lang.String name)
          Creates a Function Expression.
 GeometryDistanceFilter createGeometryDistanceFilter(short filterType)
          Creates a Geometry Distance Filter
 GeometryFilter createGeometryFilter(short filterType)
          Creates a Geometry Filter.
 LikeFilter createLikeFilter()
          Creates a Like Filter.
 LiteralExpression createLiteralExpression()
          Creates an empty Literal Expression
 LiteralExpression createLiteralExpression(double d)
          Creates a Double Literal Expression
 LiteralExpression createLiteralExpression(int i)
          Creates an Integer Literal Expression.
 LiteralExpression createLiteralExpression(java.lang.Object o)
          Creates a Literal Expression from an Object.
 LiteralExpression createLiteralExpression(java.lang.String s)
          Creates a String Literal Expression
 LogicFilter createLogicFilter(Filter filter1, Filter filter2, short filterType)
          Creates a logic filter from two filters and a type.
 LogicFilter createLogicFilter(Filter filter, short filterType)
          Creates a logic filter with an initial filter.
 LogicFilter createLogicFilter(short filterType)
          Creates an empty logic filter from a type.
 MathExpression createMathExpression()
          Creates a Math Expression
 MathExpression createMathExpression(short expressionType)
          Creates a Math Expression of the given type.
 NullFilter createNullFilter()
          Creates an empty Null Filter.
 
Methods inherited from class org.geotools.filter.FilterFactory
createFilterFactory, getImplementationHints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterFactoryImpl

public FilterFactoryImpl()
Creates a new instance of FilterFactoryImpl

Method Detail

createAttributeExpression

public AttributeExpression createAttributeExpression(FeatureType schema)
Creates a Attribute Expression with an initial schema.

Specified by:
createAttributeExpression in class FilterFactory
Parameters:
schema - the schema to create with.
Returns:
The new Attribute Expression.

createAttributeExpression

public AttributeExpression createAttributeExpression(FeatureType schema,
                                                     java.lang.String path)
                                              throws IllegalFilterException
Creates a Attribute Expression given a schema and attribute path.

Specified by:
createAttributeExpression in class FilterFactory
Parameters:
schema - the schema to get the attribute from.
path - the xPath of the attribute to compare.
Returns:
The new Attribute Expression.
Throws:
IllegalFilterException - if there were creation problems.

createAttributeExpression

public AttributeExpression createAttributeExpression(AttributeType at)
                                              throws IllegalFilterException
Specified by:
createAttributeExpression in class FilterFactory
Throws:
IllegalFilterException

createBBoxExpression

public BBoxExpression createBBoxExpression(com.vividsolutions.jts.geom.Envelope env)
                                    throws IllegalFilterException
Creates a BBox Expression from an envelope.

Specified by:
createBBoxExpression in class FilterFactory
Parameters:
env - the envelope to use for this bounding box.
Returns:
The newly created BBoxExpression.
Throws:
IllegalFilterException - if there were creation problems.

createBetweenFilter

public BetweenFilter createBetweenFilter()
                                  throws IllegalFilterException
Creates an empty Between Filter.

Specified by:
createBetweenFilter in class FilterFactory
Returns:
The new Between Filter.
Throws:
IllegalFilterException - if there were creation problems.

createCompareFilter

public CompareFilter createCompareFilter(short type)
                                  throws IllegalFilterException
Creates a new compare filter of the given type.

Specified by:
createCompareFilter in class FilterFactory
Parameters:
type - the type of comparison - must be a compare type.
Returns:
The new compare filter.
Throws:
IllegalFilterException - if there were creation problems.

createFidFilter

public FidFilter createFidFilter()
Creates a new Fid Filter with no initial fids.

Specified by:
createFidFilter in class FilterFactory
Returns:
The new Fid Filter.

createFidFilter

public FidFilter createFidFilter(java.lang.String fid)
Creates a Fid Filter with an initial fid.

Specified by:
createFidFilter in class FilterFactory
Parameters:
fid - the feature ID to create with.
Returns:
The new FidFilter.

createGeometryFilter

public GeometryFilter createGeometryFilter(short filterType)
                                    throws IllegalFilterException
Creates a Geometry Filter.

Specified by:
createGeometryFilter in class FilterFactory
Parameters:
filterType - the type to create, must be a geometry type.
Returns:
The new Geometry Filter.
Throws:
IllegalFilterException - if the filterType is not a geometry.

createGeometryDistanceFilter

public GeometryDistanceFilter createGeometryDistanceFilter(short filterType)
                                                    throws IllegalFilterException
Creates a Geometry Distance Filter

Specified by:
createGeometryDistanceFilter in class FilterFactory
Parameters:
filterType - the type to create, must be beyond or dwithin.
Returns:
The new Expression
Throws:
IllegalFilterException - if the filterType is not a geometry distance type.

createLikeFilter

public LikeFilter createLikeFilter()
Creates a Like Filter.

Specified by:
createLikeFilter in class FilterFactory
Returns:
The new Like Filter.

createLiteralExpression

public LiteralExpression createLiteralExpression()
Creates an empty Literal Expression

Specified by:
createLiteralExpression in class FilterFactory
Returns:
The new Literal Expression.

createLiteralExpression

public LiteralExpression createLiteralExpression(java.lang.Object o)
                                          throws IllegalFilterException
Creates a Literal Expression from an Object.

Specified by:
createLiteralExpression in class FilterFactory
Parameters:
o - the object to serve as the literal.
Returns:
The new Literal Expression
Throws:
IllegalFilterException - if there were creation problems.

createLiteralExpression

public LiteralExpression createLiteralExpression(int i)
Creates an Integer Literal Expression.

Specified by:
createLiteralExpression in class FilterFactory
Parameters:
i - the int to serve as literal.
Returns:
The new Literal Expression

createLiteralExpression

public LiteralExpression createLiteralExpression(double d)
Creates a Double Literal Expression

Specified by:
createLiteralExpression in class FilterFactory
Parameters:
d - the double to serve as the literal.
Returns:
The new Literal Expression

createLiteralExpression

public LiteralExpression createLiteralExpression(java.lang.String s)
Creates a String Literal Expression

Specified by:
createLiteralExpression in class FilterFactory
Parameters:
s - the string to serve as the literal.
Returns:
The new Literal Expression

createLogicFilter

public LogicFilter createLogicFilter(short filterType)
                              throws IllegalFilterException
Creates an empty logic filter from a type.

Specified by:
createLogicFilter in class FilterFactory
Parameters:
filterType - must be a logic type.
Returns:
the newly constructed logic filter.
Throws:
IllegalFilterException - If there were any problems creating the filter, including wrong type.

createLogicFilter

public LogicFilter createLogicFilter(Filter filter,
                                     short filterType)
                              throws IllegalFilterException
Creates a logic filter with an initial filter.

Specified by:
createLogicFilter in class FilterFactory
Parameters:
filter - the initial filter to set.
filterType - Must be a logic type.
Returns:
the newly constructed logic filter.
Throws:
IllegalFilterException - If there were any problems creating the filter, including wrong type.

createLogicFilter

public LogicFilter createLogicFilter(Filter filter1,
                                     Filter filter2,
                                     short filterType)
                              throws IllegalFilterException
Creates a logic filter from two filters and a type.

Specified by:
createLogicFilter in class FilterFactory
Parameters:
filter1 - the first filter to join.
filter2 - the second filter to join.
filterType - must be a logic type.
Returns:
the newly constructed logic filter.
Throws:
IllegalFilterException - If there were any problems creating the filter, including wrong type.

createMathExpression

public MathExpression createMathExpression()
Creates a Math Expression

Specified by:
createMathExpression in class FilterFactory
Returns:
The new Math Expression

createMathExpression

public MathExpression createMathExpression(short expressionType)
                                    throws IllegalFilterException
Creates a Math Expression of the given type.

Specified by:
createMathExpression in class FilterFactory
Parameters:
expressionType - must be a math expression type.
Returns:
The new Math Expression.
Throws:
IllegalFilterException - if there were creation problems.

createFunctionExpression

public FunctionExpression createFunctionExpression(java.lang.String name)
Creates a Function Expression.

Specified by:
createFunctionExpression in class FilterFactory
Parameters:
name - the function name.
Returns:
The new Function Expression.

createNullFilter

public NullFilter createNullFilter()
Creates an empty Null Filter.

Specified by:
createNullFilter in class FilterFactory
Returns:
The new Null Filter.

createEnvironmentVariable

public EnvironmentVariable createEnvironmentVariable(java.lang.String name)
Description copied from class: FilterFactory
Creates an Environment Variable

Specified by:
createEnvironmentVariable in class FilterFactory
Parameters:
name - the function name.
Returns:
The new Function Expression.


Copyright © GeoTools. All Rights Reserved.