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

org.deegree.model.filterencoding
Class PropertyName

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

public class PropertyName
extends Expression

Encapsulates the information of a PropertyName element.

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
 
Fields inherited from class org.deegree.model.filterencoding.Expression
id
 
Constructor Summary
PropertyName(PropertyPath value)
          Creates a new instance of PropertyName.
PropertyName(QualifiedName elementName)
          Creates a new instance of PropertyName.
PropertyName(java.lang.String value)
          Deprecated. use #PropertyName(QualifiedName) instead
 
Method Summary
static Expression buildFromDOM(org.w3c.dom.Element element)
          Given a DOM-fragment, a corresponding Expression-object is built.
 boolean equals(java.lang.Object other)
          Indicates whether some other object is "equal to" this one.
 java.lang.Object evaluate(Feature feature)
          Returns the PropertyName's value (to be used in the evaluation of a complexer Expression).
 PropertyPath getValue()
          Returns the PropertyName's value.
 void setValue(PropertyPath value)
           
 java.lang.String toString()
          Returns a string representation of the object.
 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyName

@Deprecated
public PropertyName(java.lang.String value)
Deprecated. use #PropertyName(QualifiedName) instead

Creates a new instance of PropertyName.

Parameters:
value -

PropertyName

public PropertyName(QualifiedName elementName)
Creates a new instance of PropertyName.

Parameters:
elementName -

PropertyName

public PropertyName(PropertyPath value)
Creates a new instance of PropertyName.

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.

Parameters:
element -
Returns:
the Expression object for the passed element
Throws:
FilterConstructionException - if the structure of the DOM-fragment is invalid

getValue

public PropertyPath getValue()
Returns the PropertyName's value.

Returns:
the PropertyName's value.

setValue

public void setValue(PropertyPath 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:
an XML representation of this object

evaluate

public java.lang.Object evaluate(Feature feature)
                          throws FilterEvaluationException
Returns the PropertyName's value (to be used in the evaluation of a complexer Expression). If the value is a geometry, an instance of Geometry is returned, if it appears to be numerical, a Double, else a String.

TODO: Improve datatype handling.

Specified by:
evaluate in class Expression
Parameters:
feature - that determines the value of this PropertyName
Returns:
the resulting value
Throws:
FilterEvaluationException - if the has no Property with a matching name

equals

public boolean equals(java.lang.Object other)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Returns:
true if this object is the same as the obj argument; false otherwise

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object

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