org.geotools.filter
Class Expr

java.lang.Object
  extended byorg.geotools.filter.Expr
All Implemented Interfaces:
Factory, FilterFactory, org.opengis.filter.FilterFactory
Direct Known Subclasses:
FilterFactoryImpl

public abstract class Expr
extends java.lang.Object
implements FilterFactory

This is FilterFactory for a very interesting implementation of Filter / Expression.

Here is what Expr is all about:

This will make user of Java 5 type narrowing (so the FilterFactory methods will return subtypes of Expr).

Note: FilterExpr is considered a normal Expr in which the result is known to beboolean.

This method also implements the "chaining" concept you see in the collections lib. This allows you to chain together a series of method calls to build up your expression on a single line of java code.

From a modeling standpoint the chaining idea is incidental (it adds no expressive power), it is simply a convience to users. It is also the motivation for Expr being both an abstract class and Factory.

Author:
Jody Garnett

Constructor Summary
Expr()
           
 
Method Summary
 org.opengis.filter.expression.Add add(org.opengis.filter.expression.Expression expr1, org.opengis.filter.expression.Expression expr2)
           
 org.opengis.filter.And and(org.opengis.filter.Filter f, org.opengis.filter.Filter g)
           
 org.opengis.filter.And and(java.util.List filters)
           
 org.opengis.filter.spatial.BBOX bbox(java.lang.String propertyName, double minx, double miny, double maxx, double maxy, java.lang.String srs)
          Checks if the bounding box of the feature's geometry overlaps the specified bounding box.
 org.opengis.filter.PropertyIsBetween between(org.opengis.filter.expression.Expression expr, org.opengis.filter.expression.Expression lower, org.opengis.filter.expression.Expression upper)
           
 org.opengis.filter.spatial.Beyond beyond(java.lang.String propertyName, org.opengis.spatialschema.geometry.Geometry geometry, double distance, java.lang.String units)
           
 org.opengis.filter.spatial.Contains contains(java.lang.String propertyName, org.opengis.spatialschema.geometry.Geometry geometry)
           
 org.opengis.filter.spatial.Crosses crosses(java.lang.String propertyName, org.opengis.spatialschema.geometry.Geometry geometry)
           
 org.opengis.filter.spatial.Disjoint disjoint(java.lang.String propertyName, org.opengis.spatialschema.geometry.Geometry geometry)
           
 org.opengis.filter.expression.Divide divide(org.opengis.filter.expression.Expression expr1, org.opengis.filter.expression.Expression expr2)
           
 org.opengis.filter.spatial.DWithin dwithin(java.lang.String propertyName, org.opengis.spatialschema.geometry.Geometry geometry, double distance, java.lang.String units)
           
 org.opengis.filter.PropertyIsEqualTo equals(org.opengis.filter.expression.Expression expr1, org.opengis.filter.expression.Expression expr2)
           
 org.opengis.filter.spatial.Equals equals(java.lang.String propertyName, org.opengis.spatialschema.geometry.Geometry geometry)
           
 org.opengis.filter.FeatureId featureId(java.util.Set ids)
           
 org.opengis.filter.expression.Function function(java.lang.String name, org.opengis.filter.expression.Expression arg1)
           
 org.opengis.filter.expression.Function function(java.lang.String name, org.opengis.filter.expression.Expression[] args)
           
 org.opengis.filter.expression.Function function(java.lang.String name, org.opengis.filter.expression.Expression arg1, org.opengis.filter.expression.Expression arg2)
           
 org.opengis.filter.expression.Function function(java.lang.String name, org.opengis.filter.expression.Expression arg1, org.opengis.filter.expression.Expression arg2, org.opengis.filter.expression.Expression arg3)
           
 org.opengis.filter.PropertyIsGreaterThan greater(org.opengis.filter.expression.Expression expr1, org.opengis.filter.expression.Expression expr2)
           
 org.opengis.filter.PropertyIsGreaterThanOrEqualTo greaterOrEqual(org.opengis.filter.expression.Expression expr1, org.opengis.filter.expression.Expression expr2)
           
 org.opengis.filter.spatial.Intersects intersects(java.lang.String propertyName, org.opengis.spatialschema.geometry.Geometry geometry)
           
 org.opengis.filter.PropertyIsNull isNull(org.opengis.filter.expression.Expression expr)
          XXX Java 5 type narrowing used to make generated class explicit for chaining
 org.opengis.filter.PropertyIsLessThan less(org.opengis.filter.expression.Expression expr1, org.opengis.filter.expression.Expression expr2)
           
 org.opengis.filter.PropertyIsLessThanOrEqualTo lessOrEqual(org.opengis.filter.expression.Expression expr1, org.opengis.filter.expression.Expression expr2)
           
 org.opengis.filter.PropertyIsLike like(org.opengis.filter.expression.Expression expr, java.lang.String pattern)
           
 org.opengis.filter.PropertyIsLike like(org.opengis.filter.expression.Expression expr, java.lang.String pattern, java.lang.String wildcard, java.lang.String singleChar, java.lang.String escape)
           
 org.opengis.filter.expression.Literal literal(boolean b)
           
 org.opengis.filter.expression.Literal literal(byte b)
           
 org.opengis.filter.expression.Literal literal(char c)
           
 org.opengis.filter.expression.Literal literal(double d)
           
 org.opengis.filter.expression.Literal literal(float f)
           
 org.opengis.filter.expression.Literal literal(int i)
           
 org.opengis.filter.expression.Literal literal(long l)
           
 org.opengis.filter.expression.Literal literal(java.lang.Object obj)
           
 org.opengis.filter.expression.Literal literal(short s)
           
 org.opengis.filter.expression.Multiply multiply(org.opengis.filter.expression.Expression expr1, org.opengis.filter.expression.Expression expr2)
           
 org.opengis.filter.Not not(org.opengis.filter.Filter filter)
          Java 5 type narrowing used to advertise explicit implementation for chaining
 org.opengis.filter.Or or(org.opengis.filter.Filter f, org.opengis.filter.Filter g)
           
 org.opengis.filter.Or or(java.util.List filters)
           
 org.opengis.filter.spatial.Overlaps overlaps(java.lang.String propertyName, org.opengis.spatialschema.geometry.Geometry geometry)
           
 org.opengis.filter.expression.PropertyName property(java.lang.String name)
           
 org.opengis.filter.expression.Subtract subtract(org.opengis.filter.expression.Expression expr1, org.opengis.filter.expression.Expression expr2)
           
 org.opengis.filter.spatial.Touches touches(java.lang.String propertyName, org.opengis.spatialschema.geometry.Geometry geometry)
           
 org.opengis.filter.spatial.Within within(java.lang.String propertyName, org.opengis.spatialschema.geometry.Geometry geometry)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.geotools.filter.FilterFactory
and, createAttributeExpression, createAttributeExpression, createAttributeExpression, createAttributeExpression, createBBoxExpression, createBetweenFilter, createCompareFilter, createEnvironmentVariable, createFidFilter, createFidFilter, createFunctionExpression, createGeometryDistanceFilter, createGeometryFilter, createLikeFilter, createLiteralExpression, createLiteralExpression, createLiteralExpression, createLiteralExpression, createLiteralExpression, createLogicFilter, createLogicFilter, createLogicFilter, createMathExpression, createMathExpression, createNullFilter, not, or
 
Methods inherited from interface org.geotools.factory.Factory
getImplementationHints
 
Methods inherited from interface org.opengis.filter.FilterFactory
sort
 

Constructor Detail

Expr

public Expr()
Method Detail

and

public org.opengis.filter.And and(org.opengis.filter.Filter f,
                                  org.opengis.filter.Filter g)
Specified by:
and in interface org.opengis.filter.FilterFactory

and

public org.opengis.filter.And and(java.util.List filters)
Specified by:
and in interface org.opengis.filter.FilterFactory

or

public org.opengis.filter.Or or(org.opengis.filter.Filter f,
                                org.opengis.filter.Filter g)
Specified by:
or in interface org.opengis.filter.FilterFactory

or

public org.opengis.filter.Or or(java.util.List filters)
Specified by:
or in interface org.opengis.filter.FilterFactory

not

public org.opengis.filter.Not not(org.opengis.filter.Filter filter)
Java 5 type narrowing used to advertise explicit implementation for chaining

Specified by:
not in interface org.opengis.filter.FilterFactory

featureId

public org.opengis.filter.FeatureId featureId(java.util.Set ids)
Specified by:
featureId in interface org.opengis.filter.FilterFactory

property

public org.opengis.filter.expression.PropertyName property(java.lang.String name)
Specified by:
property in interface org.opengis.filter.FilterFactory

between

public org.opengis.filter.PropertyIsBetween between(org.opengis.filter.expression.Expression expr,
                                                    org.opengis.filter.expression.Expression lower,
                                                    org.opengis.filter.expression.Expression upper)
Specified by:
between in interface org.opengis.filter.FilterFactory

equals

public org.opengis.filter.PropertyIsEqualTo equals(org.opengis.filter.expression.Expression expr1,
                                                   org.opengis.filter.expression.Expression expr2)
Specified by:
equals in interface org.opengis.filter.FilterFactory

greater

public org.opengis.filter.PropertyIsGreaterThan greater(org.opengis.filter.expression.Expression expr1,
                                                        org.opengis.filter.expression.Expression expr2)
Specified by:
greater in interface org.opengis.filter.FilterFactory

greaterOrEqual

public org.opengis.filter.PropertyIsGreaterThanOrEqualTo greaterOrEqual(org.opengis.filter.expression.Expression expr1,
                                                                        org.opengis.filter.expression.Expression expr2)
Specified by:
greaterOrEqual in interface org.opengis.filter.FilterFactory

less

public org.opengis.filter.PropertyIsLessThan less(org.opengis.filter.expression.Expression expr1,
                                                  org.opengis.filter.expression.Expression expr2)
Specified by:
less in interface org.opengis.filter.FilterFactory

lessOrEqual

public org.opengis.filter.PropertyIsLessThanOrEqualTo lessOrEqual(org.opengis.filter.expression.Expression expr1,
                                                                  org.opengis.filter.expression.Expression expr2)
Specified by:
lessOrEqual in interface org.opengis.filter.FilterFactory

like

public org.opengis.filter.PropertyIsLike like(org.opengis.filter.expression.Expression expr,
                                              java.lang.String pattern)
Specified by:
like in interface org.opengis.filter.FilterFactory

like

public org.opengis.filter.PropertyIsLike like(org.opengis.filter.expression.Expression expr,
                                              java.lang.String pattern,
                                              java.lang.String wildcard,
                                              java.lang.String singleChar,
                                              java.lang.String escape)
Specified by:
like in interface org.opengis.filter.FilterFactory

isNull

public org.opengis.filter.PropertyIsNull isNull(org.opengis.filter.expression.Expression expr)
XXX Java 5 type narrowing used to make generated class explicit for chaining

Specified by:
isNull in interface org.opengis.filter.FilterFactory

bbox

public org.opengis.filter.spatial.BBOX bbox(java.lang.String propertyName,
                                            double minx,
                                            double miny,
                                            double maxx,
                                            double maxy,
                                            java.lang.String srs)
Checks if the bounding box of the feature's geometry overlaps the specified bounding box.

Similar to: geom().disjoint( geom( bbox )).not()

Specified by:
bbox in interface org.opengis.filter.FilterFactory

beyond

public org.opengis.filter.spatial.Beyond beyond(java.lang.String propertyName,
                                                org.opengis.spatialschema.geometry.Geometry geometry,
                                                double distance,
                                                java.lang.String units)
Specified by:
beyond in interface org.opengis.filter.FilterFactory

contains

public org.opengis.filter.spatial.Contains contains(java.lang.String propertyName,
                                                    org.opengis.spatialschema.geometry.Geometry geometry)
Specified by:
contains in interface org.opengis.filter.FilterFactory

crosses

public org.opengis.filter.spatial.Crosses crosses(java.lang.String propertyName,
                                                  org.opengis.spatialschema.geometry.Geometry geometry)
Specified by:
crosses in interface org.opengis.filter.FilterFactory

disjoint

public org.opengis.filter.spatial.Disjoint disjoint(java.lang.String propertyName,
                                                    org.opengis.spatialschema.geometry.Geometry geometry)
Specified by:
disjoint in interface org.opengis.filter.FilterFactory

dwithin

public org.opengis.filter.spatial.DWithin dwithin(java.lang.String propertyName,
                                                  org.opengis.spatialschema.geometry.Geometry geometry,
                                                  double distance,
                                                  java.lang.String units)
Specified by:
dwithin in interface org.opengis.filter.FilterFactory

equals

public org.opengis.filter.spatial.Equals equals(java.lang.String propertyName,
                                                org.opengis.spatialschema.geometry.Geometry geometry)
Specified by:
equals in interface org.opengis.filter.FilterFactory

intersects

public org.opengis.filter.spatial.Intersects intersects(java.lang.String propertyName,
                                                        org.opengis.spatialschema.geometry.Geometry geometry)
Specified by:
intersects in interface org.opengis.filter.FilterFactory

overlaps

public org.opengis.filter.spatial.Overlaps overlaps(java.lang.String propertyName,
                                                    org.opengis.spatialschema.geometry.Geometry geometry)
Specified by:
overlaps in interface org.opengis.filter.FilterFactory

touches

public org.opengis.filter.spatial.Touches touches(java.lang.String propertyName,
                                                  org.opengis.spatialschema.geometry.Geometry geometry)
Specified by:
touches in interface org.opengis.filter.FilterFactory

within

public org.opengis.filter.spatial.Within within(java.lang.String propertyName,
                                                org.opengis.spatialschema.geometry.Geometry geometry)
Specified by:
within in interface org.opengis.filter.FilterFactory

add

public org.opengis.filter.expression.Add add(org.opengis.filter.expression.Expression expr1,
                                             org.opengis.filter.expression.Expression expr2)
Specified by:
add in interface org.opengis.filter.FilterFactory

divide

public org.opengis.filter.expression.Divide divide(org.opengis.filter.expression.Expression expr1,
                                                   org.opengis.filter.expression.Expression expr2)
Specified by:
divide in interface org.opengis.filter.FilterFactory

multiply

public org.opengis.filter.expression.Multiply multiply(org.opengis.filter.expression.Expression expr1,
                                                       org.opengis.filter.expression.Expression expr2)
Specified by:
multiply in interface org.opengis.filter.FilterFactory

subtract

public org.opengis.filter.expression.Subtract subtract(org.opengis.filter.expression.Expression expr1,
                                                       org.opengis.filter.expression.Expression expr2)
Specified by:
subtract in interface org.opengis.filter.FilterFactory

function

public org.opengis.filter.expression.Function function(java.lang.String name,
                                                       org.opengis.filter.expression.Expression[] args)
Specified by:
function in interface org.opengis.filter.FilterFactory

function

public org.opengis.filter.expression.Function function(java.lang.String name,
                                                       org.opengis.filter.expression.Expression arg1)
Specified by:
function in interface org.opengis.filter.FilterFactory

function

public org.opengis.filter.expression.Function function(java.lang.String name,
                                                       org.opengis.filter.expression.Expression arg1,
                                                       org.opengis.filter.expression.Expression arg2)
Specified by:
function in interface org.opengis.filter.FilterFactory

function

public org.opengis.filter.expression.Function function(java.lang.String name,
                                                       org.opengis.filter.expression.Expression arg1,
                                                       org.opengis.filter.expression.Expression arg2,
                                                       org.opengis.filter.expression.Expression arg3)
Specified by:
function in interface org.opengis.filter.FilterFactory

literal

public org.opengis.filter.expression.Literal literal(java.lang.Object obj)
Specified by:
literal in interface org.opengis.filter.FilterFactory

literal

public org.opengis.filter.expression.Literal literal(byte b)
Specified by:
literal in interface org.opengis.filter.FilterFactory

literal

public org.opengis.filter.expression.Literal literal(short s)
Specified by:
literal in interface org.opengis.filter.FilterFactory

literal

public org.opengis.filter.expression.Literal literal(int i)
Specified by:
literal in interface org.opengis.filter.FilterFactory

literal

public org.opengis.filter.expression.Literal literal(long l)
Specified by:
literal in interface org.opengis.filter.FilterFactory

literal

public org.opengis.filter.expression.Literal literal(float f)
Specified by:
literal in interface org.opengis.filter.FilterFactory

literal

public org.opengis.filter.expression.Literal literal(double d)
Specified by:
literal in interface org.opengis.filter.FilterFactory

literal

public org.opengis.filter.expression.Literal literal(char c)
Specified by:
literal in interface org.opengis.filter.FilterFactory

literal

public org.opengis.filter.expression.Literal literal(boolean b)
Specified by:
literal in interface org.opengis.filter.FilterFactory


Copyright © GeoTools. All Rights Reserved.