org.geotools.filter
Class BBoxExpressionImpl

Object
  extended by ExpressionAbstract
      extended by DefaultExpression
          extended by LiteralExpressionImpl
              extended by BBoxExpressionImpl
All Implemented Interfaces:
BBoxExpression, ExpressionType, LiteralExpression, Expression, Literal

public class BBoxExpressionImpl
extends LiteralExpressionImpl
implements BBoxExpression

Implements a Bounding Box expression.

Please note this is exactly the same as doing: filterFactory.literal( JTS.toGeometry( bounds ) );

Author:
Ian Turton, CCG
Module:

Field Summary
 
Fields inherited from class DefaultExpression
expressionType, permissiveConstruction
 
Fields inherited from interface ExpressionType
ATTRIBUTE, ATTRIBUTE_DOUBLE, ATTRIBUTE_GEOMETRY, ATTRIBUTE_INTEGER, ATTRIBUTE_STRING, ATTRIBUTE_UNDECLARED, FUNCTION, LITERAL_DOUBLE, LITERAL_GEOMETRY, LITERAL_INTEGER, LITERAL_LONG, LITERAL_STRING, LITERAL_UNDECLARED, MATH_ADD, MATH_DIVIDE, MATH_MULTIPLY, MATH_SUBTRACT
 
Fields inherited from interface Expression
NIL
 
Fields inherited from interface Expression
NIL
 
Constructor Summary
protected BBoxExpressionImpl()
          Creates a new instance of BBoxExpression
protected BBoxExpressionImpl(Envelope env)
          Creates a new instance of BBoxExpression, with an initial box.
 
Method Summary
 void setBounds(Envelope env)
          Set the bbox for this expression
 
Methods inherited from class LiteralExpressionImpl
accept, equals, evaluate, evaluate, evaluate, getLiteral, getType, getValue, hashCode, setLiteral, setValue, toString
 
Methods inherited from class DefaultExpression
accept, getValue, isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression, isMathExpression
 
Methods inherited from class ExpressionAbstract
eval, eval
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface LiteralExpression
getLiteral, getType, getValue, setLiteral
 
Methods inherited from interface Expression
accept, evaluate
 
Methods inherited from interface Expression
accept, evaluate, evaluate
 
Methods inherited from interface Literal
getValue
 
Methods inherited from interface Expression
accept, evaluate, evaluate
 

Constructor Detail

BBoxExpressionImpl

protected BBoxExpressionImpl()
                      throws IllegalFilterException
Creates a new instance of BBoxExpression

Throws:
IllegalFilterException - if there are problems.

BBoxExpressionImpl

protected BBoxExpressionImpl(Envelope env)
                      throws IllegalFilterException
Creates a new instance of BBoxExpression, with an initial box.

Parameters:
env - the envelope to set as the box.
Throws:
IllegalFilterException - if there are problems.
Method Detail

setBounds

public final void setBounds(Envelope env)
                     throws IllegalFilterException
Set the bbox for this expression

Specified by:
setBounds in interface BBoxExpression
Parameters:
env - The envelope to set as the bounds.
Throws:
IllegalFilterException - If the box can not be created.
TODO:
HACK: currently sets the SRID to null, which can cause problems with JTS when it comes to doing spatial tests


Copyright © 1996-2009 Geotools. All Rights Reserved.