org.deegree.filter.expression.custom.se
Class Categorize

java.lang.Object
  extended by org.deegree.filter.expression.custom.AbstractCustomExpression
      extended by org.deegree.filter.expression.custom.se.Categorize
All Implemented Interfaces:
Expression, CustomExpression

public class Categorize
extends AbstractCustomExpression

Categorize

Version:
$Revision: 31400 $, $Date: 2011-08-02 10:11:48 +0200 (Tue, 02 Aug 2011) $
Author:
Andreas Schmitz, Andrei Aiordachioaie, last edited by: $Author: aschmitz $

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.deegree.filter.Expression
Expression.Type
 
Constructor Summary
Categorize()
           
 
Method Summary
<T> TypedObjectNode[]
evaluate(T f, XPathEvaluator<T> xpathEvaluator)
          Determines the values of the expression for the given context object.
 BufferedImage evaluateRaster(AbstractRaster raster, RasterStyling style)
          Construct an image map, as the result of the Categorize operation
 Color[] getColors()
           
 QName getElementName()
          Returns the element name used for encoding this expression.
 boolean getPrecedingBelongs()
           
 Float[] getThreshholds()
           
 Categorize parse(XMLStreamReader in)
           
 String toString()
           
 
Methods inherited from class org.deegree.filter.expression.custom.AbstractCustomExpression
getParams, getType, parse100, parse110, parse200, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Categorize

public Categorize()
Method Detail

getElementName

public QName getElementName()
Description copied from interface: CustomExpression
Returns the element name used for encoding this expression.

Returns:
the element name of the expression, never null

evaluate

public <T> TypedObjectNode[] evaluate(T f,
                                      XPathEvaluator<T> xpathEvaluator)
Description copied from interface: Expression
Determines the values of the expression for the given context object.

Note that this returns an TypedObjectNode[], as an expression may evaluate to multiple values, e.g. a ValueReference that targets a multi property of a feature.

Type Parameters:
T - type of the context object
Parameters:
f - object that the expression is evaluated upon, must not be null
xpathEvaluator - used for evaluation of XPath expressions, must not be null
Returns:
the values of the expression, may be empty (and even contain null values), but never null

getThreshholds

public Float[] getThreshholds()
Returns:
the array of threshholds

getPrecedingBelongs

public boolean getPrecedingBelongs()
Returns:
true, if preceding value belongs to current category

getColors

public Color[] getColors()
Returns:
the categories' colors

evaluateRaster

public BufferedImage evaluateRaster(AbstractRaster raster,
                                    RasterStyling style)
Construct an image map, as the result of the Categorize operation

Parameters:
raster - input raster
style - raster style, that contains channel mappings (if applicable)
Returns:
a buffered image with the processed data

parse

public Categorize parse(XMLStreamReader in)
                 throws XMLStreamException
Specified by:
parse in class AbstractCustomExpression
Throws:
XMLStreamException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.