org.geotools.brewer.color
Class PaletteFunction

java.lang.Object
  extended byorg.geotools.filter.expression.ExpressionAbstract
      extended byorg.geotools.filter.DefaultExpression
          extended byorg.geotools.filter.FunctionExpressionImpl
              extended byorg.geotools.brewer.color.PaletteFunction
All Implemented Interfaces:
org.opengis.filter.expression.Expression, Expression, ExpressionType, Factory, org.opengis.filter.expression.Function, FunctionExpression

public class PaletteFunction
extends FunctionExpressionImpl
implements FunctionExpression

Author:
James Macgill

Field Summary
 
Fields inherited from class org.geotools.filter.DefaultExpression
expressionType, permissiveConstruction
 
Fields inherited from interface org.geotools.filter.expression.ExpressionType
ATTRIBUTE, ATTRIBUTE_DOUBLE, ATTRIBUTE_GEOMETRY, ATTRIBUTE_INTEGER, ATTRIBUTE_STRING, ATTRIBUTE_UNDECLARED, FUNCTION, LITERAL_DOUBLE, LITERAL_GEOMETRY, LITERAL_INTEGER, LITERAL_STRING, MATH_ADD, MATH_DIVIDE, MATH_MULTIPLY, MATH_SUBTRACT
 
Constructor Summary
PaletteFunction()
          Creates a new instance of PaletteFunction
PaletteFunction(FilterFactory factory)
           
 
Method Summary
 java.lang.Object evaluate(Feature feature)
          Evaluates the expression against an instance of Feature.
 int getArgCount()
          Returns the number of arguments this requires.
 Expression[] getArgs()
          Gets the arguments to be evaluated by this function.
 ClassificationFunction getClassifier()
           
 Expression getEvaluationExpression()
           
 java.lang.String getName()
          Gets the name of this function.
 int getNumberOfClasses()
           
 java.lang.String getPaletteName()
           
 void setArgs(Expression[] args)
          Sets the arguments to be evaluated by this function.
 void setClassifier(ClassificationFunction cf)
           
 void setEvaluationExpression(Expression e)
           
 void setFilterFactory(FilterFactory factory)
           
 void setNumberOfClasses(int i)
           
 void setPaletteName(java.lang.String s)
           
 java.lang.String toString()
           
 
Methods inherited from class org.geotools.filter.FunctionExpressionImpl
accept, getImplementationHints, getParameters, getType, setName, setParameters
 
Methods inherited from class org.geotools.filter.DefaultExpression
accept, evaluate, getValue, isAttributeExpression, isExpression, isGeometryExpression, isLiteralExpression, isMathExpression, isMathExpression
 
Methods inherited from class org.geotools.filter.expression.ExpressionAbstract
eval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.geotools.filter.expression.FunctionExpression
getType
 
Methods inherited from interface org.geotools.filter.expression.Expression
accept, getValue
 
Methods inherited from interface org.opengis.filter.expression.Expression
accept, evaluate
 
Methods inherited from interface org.geotools.factory.Factory
getImplementationHints
 
Methods inherited from interface org.opengis.filter.expression.Function
getParameters, setName, setParameters
 

Constructor Detail

PaletteFunction

public PaletteFunction()
Creates a new instance of PaletteFunction


PaletteFunction

public PaletteFunction(FilterFactory factory)
Method Detail

setFilterFactory

public void setFilterFactory(FilterFactory factory)

getArgCount

public int getArgCount()
Description copied from interface: FunctionExpression
Returns the number of arguments this requires. For example [arg1][arg2]. This function must have EXACTLY 2 arguments, so this function would return 2. The parser might use this information to ensure validity, and its also for reporting capabilities. NOTE: this was previously javadoc-ed incorrectly, please note the new definition. NOTE: you cannot have a function with a variable number of arguments.

Specified by:
getArgCount in interface FunctionExpression
Specified by:
getArgCount in class FunctionExpressionImpl
Returns:
the number of args.

getArgs

public Expression[] getArgs()
Description copied from interface: FunctionExpression
Gets the arguments to be evaluated by this function.

Specified by:
getArgs in interface FunctionExpression
Overrides:
getArgs in class FunctionExpressionImpl

getName

public java.lang.String getName()
Description copied from interface: FunctionExpression
Gets the name of this function.

Specified by:
getName in interface FunctionExpression
Overrides:
getName in class FunctionExpressionImpl
Returns:
the name of the function.

setArgs

public void setArgs(Expression[] args)
Description copied from interface: FunctionExpression
Sets the arguments to be evaluated by this function.

Specified by:
setArgs in interface FunctionExpression
Overrides:
setArgs in class FunctionExpressionImpl

getEvaluationExpression

public Expression getEvaluationExpression()

setEvaluationExpression

public void setEvaluationExpression(Expression e)

getClassifier

public ClassificationFunction getClassifier()

setClassifier

public void setClassifier(ClassificationFunction cf)

getNumberOfClasses

public int getNumberOfClasses()

setNumberOfClasses

public void setNumberOfClasses(int i)

getPaletteName

public java.lang.String getPaletteName()

setPaletteName

public void setPaletteName(java.lang.String s)

evaluate

public java.lang.Object evaluate(Feature feature)
Description copied from interface: Expression
Evaluates the expression against an instance of Feature.

Specified by:
evaluate in interface Expression
Overrides:
evaluate in class DefaultExpression
Parameters:
feature - Specified feature to use when returning value.
Returns:
The value of this expression based on the feature.

toString

public java.lang.String toString()


Copyright © GeoTools. All Rights Reserved.