org.deegree.model.filterencoding
Class PropertyIsCOMPOperation
java.lang.Object
org.deegree.model.filterencoding.AbstractOperation
org.deegree.model.filterencoding.ComparisonOperation
org.deegree.model.filterencoding.PropertyIsCOMPOperation
- All Implemented Interfaces:
- Operation
public class PropertyIsCOMPOperation
- extends ComparisonOperation
Encapsulates the information of a -element (as defined in Filter DTD). COMP can be one of the
following:
- EqualTo
- LessThan
- GreaterThan
- LessThanOrEqualTo
- GreaterThanOrEqualTo
- Version:
- $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
- Author:
- Markus Schneider, last edited by: $Author: mschneider $
Method Summary |
static Operation |
buildFromDOM(org.w3c.dom.Element element)
Given a DOM-fragment, a corresponding Operation-object is built. |
boolean |
evaluate(Feature feature)
Calculates the ComparisonOperation's logical value based on the certain property values of the given
Feature. |
Expression |
getFirstExpression()
returns the first Expression of the comparison |
Expression |
getSecondExpression()
returns the second Expression of the comparison |
boolean |
isMatchCase()
returns matchCase flag |
java.lang.StringBuffer |
to100XML()
Produces an XML representation of this object that complies to Filter Encoding specification 1.0.0. |
java.lang.StringBuffer |
to110XML()
Produces an XML representation of this object that complies to Filter Encoding specification 1.1.0. |
java.lang.StringBuffer |
toXML()
Produces an XML representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyIsCOMPOperation
public PropertyIsCOMPOperation(int id,
Expression expr1,
Expression expr2)
- Creates a new PropertyIsCOMPOperation object.
- Parameters:
id
- expr1
- expr2
-
PropertyIsCOMPOperation
public PropertyIsCOMPOperation(int id,
Expression expr1,
Expression expr2,
boolean matchCase)
- Parameters:
id
- expr1
- expr2
- matchCase
-
buildFromDOM
public static Operation buildFromDOM(org.w3c.dom.Element element)
throws FilterConstructionException
- Given a DOM-fragment, a corresponding Operation-object is built. This method recursively calls other buildFromDOM
() - methods to validate the structure of the DOM-fragment.
- Parameters:
element
-
- Returns:
- a Bean of the Dom
- Throws:
FilterConstructionException
- if the structure of the DOM-fragment is invalid
getFirstExpression
public Expression getFirstExpression()
- returns the first
Expression
of the comparison
- Returns:
- the first
Expression
of the comparison
getSecondExpression
public Expression getSecondExpression()
- returns the second
Expression
of the comparison
- Returns:
- the second
Expression
of the comparison
isMatchCase
public boolean isMatchCase()
- returns matchCase flag
- Returns:
- matchCase flag
toXML
public java.lang.StringBuffer toXML()
- Description copied from interface:
Operation
- Produces an XML representation of this object.
- Returns:
- an XML representation of this object.
to100XML
public java.lang.StringBuffer to100XML()
- Description copied from interface:
Operation
- Produces an XML representation of this object that complies to Filter Encoding specification 1.0.0.
- Returns:
- an XML representation of this object
to110XML
public java.lang.StringBuffer to110XML()
- Description copied from interface:
Operation
- Produces an XML representation of this object that complies to Filter Encoding specification 1.1.0.
- Returns:
- an XML representation of this object
evaluate
public boolean evaluate(Feature feature)
throws FilterEvaluationException
- Calculates the ComparisonOperation's logical value based on the certain property values of the given
Feature. TODO: Improve datatype handling.
- Parameters:
feature
- that determines the property values
- Returns:
- true, if the FeatureFilter evaluates to true, else false
- Throws:
FilterEvaluationException
- if the expressions to be compared are of different types
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org