|
||||||||||
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.AttributeExpressionImpl
public class AttributeExpressionImpl
Defines a complex filter (could also be called logical filter). This filter holds one or more filters together and relates them logically in an internally defined manner.
Field Summary | |
---|---|
protected java.lang.String |
attPath
Holds all sub filters of this filter. |
protected org.opengis.feature.simple.SimpleFeatureType |
schema
Holds all sub filters of this filter. |
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 | |
---|---|
protected |
AttributeExpressionImpl(org.opengis.feature.simple.SimpleFeatureType schema)
Constructor with the schema for this attribute. |
protected |
AttributeExpressionImpl(org.opengis.feature.simple.SimpleFeatureType schema,
java.lang.String attPath)
Constructor with schema and path to the attribute. |
|
AttributeExpressionImpl(java.lang.String xpath)
Constructor with schema and path to the attribute. |
|
AttributeExpressionImpl(java.lang.String xpath,
Hints propertyAccessorHints)
Constructor with schema and path to the attribute. |
Method Summary | |
---|---|
java.lang.Object |
accept(org.opengis.filter.expression.ExpressionVisitor visitor,
java.lang.Object extraData)
Used by FilterVisitors to perform some action on this filter instance. |
boolean |
equals(java.lang.Object obj)
Compares this filter to the specified object. |
java.lang.Object |
evaluate(java.lang.Object obj)
Gets the value of this property from the passed object. |
java.lang.Object |
evaluate(java.lang.Object obj,
java.lang.Class target)
Default implementation delegates handling of context conversion to Value utility class. |
java.lang.Object |
evaluate(org.opengis.feature.simple.SimpleFeature feature)
Gets the value of this attribute from the passed feature. |
java.lang.String |
getAttributePath()
Deprecated. use getPropertyName() |
java.lang.String |
getPropertyName()
Gets the path to the attribute to be evaluated by this expression. |
int |
hashCode()
Override of hashCode method. |
void |
setAttributePath(java.lang.String attPath)
Deprecated. use setPropertyName(String) |
void |
setPropertyName(java.lang.String attPath)
|
java.lang.String |
toString()
Return this expression as a string. |
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 |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.geotools.filter.AttributeExpression |
---|
getValue |
Methods inherited from interface org.geotools.filter.Expression |
---|
accept, getType |
Field Detail |
---|
protected java.lang.String attPath
protected org.opengis.feature.simple.SimpleFeatureType schema
Constructor Detail |
---|
protected AttributeExpressionImpl(org.opengis.feature.simple.SimpleFeatureType schema)
schema
- The schema for this attribute.public AttributeExpressionImpl(java.lang.String xpath)
xpath
- the String xpath to the attribute.public AttributeExpressionImpl(java.lang.String xpath, Hints propertyAccessorHints)
xpath
- the String xpath to the attribute.propertyAccessorHints
- hints to be passed to
PropertyAccessorFactory.createPropertyAccessor(Class, String, Class, Hints)
at evaluation time.protected AttributeExpressionImpl(org.opengis.feature.simple.SimpleFeatureType schema, java.lang.String attPath) throws IllegalFilterException
schema
- The initial (required) sub filter.attPath
- the xpath to the attribute.
IllegalFilterException
- If the attribute path is not in the
schema.Method Detail |
---|
public final void setAttributePath(java.lang.String attPath) throws IllegalFilterException
setPropertyName(String)
setAttributePath
in interface AttributeExpression
attPath
- The initial (required) sub filter.
IllegalFilterException
- If the attribute path is not in the
schema.public final java.lang.String getAttributePath()
getPropertyName()
getPropertyName()
.
getAttributePath
in interface AttributeExpression
public java.lang.String getPropertyName()
PropertyName.getPropertyName()
getPropertyName
in interface org.opengis.filter.expression.PropertyName
public void setPropertyName(java.lang.String attPath)
public java.lang.Object evaluate(org.opengis.feature.simple.SimpleFeature feature)
evaluate
in class DefaultExpression
feature
- Feature from which to extract attribute value.
public java.lang.Object evaluate(java.lang.Object obj)
evaluate
in interface org.opengis.filter.expression.Expression
evaluate
in class DefaultExpression
obj
- Object from which we need to extract a property value.public java.lang.Object evaluate(java.lang.Object obj, java.lang.Class target)
ExpressionAbstract
Subclasses are expected to make use of the Value utility class (as the easiest way to provide value morphing in confirmance with the Filter specification).
evaluate
in interface org.opengis.filter.expression.Expression
evaluate
in class ExpressionAbstract
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- - the object to compare this ExpressionAttribute against.
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object accept(org.opengis.filter.expression.ExpressionVisitor visitor, java.lang.Object extraData)
accept
in interface org.opengis.filter.expression.Expression
visitor
- The visitor which requires access to this filter, the
method must call visitor.visit(this);
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |