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

org.deegree.model.filterencoding
Class PropertyIsLikeOperation

java.lang.Object
  extended by org.deegree.model.filterencoding.AbstractOperation
      extended by org.deegree.model.filterencoding.ComparisonOperation
          extended by org.deegree.model.filterencoding.PropertyIsLikeOperation
All Implemented Interfaces:
Operation

public class PropertyIsLikeOperation
extends ComparisonOperation

Encapsulates the information of a -element (as defined in Filter DTD).

Version:
$Revision: 22287 $, $Date: 2010-01-27 19:56:34 +0100 (Mi, 27 Jan 2010) $
Author:
Markus Schneider, last edited by: $Author: apoth $

Field Summary
 
Fields inherited from class org.deegree.model.filterencoding.AbstractOperation
operatorId
 
Constructor Summary
PropertyIsLikeOperation(PropertyName propertyName, Literal literal, char wildCard, char singleChar, char escapeChar)
           
PropertyIsLikeOperation(PropertyName propertyName, Literal literal, char wildCard, char singleChar, char escapeChar, boolean matchCase)
           
 
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 PropertyIsLike's logical value based on the certain property values of the given Feature.
 char getEscapeChar()
           
 Literal getLiteral()
           
 PropertyName getPropertyName()
           
 char getSingleChar()
           
 char getWildCard()
           
 boolean isMatchCase()
           
 boolean matches(java.lang.String pattern, java.lang.String buffer)
          Checks if a given String matches a pattern that is a sequence of: standard characters wildcard characters (like * in most shells) singlechar characters (like ?
 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()
          Deprecated. use to100XML() or to110XML() instead; default behavior is to110XML()
 
Methods inherited from class org.deegree.model.filterencoding.ComparisonOperation
buildFromDOM
 
Methods inherited from class org.deegree.model.filterencoding.AbstractOperation
getOperatorId, getOperatorName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyIsLikeOperation

public PropertyIsLikeOperation(PropertyName propertyName,
                               Literal literal,
                               char wildCard,
                               char singleChar,
                               char escapeChar)
Parameters:
propertyName -
literal -
wildCard -
singleChar -
escapeChar -

PropertyIsLikeOperation

public PropertyIsLikeOperation(PropertyName propertyName,
                               Literal literal,
                               char wildCard,
                               char singleChar,
                               char escapeChar,
                               boolean matchCase)
Parameters:
propertyName -
literal -
wildCard -
singleChar -
escapeChar -
matchCase -
Method Detail

getWildCard

public char getWildCard()
Returns:
the wildcard

getSingleChar

public char getSingleChar()
Returns:
the singleChar

getEscapeChar

public char getEscapeChar()
Returns:
the escape character

isMatchCase

public boolean isMatchCase()
Returns:
matchCase flag

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 - the element to parse
Returns:
a Bean of the DOM
Throws:
FilterConstructionException - if the structure of the DOM-fragment is invalid

getPropertyName

public PropertyName getPropertyName()
Returns:
the name of the property that shall be compared to the literal

getLiteral

public Literal getLiteral()
Returns:
the literal the property shall be compared to

toXML

public java.lang.StringBuffer toXML()
Deprecated. use to100XML() or to110XML() instead; default behavior is to110XML()

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 PropertyIsLike's logical value based on the certain property values of the given Feature.

Parameters:
feature - that determines the property values
Returns:
true, if the Literal matches the PropertyName's value
Throws:
FilterEvaluationException - if the evaluation could not be performed (for example a specified Property did not exist)

matches

public boolean matches(java.lang.String pattern,
                       java.lang.String buffer)
Checks if a given String matches a pattern that is a sequence of:
  • standard characters
  • wildcard characters (like * in most shells)
  • singlechar characters (like ? in most shells)

Parameters:
pattern - the pattern to compare to
buffer - the String to test
Returns:
true, if the String matches the pattern

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