Class FeatureChainedAttributeVisitor

Object
DefaultExpressionVisitor
FeatureChainedAttributeVisitor
All Implemented Interfaces:
ExpressionVisitor

public class FeatureChainedAttributeVisitor extends DefaultExpressionVisitor
Expression visitor that uses the attribute and mapping information provided by a FeatureTypeMapping object to determine which nested feature types / attributes must be traversed to reach the attribute identified by the provided PropertyName expression.

The provided FeatureTypeMapping object is regarded as the root mapping against which the expression is evaluated.

The nested attribute mappings are returned as a list of FeatureChainedAttributeVisitor.FeatureChainLink objects; the first one in the list always refers to the root mapping.

Author:
Stefano Costa, GeoSolutions
  • Constructor Details

    • FeatureChainedAttributeVisitor

      public FeatureChainedAttributeVisitor(FeatureTypeMapping root)
  • Method Details

    • visit

      public Object visit(PropertyName expression, Object data)
      Specified by:
      visit in interface ExpressionVisitor
      Overrides:
      visit in class DefaultExpressionVisitor
    • isUnboundedNestedElementFound

      public boolean isUnboundedNestedElementFound()
    • getFeatureChainedAttributes

      Returns an object describing the sequence of feature chaining links that must be traversed to reach the attribute specified by the visited expression.
      Returns:
      a feature chained attribute descriptor, or null if none was found
    • conditionalMappingWasFound

      public boolean conditionalMappingWasFound()
      Tells clients whether or not a conditional mapping was found in the feature chain when the latest expression was visited.
      Returns:
      true if a conditional mapping was found in the feature chain, false otherwise
    • startsWith

      protected boolean startsWith(XPathUtil.StepList one, XPathUtil.StepList other)