public class AttributeExpressionImpl extends DefaultExpression implements PropertyName
Modifier and Type | Field and Description |
---|---|
protected String |
attPath
Holds all sub filters of this filter.
|
protected boolean |
lenient
Configures whether evaluate should return null if it cannot find a working property accessor,
rather than throwing an exception (default behaviour).
|
NamespaceSupport |
namespaceSupport
NamespaceSupport used to defining the prefix information for the xpath expression
|
protected SimpleFeatureType |
schema
Used to validate attribute references to ensure they match the provided schema
|
NIL
Modifier | Constructor and Description |
---|---|
|
AttributeExpressionImpl(Name name)
Constructor with full attribute name.
|
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 hints) |
|
AttributeExpressionImpl(String xpath,
NamespaceSupport namespaceContext)
Constructor with schema and path to the attribute.
|
Modifier and Type | Method and Description |
---|---|
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.
|
<T> T |
evaluate(Object obj,
Class<T> target)
Gets the value of this attribute from the passed object.
|
NamespaceSupport |
getNamespaceContext()
Returns namespace context information, or null if unavailable/inapplicable
|
String |
getPropertyName()
Gets the path to the attribute to be evaluated by this expression.
|
int |
hashCode()
Override of hashCode method.
|
boolean |
isLenient()
Gets lenient property
|
void |
setLenient(boolean lenient)
Sets lenient property.
|
void |
setPropertyName(String attPath) |
String |
toString()
Return this expression as a string.
|
isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression
protected String attPath
protected SimpleFeatureType schema
public NamespaceSupport namespaceSupport
protected boolean lenient
protected AttributeExpressionImpl(SimpleFeatureType schema)
schema
- The schema for this attribute.public AttributeExpressionImpl(String xpath)
xpath
- the String xpath to the attribute.public AttributeExpressionImpl(Name name)
name
- Attribute Name.public AttributeExpressionImpl(String xpath, NamespaceSupport namespaceContext)
xpath
- the String xpath to the attribute.namespaceContext
- Defining the prefix information for the xpath expressionpublic AttributeExpressionImpl(String xpath, Hints hints)
xpath
- xpath expressionhints
- Hints passed to the property accessor during evaulationprotected 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.public NamespaceSupport getNamespaceContext()
PropertyName
getNamespaceContext
in interface PropertyName
public String getPropertyName()
getPropertyName
in interface PropertyName
public void setPropertyName(String attPath)
public Object evaluate(Object obj)
evaluate
in interface Expression
evaluate
in class ExpressionAbstract
obj
- Object from which we need to extract a property value.public <T> T evaluate(Object obj, Class<T> target)
evaluate
in interface Expression
evaluate
in class ExpressionAbstract
T
- The type of the returned object.obj
- Object from which to extract attribute value.target
- Target Classcontext
.public String toString()
public boolean equals(Object obj)
public int hashCode()
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);public void setLenient(boolean lenient)
lenient
- public boolean isLenient()
Copyright © 1996–2019 Geotools. All rights reserved.