org.geotools.data.complex
Class NestedAttributeMapping

Object
  extended by AttributeMapping
      extended by NestedAttributeMapping
Direct Known Subclasses:
JoiningNestedAttributeMapping

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
protected  FilterFactory filterFac
          Filter factory
protected  Expression nestedFeatureType
          Name of the nested features element
protected  XPathUtil.StepList nestedTargetXPath
          Target xpath that links to nested features
 
Fields inherited from class AttributeMapping
sourceExpression, targetXPath
 
Constructor Summary
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
 List<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 value
 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 value
 FeatureTypeMapping getFeatureTypeMapping(Feature feature)
           
 List<Feature> getInputFeatures(Object foreignKeyValue, FeatureTypeMapping fMapping)
          Get matching input features that are stored in this mapping using a supplied link value.
 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.
 AttributeMapping getMapping(FeatureTypeMapping featureTypeMapping)
           
protected  FeatureSource<FeatureType,Feature> getMappingSource(Object feature)
           
 NamespaceSupport getNamespaces()
           
 Object getNestedFeatureType(Object feature)
           
 boolean isConditional()
           
 boolean isNestedAttribute()
          This is overridden by NestedAttributeMapping
 boolean isSameSource()
           
 
Methods inherited from class AttributeMapping
encodeIfEmpty, equals, getClientProperties, getIdentifierExpression, getInstanceXpath, getLabel, getParentLabel, getSourceExpression, getSourceIndex, getTargetNodeInstance, getTargetXPath, hashCode, isList, isMultiValued, setEncodeIfEmpty, setIdentifierExpression, setInstanceXpath, setLabel, setList, setParentLabel, toString
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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:
idExpression -
parentExpression -
targetXPath -
targetNodeInstance -
isMultiValued -
clientProperties -
sourceElement - parent feature element type
sourcePath - XPath link to nested feature
parentSource - parent feature source
Throws:
IOException
Method Detail

isNestedAttribute

public boolean isNestedAttribute()
Description copied from class: AttributeMapping
This is overridden by NestedAttributeMapping

Overrides:
isNestedAttribute in class AttributeMapping
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.

Parameters:
foreignKeyValue -
Returns:
The matching input feature
Throws:
IOException
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.

Parameters:
foreignKeyValue -
Returns:
The matching input feature
Throws:
IOException
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:
foreignKeyValue -
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:
foreignKeyValue -
reprojection - Reprojected CRS or null
selectedProperties - list of properties to get
Returns:
The matching simple features
Throws:
IOException

getMappingSource

protected FeatureSource<FeatureType,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()


Copyright © 1996-2014 Geotools. All Rights Reserved.