|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This specifies the interface to create filters.
FeatureTypeFactory
,
as that provides a good example of what this should look like. The
mutable factory to create immutable objects is a good model for this.
The creation methods should only create fully formed filters. This
in turn means that all the set functions in the filters should be
eliminated. When rewriting this class/package, keep in mind
FilterSAXParser in the filter module, as the factory should fit
cleanly with that, and should handle sax parsing without too much
memory overhead., REVISIT: resolve errors, should all throw errors?Method Summary | |
Filter |
and(Filter f1,
Filter f2)
Deprecated. use FilterFactory.and(org.opengis.filter.Filter, org.opengis.filter.Filter) |
AttributeExpression |
createAttributeExpression(AttributeType at)
Deprecated. use createAttributeExpression( at ), will be removed for GeoTools 2.3 |
AttributeExpression |
createAttributeExpression(FeatureType schema)
Deprecated. use createAttributeExpression(String) instead. |
AttributeExpression |
createAttributeExpression(FeatureType schema,
java.lang.String xpath)
Deprecated. use createAttributeExpression( xpath ), will be removed for GeoTools 2.3 |
AttributeExpression |
createAttributeExpression(java.lang.String xpath)
Creates an AttributeExpression using the supplied xpath. |
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)
Deprecated. use one of FilterFactory.less(Expression, Expression)
{@link org.opengis.filter.FilterFactory#lessOrEqual(Expression, Expression)
{@link org.opengis.filter.FilterFactory#equals(Expression, Expression)
{@link org.opengis.filter.FilterFactory#greater(Expression, Expression)
{@link org.opengis.filter.FilterFactory#greaterOrEqual(Expression, Expression)
{@link org.opengis.filter.FilterFactory#between(Expression, Expression, Expression) |
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)
Deprecated. use one of {@link org.opengis.filter.FilterFactory#beyond(String, Geometry, double, String) {@link org.opengis.filter.FilterFactory#dwithin(String, Geometry, double, String) |
GeometryFilter |
createGeometryFilter(short filterType)
Deprecated. use one of FilterFactory.bbox(String, double, double, double, double, String)
{@link org.opengis.filter.FilterFactory#beyond(String, Geometry, double, String)
{@link org.opengis.filter.FilterFactory#contains(String, Geometry)
{@link org.opengis.filter.FilterFactory#crosses(String, Geometry)
{@link org.opengis.filter.FilterFactory#disjoint(String, Geometry)
{@link org.opengis.filter.FilterFactory#dwithin(String, Geometry, double, String)
{@link org.opengis.filter.FilterFactory#equals(String, Geometry)
{@link org.opengis.filter.FilterFactory#intersects(String, Geometry)
{@link org.opengis.filter.FilterFactory#overlaps(String, Geometry)
{@link org.opengis.filter.FilterFactory#touches(String, Geometry)
{@link org.opengis.filter.FilterFactory#within(String, Geometry) |
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)
Deprecated. use one of FilterFactory.and(Filter, Filter)
FilterFactory.or(Filter, Filter)
FilterFactory.not(Filter) |
LogicFilter |
createLogicFilter(Filter filter,
short filterType)
Deprecated. use one of FilterFactory.and(Filter, Filter)
FilterFactory.or(Filter, Filter)
FilterFactory.not(Filter) |
LogicFilter |
createLogicFilter(short filterType)
Deprecated. use one of FilterFactory.and(Filter, Filter)
FilterFactory.or(Filter, Filter)
FilterFactory.not(Filter) |
MathExpression |
createMathExpression()
Deprecated. use one of FilterFactory.add(Expression, Expression)
FilterFactory.subtract(Expression, Expression)
FilterFactory.multiply(Expression, Expression)
FilterFactory.divide(Expression, Expression) |
MathExpression |
createMathExpression(short expressionType)
Deprecated. use one of FilterFactory.add(Expression, Expression)
FilterFactory.subtract(Expression, Expression)
FilterFactory.multiply(Expression, Expression)
FilterFactory.divide(Expression, Expression) |
NullFilter |
createNullFilter()
Creates an empty Null Filter. |
Filter |
not(Filter f)
Deprecated. use FilterFactory.not(org.opengis.filter.Filter) |
Filter |
or(Filter f1,
Filter f2)
Deprecated. use FilterFactory.or(org.opengis.filter.Filter, org.opengis.filter.Filter) |
Methods inherited from interface org.geotools.factory.Factory |
getImplementationHints |
Methods inherited from interface org.opengis.filter.FilterFactory |
add, and, and, bbox, between, beyond, contains, crosses, disjoint, divide, dwithin, equals, equals, featureId, function, function, function, function, greater, greaterOrEqual, intersects, isNull, less, lessOrEqual, like, like, literal, literal, literal, literal, literal, literal, literal, literal, literal, multiply, not, or, or, overlaps, property, sort, subtract, touches, within |
Method Detail |
public LogicFilter createLogicFilter(Filter filter1, Filter filter2, short filterType) throws IllegalFilterException
FilterFactory.and(Filter, Filter)
FilterFactory.or(Filter, Filter)
FilterFactory.not(Filter)
filter1
- the first filter to join.filter2
- the second filter to join.filterType
- must be a logic type.
IllegalFilterException
- If there were any problems creating the
filter, including wrong type.public LogicFilter createLogicFilter(short filterType) throws IllegalFilterException
FilterFactory.and(Filter, Filter)
FilterFactory.or(Filter, Filter)
FilterFactory.not(Filter)
filterType
- must be a logic type.
IllegalFilterException
- If there were any problems creating the
filter, including wrong type.public LogicFilter createLogicFilter(Filter filter, short filterType) throws IllegalFilterException
FilterFactory.and(Filter, Filter)
FilterFactory.or(Filter, Filter)
FilterFactory.not(Filter)
filter
- the initial filter to set.filterType
- Must be a logic type.
IllegalFilterException
- If there were any problems creating the
filter, including wrong type.public BBoxExpression createBBoxExpression(com.vividsolutions.jts.geom.Envelope env) throws IllegalFilterException
env
- the envelope to use for this bounding box.
IllegalFilterException
- if there were creation problems.public LiteralExpression createLiteralExpression(int i)
i
- the int to serve as literal.
public MathExpression createMathExpression() throws IllegalFilterException
FilterFactory.add(Expression, Expression)
FilterFactory.subtract(Expression, Expression)
FilterFactory.multiply(Expression, Expression)
FilterFactory.divide(Expression, Expression)
IllegalFilterException
- if there were creation problems.public FidFilter createFidFilter()
public AttributeExpression createAttributeExpression(java.lang.String xpath)
The supplied xpath can be used to query a varity of content - most notably Features.
xpath
- XPath used to retrive value
public AttributeExpression createAttributeExpression(FeatureType schema, java.lang.String xpath) throws IllegalFilterException
If you supply a schema, it will be used as a sanitch check for the provided path.
schema
- the schema to get the attribute from, or nullxpath
- the xPath of the attribute to compare.
IllegalFilterException
- if there were creation problems.public AttributeExpression createAttributeExpression(AttributeType at) throws IllegalFilterException
at
-
IllegalFilterException
- if there were creation problemspublic LiteralExpression createLiteralExpression(java.lang.Object o) throws IllegalFilterException
o
- the object to serve as the literal.
IllegalFilterException
- if there were creation problems.public CompareFilter createCompareFilter(short type) throws IllegalFilterException
FilterFactory.less(Expression, Expression)
{@link org.opengis.filter.FilterFactory#lessOrEqual(Expression, Expression)
{@link org.opengis.filter.FilterFactory#equals(Expression, Expression)
{@link org.opengis.filter.FilterFactory#greater(Expression, Expression)
{@link org.opengis.filter.FilterFactory#greaterOrEqual(Expression, Expression)
{@link org.opengis.filter.FilterFactory#between(Expression, Expression, Expression)
type
- the type of comparison - must be a compare type.
IllegalFilterException
- if there were creation problems.public LiteralExpression createLiteralExpression()
public LiteralExpression createLiteralExpression(java.lang.String s)
s
- the string to serve as the literal.
public LiteralExpression createLiteralExpression(double d)
d
- the double to serve as the literal.
public AttributeExpression createAttributeExpression(FeatureType schema)
createAttributeExpression(String)
instead.
schema
- the schema to create with.
public MathExpression createMathExpression(short expressionType) throws IllegalFilterException
FilterFactory.add(Expression, Expression)
FilterFactory.subtract(Expression, Expression)
FilterFactory.multiply(Expression, Expression)
FilterFactory.divide(Expression, Expression)
expressionType
- must be a math expression type.
IllegalFilterException
- if there were creation problems.public NullFilter createNullFilter()
public BetweenFilter createBetweenFilter() throws IllegalFilterException
IllegalFilterException
- if there were creation problems.public GeometryFilter createGeometryFilter(short filterType) throws IllegalFilterException
FilterFactory.bbox(String, double, double, double, double, String)
{@link org.opengis.filter.FilterFactory#beyond(String, Geometry, double, String)
{@link org.opengis.filter.FilterFactory#contains(String, Geometry)
{@link org.opengis.filter.FilterFactory#crosses(String, Geometry)
{@link org.opengis.filter.FilterFactory#disjoint(String, Geometry)
{@link org.opengis.filter.FilterFactory#dwithin(String, Geometry, double, String)
{@link org.opengis.filter.FilterFactory#equals(String, Geometry)
{@link org.opengis.filter.FilterFactory#intersects(String, Geometry)
{@link org.opengis.filter.FilterFactory#overlaps(String, Geometry)
{@link org.opengis.filter.FilterFactory#touches(String, Geometry)
{@link org.opengis.filter.FilterFactory#within(String, Geometry)
filterType
- the type to create, must be a geometry type.
IllegalFilterException
- if the filterType is not a geometry.public GeometryDistanceFilter createGeometryDistanceFilter(short filterType) throws IllegalFilterException
filterType
- the type to create, must be beyond or dwithin.
IllegalFilterException
- if the filterType is not a geometry
distance type.public FidFilter createFidFilter(java.lang.String fid)
fid
- the feature ID to create with.
public LikeFilter createLikeFilter()
public FunctionExpression createFunctionExpression(java.lang.String name)
name
- the function name.
public EnvironmentVariable createEnvironmentVariable(java.lang.String name)
name
- the function name.
public Filter or(Filter f1, Filter f2)
FilterFactory.or(org.opengis.filter.Filter, org.opengis.filter.Filter)
public Filter and(Filter f1, Filter f2)
FilterFactory.and(org.opengis.filter.Filter, org.opengis.filter.Filter)
public Filter not(Filter f)
FilterFactory.not(org.opengis.filter.Filter)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |