Package org.geotools.data.complex
Class NestedAttributeMapping
- Object
-
- AttributeMapping
-
- 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 Summary
Fields Modifier and Type Field Description protected FilterFactory
filterFac
Filter factoryprotected Expression
nestedFeatureType
Name of the nested features elementprotected XPathUtil.StepList
nestedTargetXPath
Target xpath that links to nested features-
Fields inherited from class AttributeMapping
sourceExpression, targetXPath
-
-
Constructor Summary
Constructors Constructor Description NestedAttributeMapping(Expression idExpression, Expression parentExpression, XPathUtil.StepList targetXPath, boolean isMultiValued, Map<Name,Expression> clientProperties, Expression sourceElement, XPathUtil.StepList sourcePath, NamespaceSupport namespaces)
Sole constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Feature>
getFeatures(Object source, 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 valueList<Feature>
getFeatures(Object foreignKeyValue, CoordinateReferenceSystem reprojection, Feature feature, int resolveDepth, Integer resolveTimeOut)
Get the maching built features that are stored in this mapping using a supplied link valueFeatureTypeMapping
getFeatureTypeMapping(Feature feature)
List<Feature>
getInputFeatures(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.List<Feature>
getInputFeatures(Object foreignKeyValue, FeatureTypeMapping fMapping)
Get matching input features that are stored in this mapping using a supplied link value.AttributeMapping
getMapping(FeatureTypeMapping featureTypeMapping)
protected FeatureSource<? extends FeatureType,? extends Feature>
getMappingSource(Object feature)
NamespaceSupport
getNamespaces()
Object
getNestedFeatureType(Object feature)
boolean
isConditional()
boolean
isNestedAttribute()
This is overridden by NestedAttributeMappingboolean
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 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
-
filterFac
protected FilterFactory filterFac
Filter factory
-
-
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 typesourcePath
- XPath link to nested feature- Throws:
IOException
-
-
Method Detail
-
isNestedAttribute
public boolean isNestedAttribute()
Description copied from class:AttributeMapping
This is overridden by NestedAttributeMapping- Overrides:
isNestedAttribute
in classAttributeMapping
- Returns:
- always return false
-
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
-
getMapping
public AttributeMapping getMapping(FeatureTypeMapping featureTypeMapping)
-
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 nullselectedProperties
- 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()
-
-