|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.filter.expression.ExpressionAbstract
org.geotools.filter.DefaultExpression
org.geotools.filter.function.ClassificationFunction
public abstract class ClassificationFunction
Parent for classifiers which break a feature collection into the specified number of classes.
Field Summary | |
---|---|
protected static java.util.logging.Logger |
LOGGER
|
Fields inherited from class org.geotools.filter.DefaultExpression |
---|
expressionType, permissiveConstruction |
Fields inherited from interface org.geotools.filter.ExpressionType |
---|
ATTRIBUTE, ATTRIBUTE_DOUBLE, ATTRIBUTE_GEOMETRY, ATTRIBUTE_INTEGER, ATTRIBUTE_STRING, ATTRIBUTE_UNDECLARED, FUNCTION, LITERAL_DOUBLE, LITERAL_GEOMETRY, LITERAL_INTEGER, LITERAL_LONG, LITERAL_STRING, LITERAL_UNDECLARED, MATH_ADD, MATH_DIVIDE, MATH_MULTIPLY, MATH_SUBTRACT |
Fields inherited from interface org.opengis.filter.expression.Expression |
---|
NIL |
Constructor Summary | |
---|---|
ClassificationFunction()
Creates a new instance of ClassificationFunction. |
Method Summary | |
---|---|
java.lang.Object |
accept(org.opengis.filter.expression.ExpressionVisitor visitor,
java.lang.Object extraData)
|
protected int |
decimalPlaces(double slotWidth)
Determines the number of decimal places to truncate the interval at. |
abstract java.lang.Object |
evaluate(java.lang.Object arg)
This method checks if the object is an instance of Feature and
if so, calls through to #evaluate(Feature) . |
java.lang.Object |
evaluate(org.opengis.feature.simple.SimpleFeature feature)
Returns a value for this expression. |
protected double |
fixRound(double value,
int decimalPlaces,
boolean up)
Corrects a round off operation by incrementing or decrementing the decimal place (preferably the smallest one). |
abstract int |
getArgCount()
Returns the number of arguments this |
Expression[] |
getArgs()
Deprecated. please use getParameters |
int |
getClasses()
|
Expression |
getExpression()
|
org.opengis.filter.expression.Literal |
getFallbackValue()
|
java.util.Map |
getImplementationHints()
Returns the implementation hints. |
java.lang.String |
getName()
Gets the name of this function. |
int |
getNumberOfClasses()
Deprecated. use getClasses() |
java.util.List |
getParameters()
Returns the function parameters (the contents are Expressions, usually attribute expression and literal expression). |
ProgressListener |
getProgressListener()
|
protected double |
round(double value,
int decimalPlaces)
Truncates a double to a certain number of decimals places. |
void |
setArgs(Expression[] args)
Deprecated. please use setParameters |
void |
setClasses(int classes)
|
void |
setExpression(Expression e)
|
void |
setFallbackValue(org.opengis.filter.expression.Literal fallback)
|
void |
setName(java.lang.String name)
Sets the name of the function. |
void |
setNumberOfClasses(int classes)
Deprecated. use setClasses() |
void |
setParameters(java.util.List params)
Sets the function parameters. |
void |
setProgressListener(ProgressListener progress)
|
Methods inherited from class org.geotools.filter.DefaultExpression |
---|
accept, getType, getValue, isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression, isMathExpression |
Methods inherited from class org.geotools.filter.expression.ExpressionAbstract |
---|
eval, eval, evaluate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.geotools.filter.FunctionExpression |
---|
getType |
Methods inherited from interface org.geotools.filter.Expression |
---|
accept, getValue |
Methods inherited from interface org.opengis.filter.expression.Expression |
---|
evaluate |
Field Detail |
---|
protected static final java.util.logging.Logger LOGGER
Constructor Detail |
---|
public ClassificationFunction()
Method Detail |
---|
public abstract int getArgCount()
FunctionExpression
getArgCount
in interface FunctionExpression
public java.lang.Object accept(org.opengis.filter.expression.ExpressionVisitor visitor, java.lang.Object extraData)
accept
in interface org.opengis.filter.expression.Expression
Expression.accept(ExpressionVisitor, Object)
public java.lang.Object evaluate(org.opengis.feature.simple.SimpleFeature feature)
DefaultExpression
evaluate
in class DefaultExpression
feature
- Specified feature to use when returning value.
public abstract java.lang.Object evaluate(java.lang.Object arg)
DefaultExpression
Feature
and
if so, calls through to #evaluate(Feature)
. This is done
to maintain backwards compatability with previous version of Expression api
which depended on Feature. If the object is not an instance of feature
the super implementation is called.
evaluate
in interface org.opengis.filter.expression.Expression
evaluate
in class DefaultExpression
public void setFallbackValue(org.opengis.filter.expression.Literal fallback)
public org.opengis.filter.expression.Literal getFallbackValue()
getFallbackValue
in interface org.opengis.filter.expression.Function
public Expression[] getArgs()
FunctionExpression
getArgs
in interface FunctionExpression
public void setArgs(Expression[] args)
FunctionExpression
setArgs
in interface FunctionExpression
args
- an array of expressions to be evaluated.public java.lang.String getName()
getName
in interface FunctionExpression
getName
in interface org.opengis.filter.expression.Function
public void setName(java.lang.String name)
public java.util.List getParameters()
getParameters
in interface org.opengis.filter.expression.Function
public void setParameters(java.util.List params)
setParameters
in interface FunctionExpression
public ProgressListener getProgressListener()
public void setProgressListener(ProgressListener progress)
public int getNumberOfClasses()
public int getClasses()
public void setNumberOfClasses(int classes)
public void setClasses(int classes)
public Expression getExpression()
public void setExpression(Expression e)
public java.util.Map getImplementationHints()
getImplementationHints
in interface Factory
protected int decimalPlaces(double slotWidth)
slotWidth
- protected double round(double value, int decimalPlaces)
value
- number to round-offdecimalPlaces
- number of decimal places to leave
protected double fixRound(double value, int decimalPlaces, boolean up)
value
- decimalPlaces
- up
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |