deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.model.filterencoding
Class Function

java.lang.Object
  extended by org.deegree.model.filterencoding.Expression
      extended by org.deegree.model.filterencoding.Function
Direct Known Subclasses:
DBFunction, FunctionNormalize, FunctionSoundex

public abstract class Function
extends Expression

Encapsulates the information of a Functionelement 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  java.util.List<Expression> args
          The Function's arguments.
protected  java.lang.String name
          The Function's name (as specified in it's name attribute).
 
Fields inherited from class org.deegree.model.filterencoding.Expression
id
 
Constructor Summary
protected Function()
           
  Function(java.lang.String name, java.util.List<Expression> args)
          Constructs a new Function.
 
Method Summary
static Expression buildFromDOM(org.w3c.dom.Element element)
          Given a DOM-fragment, a corresponding Expression-object is built.
abstract  java.lang.Object evaluate(Feature feature)
          Returns the Function's value (to be used in the evaluation of a complexer Expression).
 java.util.List<Expression> getArguments()
          returns the arguments of the function
 int getExpressionId()
           
 java.lang.String getName()
          Returns the Function's name.
 void setArguments(java.util.List<Expression> args)
           
 void setName(java.lang.String name)
           
 java.lang.StringBuffer toXML()
          Produces an indented XML representation of this object.
 
Methods inherited from class org.deegree.model.filterencoding.Expression
getExpressionName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
The Function's name (as specified in it's name attribute).


args

protected java.util.List<Expression> args
The Function's arguments.

Constructor Detail

Function

protected Function()

Function

public Function(java.lang.String name,
                java.util.List<Expression> args)
Constructs a new Function.

Parameters:
name -
args -
Method Detail

setArguments

public void setArguments(java.util.List<Expression> args)
Parameters:
args -

buildFromDOM

public static Expression buildFromDOM(org.w3c.dom.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 java.lang.String getName()
Returns the Function's name.

Returns:
functions name

setName

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

getArguments

public java.util.List<Expression> getArguments()
returns the arguments of the function

Returns:
arguments of the function

getExpressionId

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

evaluate

public abstract java.lang.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

toXML

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

Specified by:
toXML in class Expression
Returns:
xml representation

deegree 2.5 (2011/06/29 09:44 build-8-official)

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