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

org.deegree.model.filterencoding
Class Literal

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

public class Literal
extends Expression

Encapsulates the information of a element as defined in the FeatureId DTD.

Version:
07.08.2002
Author:
Markus Schneider

Field Summary
 
Fields inherited from class org.deegree.model.filterencoding.Expression
id
 
Constructor Summary
Literal(java.lang.String value)
          Constructs a new Literal.
 
Method Summary
static Expression buildFromDOM(org.w3c.dom.Element element)
          Given a DOM-fragment, a corresponding Expression-object is built.
 java.lang.Object evaluate(Feature feature)
          Returns the Literal's value (to be used in the evaluation of a complexer Expression).
 java.lang.String getValue()
          Returns the literal's value (as String).
 void setValue(java.lang.String value)
           
 java.lang.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

Literal

public Literal(java.lang.String value)
Constructs a new Literal.

Parameters:
value -
Method Detail

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.

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

getValue

public java.lang.String getValue()
Returns the literal's value (as String).

Returns:
the literal's value (as String).

setValue

public void setValue(java.lang.String value)
Parameters:
value -
See Also:
getValue()

toXML

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

Specified by:
toXML in class Expression
Returns:
XML representation of this object.

evaluate

public java.lang.Object evaluate(Feature feature)
Returns the Literal's value (to be used in the evaluation of a complexer Expression). If the value appears to be numerical, a Double is returned, else a String. TODO: Improve datatype handling.

Specified by:
evaluate in class Expression
Parameters:
feature - that determines the values of PropertyNames in the expression (no use here)
Returns:
the resulting value

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