org.geotools.data.complex.filter
Class XPath

Object
  extended by XPathUtil
      extended by XPath

public class XPath
extends XPathUtil

Utility class to evaluate XPath expressions against an Attribute instance, which may be any Attribute, whether it is simple, complex, a feature, etc.

At the difference of the Filter subsystem, which works against Attribute contents (for example to evaluate a comparison filter), the XPath subsystem, for which this class is the single entry point, works against Attribute instances. That is, the result of an XPath expression, if a single value, is an Attribtue, not the attribute content, or a List of Attributes, for instance.

Since:
2.4
Author:
Gabriel Roldan (Axios Engineering), Rini Angreani (CSIRO Earth Science and Resource Engineering)

Nested Class Summary
 
Nested classes/interfaces inherited from class XPathUtil
XPathUtil.Step, XPathUtil.StepList
 
Constructor Summary
XPath()
           
XPath(FilterFactory ff, FeatureFactory featureFactory)
           
 
Method Summary
 boolean isComplexType(XPathUtil.StepList attrXPath, AttributeDescriptor featureType)
           
static boolean isId(XPathUtil.Step step)
           
 Attribute set(Attribute att, XPathUtil.StepList xpath, Object value, String id, AttributeType targetNodeType, boolean isXlinkRef, AttributeDescriptor targetDescriptor, Expression sourceExpression)
           
 Attribute set(Attribute att, XPathUtil.StepList xpath, Object value, String id, AttributeType targetNodeType, boolean isXlinkRef, Expression sourceExpression)
          Sets the value of the attribute of att addressed by xpath and of type targetNodeType to be value with id id.
 void setCRS(CoordinateReferenceSystem crs)
           
 void setFeatureFactory(FeatureFactory featureFactory)
           
 void setFilterFactory(FilterFactory ff)
           
 
Methods inherited from class XPathUtil
equals, rootElementSteps, steps
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPath

public XPath()

XPath

public XPath(FilterFactory ff,
             FeatureFactory featureFactory)
Method Detail

setFilterFactory

public void setFilterFactory(FilterFactory ff)

setCRS

public void setCRS(CoordinateReferenceSystem crs)

setFeatureFactory

public void setFeatureFactory(FeatureFactory featureFactory)

set

public Attribute set(Attribute att,
                     XPathUtil.StepList xpath,
                     Object value,
                     String id,
                     AttributeType targetNodeType,
                     boolean isXlinkRef,
                     Expression sourceExpression)
Sets the value of the attribute of att addressed by xpath and of type targetNodeType to be value with id id.

Parameters:
att - the root attribute for which to set the child attribute value
xpath - the xpath expression that addresses the att child whose value is to be set
value - the value of the attribute addressed by xpath
id - the identifier of the attribute addressed by xpath, might be null
targetNodeType - the expected type of the attribute addressed by xpath, or null if unknown
isXlinkRef - true if the attribute would only contain xlink:href client property
Returns:

set

public Attribute set(Attribute att,
                     XPathUtil.StepList xpath,
                     Object value,
                     String id,
                     AttributeType targetNodeType,
                     boolean isXlinkRef,
                     AttributeDescriptor targetDescriptor,
                     Expression sourceExpression)

isComplexType

public boolean isComplexType(XPathUtil.StepList attrXPath,
                             AttributeDescriptor featureType)

isId

public static boolean isId(XPathUtil.Step step)
Returns:
true if this step represents an id attribute


Copyright © 1996-2014 Geotools. All Rights Reserved.