deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.model.filterencoding
Class Expression

java.lang.Object
  extended by org.deegree.model.filterencoding.Expression
Direct Known Subclasses:
ArithmeticExpression, Function, Literal, PropertyName

public abstract class Expression
extends Object

Abstract superclass representing expr-entities (as defined in the Expression DTD).

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Field Summary
protected  int id
          The underlying expression's id.
 
Constructor Summary
Expression()
           
 
Method Summary
static Expression buildFromDOM(Element element)
          Given a DOM-fragment, a corresponding Expression-object is built.
abstract  Object evaluate(Feature feature)
          Calculates the Expression's value based on the certain property values of the given feature.
 int getExpressionId()
           
 String getExpressionName()
           
abstract  StringBuffer toXML()
          Produces an XML representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected int id
The underlying expression's id.

See Also:
ExpressionDefines
Constructor Detail

Expression

public Expression()
Method Detail

buildFromDOM

public static Expression buildFromDOM(Element element)
                               throws FilterConstructionException
Given a DOM-fragment, a corresponding Expression-object is built. This method recursively calls other buildFromDOM () - methods to validate the structure of the DOM-fragment.

Parameters:
element -
Returns:
the Bean of the DOM
Throws:
FilterConstructionException - if the structure of the DOM-fragment is invalid

getExpressionName

public String getExpressionName()
Returns:
the name of the expression.

getExpressionId

public int getExpressionId()
Returns:
the expression's id.
See Also:
ExpressionDefines

evaluate

public abstract Object evaluate(Feature feature)
                         throws FilterEvaluationException
Calculates the Expression's value based on the certain property values of the given feature.

Parameters:
feature - that determines the values of PropertyNames in the expression
Returns:
the resulting Object
Throws:
FilterEvaluationException - if the evaluation fails

toXML

public abstract StringBuffer toXML()
Produces an XML representation of this object.

Returns:
an XML representation of this object

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org