deegree 2.1 (2007/11/08 09:57 build-328-official)

org.deegree.model.filterencoding
Class Function

java.lang.Object
  extended by org.deegree.model.filterencoding.Expression
      extended by org.deegree.model.filterencoding.Function

public class Function
extends Expression

Encapsulates the information of a Functionelement as defined in the Expression DTD.

Version:
07.08.2002
Author:
Markus Schneider

Field Summary
 
Fields inherited from class org.deegree.model.filterencoding.Expression
id
 
Constructor Summary
Function(String name, List args)
          Constructs a new Function.
 
Method Summary
static Expression buildFromDOM(Element element)
          Given a DOM-fragment, a corresponding Expression-object is built.
 Object evaluate(Feature feature)
          Returns the Function's value (to be used in the evaluation of a complexer Expression).
 List getArguments()
          returns the arguments of the function
 String getName()
          Returns the Function's name.
 void setName(String name)
           
 StringBuffer toXML()
          Produces an indented XML representation of this object.
 
Methods inherited from class org.deegree.model.filterencoding.Expression
getExpressionId, getExpressionName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Function

public Function(String name,
                List args)
Constructs a new Function.

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.

Throws:
FilterConstructionException - if the structure of the DOM-fragment is invalid

getName

public String getName()
Returns the Function's name.

Returns:
functions name

setName

public void setName(String name)
Parameters:
name -
See Also:
getName()

getArguments

public List getArguments()
returns the arguments of the function

Returns:
arguments of the function

toXML

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

Specified by:
toXML in class Expression
Returns:
xml representation

evaluate

public Object evaluate(Feature feature)
                throws FilterEvaluationException
Returns the Function's value (to be used in the evaluation of a complexer Expression).

Specified by:
evaluate in class Expression
Parameters:
feature - that determines the concrete values of PropertyNames found in the expression
Returns:
the resulting value
Throws:
FilterEvaluationException - if the evaluation fails

deegree 2.1 (2007/11/08 09:57 build-328-official)

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