|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectFilterFactoryImpl
public class FilterFactoryImpl
Implementation of the FilterFactory, generates the filter implementations in defaultcore.
Constructor Summary | |
---|---|
FilterFactoryImpl()
Creates a new instance of FilterFactoryImpl |
|
FilterFactoryImpl(Hints hints)
|
Method Summary | |
---|---|
Add |
add(Expression expr1,
Expression expr2)
|
And |
and(Filter f,
Filter g)
|
Filter |
and(Filter filter1,
Filter filter2)
|
And |
and(List filters)
|
ArithmeticOperators |
arithmeticOperators(boolean simple,
Functions functions)
|
BBOX |
bbox(Expression geometry,
BoundingBox bounds)
|
BBOX |
bbox(Expression e,
double minx,
double miny,
double maxx,
double maxy,
String srs)
|
BBOX |
bbox(Expression geometry,
Expression bounds)
|
BBOX |
bbox(String propertyName,
double minx,
double miny,
double maxx,
double maxy,
String srs)
Checks if the bounding box of the feature's geometry overlaps the specified bounding box. |
PropertyIsBetween |
between(Expression expr,
Expression lower,
Expression upper)
|
Beyond |
beyond(Expression geometry1,
Expression geometry2,
double distance,
String units)
|
Beyond |
beyond(Expression geometry1,
Geometry geometry2,
double distance,
String units)
|
Beyond |
beyond(String propertyName,
Geometry geometry,
double distance,
String units)
|
FilterCapabilities |
capabilities(String version,
ScalarCapabilities scalar,
SpatialCapabilities spatial,
IdCapabilities id)
|
ComparisonOperators |
comparisonOperators(Operator[] comparisonOperators)
|
Contains |
contains(Expression geometry1,
Expression geometry2)
|
Contains |
contains(String propertyName,
Geometry geometry)
|
AttributeExpression |
createAttributeExpression(AttributeDescriptor at)
|
AttributeExpression |
createAttributeExpression(SimpleFeatureType schema)
Creates a Attribute Expression with an initial schema. |
AttributeExpression |
createAttributeExpression(SimpleFeatureType schema,
String path)
Creates a Attribute Expression given a schema and attribute path. |
AttributeExpression |
createAttributeExpression(String xpath)
Creates an AttributeExpression using the supplied xpath. |
BBoxExpression |
createBBoxExpression(Envelope env)
Creates a BBox Expression from an envelope. |
BetweenFilter |
createBetweenFilter()
Creates an empty Between Filter. |
CompareFilter |
createCompareFilter(short type)
Deprecated. @see org.geotools.filter.FilterFactory#createCompareFilter(short) |
EnvironmentVariable |
createEnvironmentVariable(String name)
|
FidFilter |
createFidFilter()
Creates a new Fid Filter with no initial fids. |
FidFilter |
createFidFilter(String fid)
Creates a Fid Filter with an initial fid. |
FunctionExpression |
createFunctionExpression(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(Object o)
Creates a Literal Expression from an Object. |
LiteralExpression |
createLiteralExpression(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)
Creates a Math Expression of the given type. |
NullFilter |
createNullFilter()
Creates an empty Null Filter. |
Crosses |
crosses(Expression geometry1,
Expression geometry2)
|
Crosses |
crosses(String propertyName,
Geometry geometry)
|
Disjoint |
disjoint(Expression geometry1,
Expression geometry2)
|
Disjoint |
disjoint(String propertyName,
Geometry geometry)
|
Divide |
divide(Expression expr1,
Expression expr2)
|
DWithin |
dwithin(Expression geometry1,
Expression geometry2,
double distance,
String units)
|
DWithin |
dwithin(String propertyName,
Geometry geometry,
double distance,
String units)
|
Equals |
equal(Expression geometry1,
Expression geometry2)
|
PropertyIsEqualTo |
equal(Expression expr1,
Expression expr2,
boolean matchCase)
|
PropertyIsEqualTo |
equals(Expression expr1,
Expression expr2)
|
Equals |
equals(String propertyName,
Geometry geometry)
|
FeatureId |
featureId(String id)
|
Function |
function(String name,
Expression arg1)
|
Function |
function(String name,
Expression[] args)
|
Function |
function(String name,
Expression arg1,
Expression arg2)
|
Function |
function(String name,
Expression arg1,
Expression arg2,
Expression arg3)
|
Function |
function(String name,
List<Expression> parameters,
Literal fallback)
Deprecated. Pending see org.opengis.filter.Factory2 |
FunctionName |
functionName(String name,
int nargs)
|
Functions |
functions(FunctionName[] functionNames)
|
Map |
getImplementationHints()
Map of hints (maybe unmodifiable) used by this factory to customize its use. |
GmlObjectId |
gmlObjectId(String id)
|
PropertyIsGreaterThan |
greater(Expression expr1,
Expression expr2)
|
PropertyIsGreaterThan |
greater(Expression expr1,
Expression expr2,
boolean matchCase)
|
PropertyIsGreaterThanOrEqualTo |
greaterOrEqual(Expression expr1,
Expression expr2)
|
PropertyIsGreaterThanOrEqualTo |
greaterOrEqual(Expression expr1,
Expression expr2,
boolean matchCase)
|
Id |
id(Set id)
|
IdCapabilities |
idCapabilities(boolean eid,
boolean fid)
|
Intersects |
intersects(Expression geometry1,
Expression geometry2)
|
Intersects |
intersects(String propertyName,
Geometry geometry)
|
PropertyIsNull |
isNull(Expression expr)
XXX Java 5 type narrowing used to make generated class explicit for chaining |
PropertyIsLessThan |
less(Expression expr1,
Expression expr2)
|
PropertyIsLessThan |
less(Expression expr1,
Expression expr2,
boolean matchCase)
|
PropertyIsLessThanOrEqualTo |
lessOrEqual(Expression expr1,
Expression expr2)
|
PropertyIsLessThanOrEqualTo |
lessOrEqual(Expression expr1,
Expression expr2,
boolean matchCase)
|
PropertyIsLike |
like(Expression expr,
String pattern)
|
PropertyIsLike |
like(Expression expr,
String pattern,
String wildcard,
String singleChar,
String escape)
|
PropertyIsLike |
like(Expression expr,
String pattern,
String wildcard,
String singleChar,
String escape,
boolean matchCase)
|
Literal |
literal(boolean b)
|
Literal |
literal(byte b)
|
Literal |
literal(char c)
|
Literal |
literal(double d)
|
Literal |
literal(float f)
|
Literal |
literal(int i)
|
Literal |
literal(long l)
|
Literal |
literal(Object obj)
|
Literal |
literal(short s)
|
Multiply |
multiply(Expression expr1,
Expression expr2)
|
Not |
not(Filter filter)
Java 5 type narrowing used to advertise explicit implementation for chaining |
Filter |
not(Filter filter)
|
PropertyIsNotEqualTo |
notEqual(Expression expr1,
Expression expr2)
|
PropertyIsNotEqualTo |
notEqual(Expression expr1,
Expression expr2,
boolean matchCase)
|
Operator |
operator(String name)
|
Or |
or(Filter f,
Filter g)
|
Filter |
or(Filter filter1,
Filter filter2)
|
Or |
or(List filters)
|
Overlaps |
overlaps(Expression geometry1,
Expression geometry2)
|
Overlaps |
overlaps(String propertyName,
Geometry geometry)
|
PropertyName |
property(Name name)
|
PropertyName |
property(String name)
|
ScalarCapabilities |
scalarCapabilities(ComparisonOperators comparison,
ArithmeticOperators arithmetic,
boolean logicalOperators)
|
SortBy |
sort(String propertyName,
SortOrder order)
|
SpatialCapabilities |
spatialCapabilities(GeometryOperand[] geometryOperands,
SpatialOperators spatial)
|
SpatialOperator |
spatialOperator(String name,
GeometryOperand[] geometryOperands)
|
SpatialOperators |
spatialOperators(SpatialOperator[] spatialOperators)
|
Subtract |
subtract(Expression expr1,
Expression expr2)
|
Touches |
touches(Expression geometry1,
Expression geometry2)
|
Touches |
touches(String propertyName,
Geometry geometry)
|
Within |
within(Expression geometry1,
Expression geometry2)
|
Within |
within(Expression geometry1,
Geometry geometry2)
|
Within |
within(String propertyName,
Geometry geometry)
|
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FilterFactoryImpl()
public FilterFactoryImpl(Hints hints)
Method Detail |
---|
public FeatureId featureId(String id)
featureId
in interface FilterFactory
public GmlObjectId gmlObjectId(String id)
gmlObjectId
in interface FilterFactory
public And and(Filter f, Filter g)
and
in interface FilterFactory
public And and(List filters)
and
in interface FilterFactory
public Or or(Filter f, Filter g)
or
in interface FilterFactory
public Or or(List filters)
or
in interface FilterFactory
public Not not(Filter filter)
not
in interface FilterFactory
public Id id(Set id)
id
in interface FilterFactory
public PropertyName property(String name)
property
in interface FilterFactory
public PropertyIsBetween between(Expression expr, Expression lower, Expression upper)
between
in interface FilterFactory
public PropertyIsEqualTo equals(Expression expr1, Expression expr2)
equals
in interface FilterFactory
public PropertyIsEqualTo equal(Expression expr1, Expression expr2, boolean matchCase)
equal
in interface FilterFactory
public PropertyIsNotEqualTo notEqual(Expression expr1, Expression expr2)
notEqual
in interface FilterFactory
public PropertyIsNotEqualTo notEqual(Expression expr1, Expression expr2, boolean matchCase)
notEqual
in interface FilterFactory
public PropertyIsGreaterThan greater(Expression expr1, Expression expr2)
greater
in interface FilterFactory
public PropertyIsGreaterThan greater(Expression expr1, Expression expr2, boolean matchCase)
greater
in interface FilterFactory
public PropertyIsGreaterThanOrEqualTo greaterOrEqual(Expression expr1, Expression expr2)
greaterOrEqual
in interface FilterFactory
public PropertyIsGreaterThanOrEqualTo greaterOrEqual(Expression expr1, Expression expr2, boolean matchCase)
greaterOrEqual
in interface FilterFactory
public PropertyIsLessThan less(Expression expr1, Expression expr2)
less
in interface FilterFactory
public PropertyIsLessThan less(Expression expr1, Expression expr2, boolean matchCase)
less
in interface FilterFactory
public PropertyIsLessThanOrEqualTo lessOrEqual(Expression expr1, Expression expr2)
lessOrEqual
in interface FilterFactory
public PropertyIsLessThanOrEqualTo lessOrEqual(Expression expr1, Expression expr2, boolean matchCase)
lessOrEqual
in interface FilterFactory
public PropertyIsLike like(Expression expr, String pattern)
like
in interface FilterFactory
public PropertyIsLike like(Expression expr, String pattern, String wildcard, String singleChar, String escape)
like
in interface FilterFactory
public PropertyIsLike like(Expression expr, String pattern, String wildcard, String singleChar, String escape, boolean matchCase)
like
in interface FilterFactory
like
in interface FilterFactory2
public PropertyIsNull isNull(Expression expr)
isNull
in interface FilterFactory
public BBOX bbox(String propertyName, double minx, double miny, double maxx, double maxy, String srs)
Similar to:
geom().disjoint( geom( bbox )).not()
bbox
in interface FilterFactory
public BBOX bbox(Expression geometry, Expression bounds)
public BBOX bbox(Expression geometry, BoundingBox bounds)
bbox
in interface FilterFactory2
public BBOX bbox(Expression e, double minx, double miny, double maxx, double maxy, String srs)
bbox
in interface FilterFactory2
public Beyond beyond(String propertyName, Geometry geometry, double distance, String units)
beyond
in interface FilterFactory
public Beyond beyond(Expression geometry1, Expression geometry2, double distance, String units)
beyond
in interface FilterFactory2
public Contains contains(String propertyName, Geometry geometry)
contains
in interface FilterFactory
public Contains contains(Expression geometry1, Expression geometry2)
contains
in interface FilterFactory2
public Crosses crosses(String propertyName, Geometry geometry)
crosses
in interface FilterFactory
public Crosses crosses(Expression geometry1, Expression geometry2)
crosses
in interface FilterFactory2
public Disjoint disjoint(String propertyName, Geometry geometry)
disjoint
in interface FilterFactory
public Disjoint disjoint(Expression geometry1, Expression geometry2)
disjoint
in interface FilterFactory2
public DWithin dwithin(String propertyName, Geometry geometry, double distance, String units)
dwithin
in interface FilterFactory
public DWithin dwithin(Expression geometry1, Expression geometry2, double distance, String units)
dwithin
in interface FilterFactory2
public Equals equals(String propertyName, Geometry geometry)
equals
in interface FilterFactory
public Equals equal(Expression geometry1, Expression geometry2)
equal
in interface FilterFactory2
public Intersects intersects(String propertyName, Geometry geometry)
intersects
in interface FilterFactory
public Intersects intersects(Expression geometry1, Expression geometry2)
intersects
in interface FilterFactory2
public Overlaps overlaps(String propertyName, Geometry geometry)
overlaps
in interface FilterFactory
public Overlaps overlaps(Expression geometry1, Expression geometry2)
overlaps
in interface FilterFactory2
public Touches touches(String propertyName, Geometry geometry)
touches
in interface FilterFactory
public Touches touches(Expression geometry1, Expression geometry2)
touches
in interface FilterFactory2
public Within within(String propertyName, Geometry geometry)
within
in interface FilterFactory
public Within within(Expression geometry1, Expression geometry2)
within
in interface FilterFactory2
public Add add(Expression expr1, Expression expr2)
add
in interface FilterFactory
public Divide divide(Expression expr1, Expression expr2)
divide
in interface FilterFactory
public Multiply multiply(Expression expr1, Expression expr2)
multiply
in interface FilterFactory
public Subtract subtract(Expression expr1, Expression expr2)
subtract
in interface FilterFactory
public Function function(String name, Expression[] args)
function
in interface FilterFactory
public Function function(String name, Expression arg1)
function
in interface FilterFactory
public Function function(String name, Expression arg1, Expression arg2)
function
in interface FilterFactory
public Function function(String name, List<Expression> parameters, Literal fallback)
public Function function(String name, Expression arg1, Expression arg2, Expression arg3)
function
in interface FilterFactory
public Literal literal(Object obj)
literal
in interface FilterFactory
public Literal literal(byte b)
literal
in interface FilterFactory
public Literal literal(short s)
literal
in interface FilterFactory
public Literal literal(int i)
literal
in interface FilterFactory
public Literal literal(long l)
literal
in interface FilterFactory
public Literal literal(float f)
literal
in interface FilterFactory
public Literal literal(double d)
literal
in interface FilterFactory
public Literal literal(char c)
literal
in interface FilterFactory
public Literal literal(boolean b)
literal
in interface FilterFactory
public AttributeExpression createAttributeExpression(String xpath)
The supplied xpath can be used to query a varity of content - most notably Features.
public AttributeExpression createAttributeExpression(SimpleFeatureType schema)
schema
- the schema to create with.
public AttributeExpression createAttributeExpression(SimpleFeatureType schema, String path) throws IllegalFilterException
schema
- the schema to get the attribute from.path
- the xPath of the attribute to compare.
IllegalFilterException
- if there were creation problems.public AttributeExpression createAttributeExpression(AttributeDescriptor at) throws IllegalFilterException
IllegalFilterException
public BBoxExpression createBBoxExpression(Envelope env) throws IllegalFilterException
env
- the envelope to use for this bounding box.
IllegalFilterException
- if there were creation problems.public BetweenFilter createBetweenFilter() throws IllegalFilterException
IllegalFilterException
- if there were creation problems.public CompareFilter createCompareFilter(short type) throws IllegalFilterException
type
- the type of comparison - must be a compare type.
IllegalFilterException
- if there were creation problems.public FidFilter createFidFilter()
public FidFilter createFidFilter(String fid)
fid
- the feature ID to create with.
public GeometryFilter createGeometryFilter(short filterType) throws IllegalFilterException
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 LikeFilter createLikeFilter()
public LiteralExpression createLiteralExpression()
public LiteralExpression createLiteralExpression(Object o) throws IllegalFilterException
o
- the object to serve as the literal.
IllegalFilterException
- if there were creation problems.public LiteralExpression createLiteralExpression(int i)
i
- the int to serve as literal.
public LiteralExpression createLiteralExpression(double d)
d
- the double to serve as the literal.
public LiteralExpression createLiteralExpression(String s)
s
- the string to serve as the literal.
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 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 MathExpression createMathExpression()
FilterFactory.add(Expression, Expression)
FilterFactory.subtract(Expression, Expression)
FilterFactory.multiply(Expression, Expression)
FilterFactory.divide(Expression, Expression)
public MathExpression createMathExpression(short expressionType) throws IllegalFilterException
expressionType
- must be a math expression type.
IllegalFilterException
- if there were creation problems.public FunctionExpression createFunctionExpression(String name)
name
- the function name.
public NullFilter createNullFilter()
public EnvironmentVariable createEnvironmentVariable(String name)
public Map getImplementationHints()
Factory
FactoryUsingVolatileDependencies
).
The primary purpose of this method is to determine if an existing
factory instance can be reused for a set of user-supplied hints. This method is invoked by
FactoryRegistry
in order to compare this factory's hints against user's hints.
This is dependency introspection only; FactoryRegistry
never
invokes this method for creating new factories.
Keys are usually static constants from the Hints
class, while values are
instances of some key-dependent class. The key set must contains
at least all hints impacting functionality. While the key set may contains all hints
supplied by the user, it is recommended to limit the set to only the hints used by this
particular factory instance. A minimal set will helps FactoryRegistry
to compare
only hints that matter and avoid the creation of unnecessary instances of this factory.
The hint values may be different than the one supplied by the user. If a user supplied a
hint as a Class
object, this method shall replace it by the actual instance used,
if possible.
Implementations of this method are usually quite simple. For example if a datum authority factory uses an ordinary datum factory, its method could be implemented as below (note that we should not check if the datum factory is null, since key with null value is the expected behaviour in this case). Example:
Map hints = new HashMap();
hints.put(Hints.DATUM_FACTORY, datumFactory);
return hints;
getImplementationHints
in interface Factory
public SortBy sort(String propertyName, SortOrder order)
sort
in interface FilterFactory
public Filter and(Filter filter1, Filter filter2)
public Filter not(Filter filter)
public Filter or(Filter filter1, Filter filter2)
public Beyond beyond(Expression geometry1, Geometry geometry2, double distance, String units)
public PropertyName property(Name name)
property
in interface FilterFactory2
public Within within(Expression geometry1, Geometry geometry2)
public Operator operator(String name)
operator
in interface FilterFactory
public SpatialOperator spatialOperator(String name, GeometryOperand[] geometryOperands)
spatialOperator
in interface FilterFactory
public FunctionName functionName(String name, int nargs)
functionName
in interface FilterFactory
public Functions functions(FunctionName[] functionNames)
functions
in interface FilterFactory
public SpatialOperators spatialOperators(SpatialOperator[] spatialOperators)
spatialOperators
in interface FilterFactory
public ArithmeticOperators arithmeticOperators(boolean simple, Functions functions)
arithmeticOperators
in interface FilterFactory
public ComparisonOperators comparisonOperators(Operator[] comparisonOperators)
comparisonOperators
in interface FilterFactory
public FilterCapabilities capabilities(String version, ScalarCapabilities scalar, SpatialCapabilities spatial, IdCapabilities id)
capabilities
in interface FilterFactory
public ScalarCapabilities scalarCapabilities(ComparisonOperators comparison, ArithmeticOperators arithmetic, boolean logicalOperators)
scalarCapabilities
in interface FilterFactory
public SpatialCapabilities spatialCapabilities(GeometryOperand[] geometryOperands, SpatialOperators spatial)
spatialCapabilities
in interface FilterFactory
public IdCapabilities idCapabilities(boolean eid, boolean fid)
idCapabilities
in interface FilterFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |