org.deegree.model.filterencoding
Class Literal
java.lang.Object
org.deegree.model.filterencoding.Expression
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
Fields inherited from class org.deegree.model.filterencoding.Expression |
id |
Constructor Summary |
Literal(String value)
Constructs a new Literal. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Literal
public Literal(String value)
- Constructs a new Literal.
- Parameters:
value
-
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
-
- Throws:
FilterConstructionException
- if the structure of the DOM-fragment is invalid
getValue
public String getValue()
- Returns the literal's value (as String).
- Returns:
- the literal's value (as String).
setValue
public void setValue(String value)
- Parameters:
value
- - See Also:
getValue()
toXML
public StringBuffer toXML()
- Produces an indented XML representation of this object.
- Specified by:
toXML
in class Expression
- Returns:
- XML representation of this object.
evaluate
public 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
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net