|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.filter.Expr org.geotools.filter.FilterFactoryImpl
Implementation of the FilterFactory, generates the filter implementations in defaultcore.
Constructor Summary | |
FilterFactoryImpl()
Creates a new instance of FilterFactoryImpl |
Method Summary | |
Filter |
and(Filter f1,
Filter f2)
|
AttributeExpression |
createAttributeExpression(AttributeType at)
Shortcut the process - will only grab values matching AttributeType. |
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. |
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. @see org.geotools.filter.FilterFactory#createCompareFilter(short) |
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)
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. |
java.util.Map |
getImplementationHints()
Map of hints (maybe unmodifiable) used by this factory to customize its use. |
Filter |
not(Filter f)
|
Filter |
or(Filter f1,
Filter f2)
|
org.opengis.filter.sort.SortBy |
sort(java.lang.String propertyName,
org.opengis.filter.sort.SortOrder order)
|
Methods inherited from class org.geotools.filter.Expr |
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, subtract, touches, within |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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, subtract, touches, within |
Constructor Detail |
public FilterFactoryImpl()
Method Detail |
public AttributeExpression createAttributeExpression(java.lang.String xpath)
The supplied xpath can be used to query a varity of content - most notably Features.
createAttributeExpression
in interface FilterFactory
xpath
- XPath used to retrive value
public AttributeExpression createAttributeExpression(FeatureType schema)
createAttributeExpression
in interface FilterFactory
schema
- the schema to create with.
public AttributeExpression createAttributeExpression(FeatureType schema, java.lang.String path) throws IllegalFilterException
createAttributeExpression
in interface FilterFactory
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(AttributeType at) throws IllegalFilterException
FilterFactory
createAttributeExpression
in interface FilterFactory
at
-
IllegalFilterException
- if there were creation problemspublic BBoxExpression createBBoxExpression(com.vividsolutions.jts.geom.Envelope env) throws IllegalFilterException
createBBoxExpression
in interface FilterFactory
env
- the envelope to use for this bounding box.
IllegalFilterException
- if there were creation problems.public BetweenFilter createBetweenFilter() throws IllegalFilterException
createBetweenFilter
in interface FilterFactory
IllegalFilterException
- if there were creation problems.public CompareFilter createCompareFilter(short type) throws IllegalFilterException
createCompareFilter
in interface FilterFactory
type
- the type of comparison - must be a compare type.
IllegalFilterException
- if there were creation problems.public FidFilter createFidFilter()
createFidFilter
in interface FilterFactory
public FidFilter createFidFilter(java.lang.String fid)
createFidFilter
in interface FilterFactory
fid
- the feature ID to create with.
public GeometryFilter createGeometryFilter(short filterType) throws IllegalFilterException
createGeometryFilter
in interface FilterFactory
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
createGeometryDistanceFilter
in interface FilterFactory
filterType
- the type to create, must be beyond or dwithin.
IllegalFilterException
- if the filterType is not a geometry
distance type.public LikeFilter createLikeFilter()
createLikeFilter
in interface FilterFactory
public LiteralExpression createLiteralExpression()
createLiteralExpression
in interface FilterFactory
public LiteralExpression createLiteralExpression(java.lang.Object o) throws IllegalFilterException
createLiteralExpression
in interface FilterFactory
o
- the object to serve as the literal.
IllegalFilterException
- if there were creation problems.public LiteralExpression createLiteralExpression(int i)
createLiteralExpression
in interface FilterFactory
i
- the int to serve as literal.
public LiteralExpression createLiteralExpression(double d)
createLiteralExpression
in interface FilterFactory
d
- the double to serve as the literal.
public LiteralExpression createLiteralExpression(java.lang.String s)
createLiteralExpression
in interface FilterFactory
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)
createLogicFilter
in interface FilterFactory
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)
createLogicFilter
in interface FilterFactory
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)
createLogicFilter
in interface FilterFactory
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)
createMathExpression
in interface FilterFactory
public MathExpression createMathExpression(short expressionType) throws IllegalFilterException
createMathExpression
in interface FilterFactory
expressionType
- must be a math expression type.
IllegalFilterException
- if there were creation problems.public FunctionExpression createFunctionExpression(java.lang.String name)
createFunctionExpression
in interface FilterFactory
name
- the function name.
public NullFilter createNullFilter()
createNullFilter
in interface FilterFactory
public EnvironmentVariable createEnvironmentVariable(java.lang.String name)
FilterFactory
createEnvironmentVariable
in interface FilterFactory
name
- the function name.
public java.util.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; 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 compares
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 Filter and(Filter f1, Filter f2)
and
in interface FilterFactory
public Filter or(Filter f1, Filter f2)
or
in interface FilterFactory
public Filter not(Filter f)
not
in interface FilterFactory
public org.opengis.filter.sort.SortBy sort(java.lang.String propertyName, org.opengis.filter.sort.SortOrder order)
sort
in interface org.opengis.filter.FilterFactory
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |