Package org.geotools.data.joining
Class JoiningNestedAttributeMapping
Object
AttributeMapping
NestedAttributeMapping
JoiningNestedAttributeMapping
Nested attribute mapping used for joining system
- Author:
- Niels Charlier (Curtin University of Technology)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Instance that holds temporary data for going through the features, for each 'caller' (any object going through the features) there is one. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<Object,
JoiningNestedAttributeMapping.Instance> The instances.Fields inherited from class NestedAttributeMapping
filterFac, nestedFeatureType, nestedTargetXPath
Fields inherited from class AttributeMapping
sourceExpression, targetXPath
-
Constructor Summary
ConstructorsConstructorDescriptionJoiningNestedAttributeMapping
(Expression idExpression, Expression parentExpression, XPathUtil.StepList targetXPath, boolean isMultiValued, Map<Name, Expression> clientProperties, Expression sourceElement, XPathUtil.StepList sourcePath, NamespaceSupport namespaces) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
Close the instance of this caller.getFeatures
(Object caller, Object foreignKeyValue, List<Object> idValues, CoordinateReferenceSystem reprojection, Object feature, List<PropertyName> selectedProperties, boolean includeMandatory, int resolveDepth, Integer resolveTimeOut) Get the maching built features that are stored in this mapping using a supplied link valuegetInputFeatures
(Object caller, Object foreignKeyValue, List<Object> idValues, Object feature, CoordinateReferenceSystem reprojection, List<PropertyName> selectedProperties, boolean includeMandatory) Get matching input features that are stored in this mapping using a supplied link value.getInputFeatures
(Object foreignKeyValue, FeatureTypeMapping fMapping) Get matching input features that are stored in this mapping using a supplied link value.getNestedFeatureIterators
(Object caller) For testing purposes only: exposes the nested feature iterators to calling code.initSourceFeatures
(JoiningNestedAttributeMapping.Instance instance, Name featureTypeName, CoordinateReferenceSystem reprojection, List<PropertyName> selectedProperties, boolean includeMandatory, int resolveDepth, Integer resolveTimeOut, Transaction transaction) Initialise a new iterator (for polymorphism, there could be multiple per instance)void
open
(Object caller, Query baseTableQuery, FeatureTypeMapping mapping) Open an instance (cursor) for a specific caller.void
If we have decided not to build the parent feature, we need to skip all rows that were returned to build itprotected void
skipFeatures
(DataAccessMappingFeatureIterator featureIterator, Expression nestedSourceExpression, Object foreignKeyValue, List<Object> idValues) Methods inherited from class NestedAttributeMapping
getFeatures, getFeatureTypeMapping, getMapping, getMappingSource, getNamespaces, getNestedFeatureType, isConditional, isNestedAttribute, isSameSource
Methods inherited from class AttributeMapping
encodeIfEmpty, equals, getClientProperties, getIdentifierExpression, getIndexField, getInstanceXpath, getLabel, getMultipleValue, getParentLabel, getSourceExpression, getSourceIndex, getTargetNodeInstance, getTargetXPath, hashCode, isList, isMultiValued, setEncodeIfEmpty, setIdentifierExpression, setIndexField, setInstanceXpath, setLabel, setList, setParentLabel, toString
-
Field Details
-
instances
The instances.
-
-
Constructor Details
-
JoiningNestedAttributeMapping
public JoiningNestedAttributeMapping(Expression idExpression, Expression parentExpression, XPathUtil.StepList targetXPath, boolean isMultiValued, Map<Name, Expression> clientProperties, Expression sourceElement, XPathUtil.StepList sourcePath, NamespaceSupport namespaces) throws IOExceptionConstructor- Throws:
IOException
-
-
Method Details
-
getInputFeatures
Description copied from class:NestedAttributeMapping
Get matching input features that are stored in this mapping using a supplied link value.- Overrides:
getInputFeatures
in classNestedAttributeMapping
- Returns:
- The matching input feature
-
initSourceFeatures
public DataAccessMappingFeatureIterator initSourceFeatures(JoiningNestedAttributeMapping.Instance instance, Name featureTypeName, CoordinateReferenceSystem reprojection, List<PropertyName> selectedProperties, boolean includeMandatory, int resolveDepth, Integer resolveTimeOut, Transaction transaction) throws IOException Initialise a new iterator (for polymorphism, there could be multiple per instance)- Throws:
IOException
-
open
public void open(Object caller, Query baseTableQuery, FeatureTypeMapping mapping) throws IOException Open an instance (cursor) for a specific caller. An instance holds a cursor and any additional information to move through the features.- Throws:
IOException
-
close
Close the instance of this caller. -
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.- Overrides:
getInputFeatures
in classNestedAttributeMapping
- Returns:
- The matching input feature
- Throws:
IOException
-
getFeatures
public List<Feature> getFeatures(Object caller, 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- Overrides:
getFeatures
in classNestedAttributeMapping
- Parameters:
reprojection
- Reprojected CRS or nullselectedProperties
- list of properties to get- Returns:
- The matching simple features
- Throws:
IOException
-
skipFeatures
protected void skipFeatures(DataAccessMappingFeatureIterator featureIterator, Expression nestedSourceExpression, Object foreignKeyValue, List<Object> idValues) throws IOException - Throws:
IOException
-
skip
If we have decided not to build the parent feature, we need to skip all rows that were returned to build it- Throws:
IOException
-
getNestedFeatureIterators
For testing purposes only: exposes the nested feature iterators to calling code.- Parameters:
caller
- the object going through the features- Returns:
- a map of nested feature iterators, keyed by nested feature type name
-