|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectExpressionAbstract
DefaultExpression
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.
modules/library/main (gt-main.jar)
Field Summary | |
---|---|
protected String |
attPath
Holds all sub filters of this filter. |
protected SimpleFeatureType |
schema
Holds all sub filters of this filter. |
Fields inherited from class DefaultExpression |
---|
expressionType, permissiveConstruction |
Fields inherited from interface 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 Expression |
---|
NIL |
Fields inherited from interface Expression |
---|
NIL |
Constructor Summary | |
---|---|
protected |
AttributeExpressionImpl(SimpleFeatureType schema)
Constructor with the schema for this attribute. |
protected |
AttributeExpressionImpl(SimpleFeatureType schema,
String attPath)
Constructor with schema and path to the attribute. |
|
AttributeExpressionImpl(String xpath)
Constructor with schema and path to the attribute. |
|
AttributeExpressionImpl(String xpath,
Hints propertyAccessorHints)
Constructor with schema and path to the attribute. |
Method Summary | |
---|---|
Object |
accept(ExpressionVisitor visitor,
Object extraData)
Used by FilterVisitors to perform some action on this filter instance. |
boolean |
equals(Object obj)
Compares this filter to the specified object. |
Object |
evaluate(Object obj)
Gets the value of this property from the passed object. |
Object |
evaluate(Object obj,
Class target)
Default implementation delegates handling of context conversion to Value utility class. |
Object |
evaluate(SimpleFeature feature)
Gets the value of this attribute from the passed feature. |
String |
getAttributePath()
Deprecated. use getPropertyName() |
String |
getPropertyName()
Gets the path to the attribute to be evaluated by this expression. |
int |
hashCode()
Override of hashCode method. |
void |
setAttributePath(String attPath)
Deprecated. use setPropertyName(String) |
void |
setPropertyName(String attPath)
|
String |
toString()
Return this expression as a string. |
Methods inherited from class DefaultExpression |
---|
accept, getType, getValue, isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression, isMathExpression |
Methods inherited from class ExpressionAbstract |
---|
eval, eval |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface AttributeExpression |
---|
getValue |
Methods inherited from interface Expression |
---|
accept, getType |
Field Detail |
---|
protected String attPath
protected SimpleFeatureType schema
Constructor Detail |
---|
protected AttributeExpressionImpl(SimpleFeatureType schema)
schema
- The schema for this attribute.public AttributeExpressionImpl(String xpath)
xpath
- the String xpath to the attribute.public AttributeExpressionImpl(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(SimpleFeatureType schema, 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(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 String getAttributePath()
getPropertyName()
getPropertyName()
.
getAttributePath
in interface AttributeExpression
public String getPropertyName()
PropertyName.getPropertyName()
getPropertyName
in interface PropertyName
public void setPropertyName(String attPath)
public Object evaluate(SimpleFeature feature)
evaluate
in class DefaultExpression
feature
- Feature from which to extract attribute value.
public Object evaluate(Object obj)
evaluate
in interface Expression
evaluate
in class DefaultExpression
obj
- Object from which we need to extract a property value.public Object evaluate(Object obj, 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 Expression
evaluate
in class ExpressionAbstract
public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
obj
- - the object to compare this ExpressionAttribute against.
public int hashCode()
hashCode
in class Object
public Object accept(ExpressionVisitor visitor, Object extraData)
accept
in interface 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 |