org.geotools.data.complex
Class NestedAttributeMapping

java.lang.Object
  extended by org.geotools.data.complex.AttributeMapping
      extended by org.geotools.data.complex.NestedAttributeMapping

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, Curtin University of Technology

Constructor Summary
NestedAttributeMapping(org.opengis.filter.expression.Expression idExpression, org.opengis.filter.expression.Expression parentExpression, XPath.StepList targetXPath, boolean isMultiValued, java.util.Map<org.opengis.feature.type.Name,org.opengis.filter.expression.Expression> clientProperties, org.opengis.filter.expression.Expression sourceElement, XPath.StepList sourcePath, org.xml.sax.helpers.NamespaceSupport namespaces)
          Sole constructor
 
Method Summary
 java.util.List<org.opengis.feature.Feature> getFeatures(java.lang.Object foreignKeyValue, org.opengis.referencing.crs.CoordinateReferenceSystem reprojection, org.opengis.feature.Feature feature)
          Get the maching built features that are stored in this mapping using a supplied link value
 FeatureTypeMapping getFeatureTypeMapping(org.opengis.feature.Feature feature)
           
 java.util.List<org.opengis.feature.Feature> getInputFeatures(java.lang.Object foreignKeyValue, org.opengis.referencing.crs.CoordinateReferenceSystem reprojection, org.opengis.feature.Feature feature)
          Get matching input features that are stored in this mapping using a supplied link value.
 java.util.List<org.opengis.feature.Feature> getInputFeatures(java.lang.Object foreignKeyValue, org.opengis.referencing.crs.CoordinateReferenceSystem reprojection, FeatureTypeMapping fMapping)
          Get matching input features that are stored in this mapping using a supplied link value.
 org.xml.sax.helpers.NamespaceSupport getNamespaces()
           
 java.lang.Object getNestedFeatureType(org.opengis.feature.Feature feature)
           
 boolean isConditional()
           
 boolean isNestedAttribute()
          This is overridden by NestedAttributeMapping
 boolean isSameSource()
           
 
Methods inherited from class org.geotools.data.complex.AttributeMapping
equals, getClientProperties, getIdentifierExpression, getSourceExpression, getTargetNodeInstance, getTargetXPath, hashCode, isMultiValued, isTreeAttribute, setIdentifierExpression, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NestedAttributeMapping

public NestedAttributeMapping(org.opengis.filter.expression.Expression idExpression,
                              org.opengis.filter.expression.Expression parentExpression,
                              XPath.StepList targetXPath,
                              boolean isMultiValued,
                              java.util.Map<org.opengis.feature.type.Name,org.opengis.filter.expression.Expression> clientProperties,
                              org.opengis.filter.expression.Expression sourceElement,
                              XPath.StepList sourcePath,
                              org.xml.sax.helpers.NamespaceSupport namespaces)
                       throws java.io.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:
java.io.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 java.util.List<org.opengis.feature.Feature> getInputFeatures(java.lang.Object foreignKeyValue,
                                                                    org.opengis.referencing.crs.CoordinateReferenceSystem reprojection,
                                                                    org.opengis.feature.Feature feature)
                                                             throws java.io.IOException
Get matching input features that are stored in this mapping using a supplied link value.

Parameters:
foreignKeyValue -
reprojection - Reprojected CRS or null
Returns:
The matching input feature
Throws:
java.io.IOException
java.io.IOException

getInputFeatures

public java.util.List<org.opengis.feature.Feature> getInputFeatures(java.lang.Object foreignKeyValue,
                                                                    org.opengis.referencing.crs.CoordinateReferenceSystem reprojection,
                                                                    FeatureTypeMapping fMapping)
                                                             throws java.io.IOException
Get matching input features that are stored in this mapping using a supplied link value.

Parameters:
foreignKeyValue -
reprojection - Reprojected CRS or null
Returns:
The matching input feature
Throws:
java.io.IOException
java.io.IOException

getFeatures

public java.util.List<org.opengis.feature.Feature> getFeatures(java.lang.Object foreignKeyValue,
                                                               org.opengis.referencing.crs.CoordinateReferenceSystem reprojection,
                                                               org.opengis.feature.Feature feature)
                                                        throws java.io.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:
java.io.IOException

getNestedFeatureType

public java.lang.Object getNestedFeatureType(org.opengis.feature.Feature feature)
Returns:
the nested feature type name

isSameSource

public boolean isSameSource()

isConditional

public boolean isConditional()

getFeatureTypeMapping

public FeatureTypeMapping getFeatureTypeMapping(org.opengis.feature.Feature feature)
                                         throws java.io.IOException
Throws:
java.io.IOException

getNamespaces

public org.xml.sax.helpers.NamespaceSupport getNamespaces()


Copyright © 1996-2010 Geotools. All Rights Reserved.