Package org.geotools.expr

Provides an Extended Expression/Filter syntax supporting experimentation with DataStore JOIN and FeatureType schema modification.

See:
          Description

Interface Summary
Expr Filter/Expression construction kit - this class forms chains.
GeometryExpr Expr known to be a Geometry type.
MathExpr Expr known to be a mathmatical type.
ResolvedExpr Used to mark expression that have been resolved to a constant.
 

Class Summary
AbstractGeometryExpr Default implementation of GeometryExpr.
AbstractMathExpr  
AttributeExpr Retrive attribute from Feature.
AttributeGeometryExpr  
AttributeMathExpr Retrive attribute from Feature.
Exprs Filter/Expression construction kit - this class starts off chains.
FidsExpr  
FunctionExpr  
LiteralExpr Provides a literal for use with Expr.
LiteralGeometryExpr  
LiteralMathExpr  
MetadataExpr Retrive attribute from Feature.
 

Package org.geotools.expr Description

Provides an Extended Expression/Filter syntax supporting experimentation with DataStore JOIN and FeatureType schema modification.

Comparison with FilterFactory

Example Expr:


Exprs.bbox( extent ).and( Exprs.attribute("cost").lt( 50 ) )

Example Filter:


Expression extentExpression =
	factory.createBBoxExpression( bbox );

String geomName = featureType.getDefaultGeometry().getName()
Expression geomExpression =
	factory.createAttributeExpression( featureType, geomName );	    

GeometryFilter disjointExpression =
	factory.createGeometryFilter( GeometryFilter.GEOMETRY_DISJOINT );
disjointExpression.addLeftGeometry( geomExpression );
disjointExpression.addRightGeometry( extentExpression );	    

Filter bboxFilter = disjointExpression.not();	    

AttributeExpression costExpression =
	factory.createAttributeExpression( featureType, "cost" );
	
CompareFilter lessThanFilter =
	factory.createCompareFilter( CompareFilter.COMPARE_LESS_THAN );
lessThanFilter.addLeftValue( costExpression );
lessThanFilter.addRightValue( factory.createLiteralExpression( 50 ) );	    

LogicFilter filter = factory.createLogicFilter( bboxFilter, lessThanFilter, LogicFilter.LOGIC_AND);	    

Package Specification

This package is based on the OGC Filter specification.

Related Documentation

The following classes are used by the java.text classes. For overviews, tutorials, examples, guides, and tool documentation, please see:



Copyright © GeoTools. All Rights Reserved.