Class NestedAttributeMapping

  • Direct Known Subclasses:
    JoiningNestedAttributeMapping, MongoNestedMapping

    public class NestedAttributeMapping
    extends AttributeMapping
    This class represents AttributeMapping for attributes that are nested inside another complex attribute. The nested attributes would be features, or fake features, ie. complex attributes which types are wrapped with NonFeatureTypeProxy instances. The purpose of this class is to store nested built features so they can be retrieved when the parent feature is being built. Simple features are also stored for caching if a filter involving these nested features is run.
    Author:
    Rini Angreani (CSIRO Earth Science and Resource Engineering)
    • Field Detail

      • nestedFeatureType

        protected final Expression nestedFeatureType
        Name of the nested features element
      • nestedTargetXPath

        protected final XPathUtil.StepList nestedTargetXPath
        Target xpath that links to nested features
    • Constructor Detail

      • NestedAttributeMapping

        public NestedAttributeMapping​(Expression idExpression,
                                      Expression parentExpression,
                                      XPathUtil.StepList targetXPath,
                                      boolean isMultiValued,
                                      Map<Name,​Expression> clientProperties,
                                      Expression sourceElement,
                                      XPathUtil.StepList sourcePath,
                                      NamespaceSupport namespaces)
                               throws IOException
        Sole constructor
        Parameters:
        sourceElement - parent feature element type
        sourcePath - XPath link to nested feature
        Throws:
        IOException
    • Method Detail

      • getInputFeatures

        public List<Feature> getInputFeatures​(Object caller,
                                              Object foreignKeyValue,
                                              List<Object> idValues,
                                              Object feature,
                                              CoordinateReferenceSystem reprojection,
                                              List<PropertyName> selectedProperties,
                                              boolean includeMandatory)
                                       throws IOException
        Get matching input features that are stored in this mapping using a supplied link value.
        Returns:
        The matching input feature
        Throws:
        IOException
      • getInputFeatures

        public List<Feature> getInputFeatures​(Object foreignKeyValue,
                                              FeatureTypeMapping fMapping)
                                       throws IOException
        Get matching input features that are stored in this mapping using a supplied link value.
        Returns:
        The matching input feature
        Throws:
        IOException
      • getFeatures

        public List<Feature> getFeatures​(Object foreignKeyValue,
                                         CoordinateReferenceSystem reprojection,
                                         Feature feature,
                                         int resolveDepth,
                                         Integer resolveTimeOut)
                                  throws IOException
        Get the maching built features that are stored in this mapping using a supplied link value
        Parameters:
        reprojection - Reprojected CRS or null
        Returns:
        The matching simple features
        Throws:
        IOException
      • getFeatures

        public List<Feature> getFeatures​(Object source,
                                         Object foreignKeyValue,
                                         List<Object> idValues,
                                         CoordinateReferenceSystem reprojection,
                                         Object feature,
                                         List<PropertyName> selectedProperties,
                                         boolean includeMandatory,
                                         int resolveDepth,
                                         Integer resolveTimeOut)
                                  throws IOException
        Get the maching built features that are stored in this mapping using a supplied link value
        Parameters:
        reprojection - Reprojected CRS or null
        selectedProperties - list of properties to get
        Returns:
        The matching simple features
        Throws:
        IOException
      • getMappingSource

        protected FeatureSource<? extends FeatureType,​? extends Feature> getMappingSource​(Object feature)
                                                                                         throws IOException
        Throws:
        IOException
      • getNestedFeatureType

        public Object getNestedFeatureType​(Object feature)
        Returns:
        the nested feature type name
      • isConditional

        public boolean isConditional()
      • isSameSource

        public boolean isSameSource()
      • getFeatureTypeMapping

        public FeatureTypeMapping getFeatureTypeMapping​(Feature feature)
                                                 throws IOException
        Throws:
        IOException
      • getNamespaces

        public NamespaceSupport getNamespaces()