|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.complex.AbstractMappingFeatureIterator
org.geotools.data.complex.DataAccessMappingFeatureIterator
public class DataAccessMappingFeatureIterator
A Feature iterator that operates over the FeatureSource of a FeatureTypeMapping and produces Features of the output schema by applying the mapping rules to the Features of the source schema.
This iterator acts like a one-to-one mapping, producing a Feature of the target type for each feature of the source type.
Field Summary | |
---|---|
protected org.opengis.feature.Feature |
curSrcFeature
This is the feature that will be processed in next() |
protected FeatureSource<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> |
mappedSource
|
protected org.opengis.referencing.crs.CoordinateReferenceSystem |
reprojection
Reprojected CRS from the source simple features, or null |
protected FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> |
sourceFeatures
|
Fields inherited from class org.geotools.data.complex.AbstractMappingFeatureIterator |
---|
attf, featureCounter, featureFidMapping, LOGGER, mapping, maxFeatures, namespaceAwareFilterFactory, namespaces, store, XLINK_HREF_NAME, xpathAttributeBuilder |
Constructor Summary | |
---|---|
DataAccessMappingFeatureIterator(AppSchemaDataAccess store,
FeatureTypeMapping mapping,
Query query,
boolean isFiltered,
boolean isDenormalised)
|
|
DataAccessMappingFeatureIterator(AppSchemaDataAccess store,
FeatureTypeMapping mapping,
Query query,
boolean isFiltered,
boolean isDenormalised,
boolean isQueryUnrolled)
|
Method Summary | |
---|---|
protected void |
closeSourceFeatures()
|
protected org.opengis.feature.Feature |
computeNext()
|
protected java.lang.String |
extractIdForAttribute(org.opengis.filter.expression.Expression idExpression,
java.lang.Object sourceInstance)
Based on the set of xpath expression/id extracting expression, finds the ID for the attribute idExpression from the source complex attribute. |
protected java.lang.String |
extractIdForFeature()
|
protected java.lang.String |
extractIdForFeature(org.opengis.feature.Feature feature)
|
void |
flagNextFeature(boolean isSet)
|
protected java.util.Iterator<org.opengis.feature.Feature> |
getSourceFeatureIterator()
|
protected java.lang.Object |
getValue(org.opengis.filter.expression.Expression expression,
java.lang.Object sourceFeature)
|
protected java.lang.Object |
getValues(boolean isMultiValued,
org.opengis.filter.expression.Expression expression,
java.lang.Object sourceFeatureInput)
|
boolean |
hasNext()
Return true if there are more features. |
protected void |
initialiseSourceFeatures(FeatureTypeMapping mapping,
Query query)
|
protected boolean |
isByReference(java.util.Map<org.opengis.feature.type.Name,org.opengis.filter.expression.Expression> clientPropsMappings,
boolean isNested)
Checks if client property has xlink:ref in it, if the attribute is for chained features. |
boolean |
isNextFeatureSet()
|
protected boolean |
isNextSourceFeatureNull()
|
protected boolean |
isSourceFeatureIteratorNull()
|
protected org.opengis.feature.Feature |
populateFeatureData(java.lang.String id)
|
protected void |
setAttributeValue(org.opengis.feature.Attribute target,
org.opengis.feature.Feature source,
AttributeMapping attMapping)
Sets the values of grouping attributes. |
protected void |
setClientProperties(org.opengis.feature.Attribute target,
java.lang.Object source,
java.util.Map<org.opengis.feature.type.Name,org.opengis.filter.expression.Expression> clientProperties)
|
protected void |
setNextFeature(java.lang.String fId,
java.util.ArrayList<org.opengis.feature.Feature> features)
|
protected void |
setXlinkReference(org.opengis.feature.Attribute target,
java.util.Map<org.opengis.feature.type.Name,org.opengis.filter.expression.Expression> clientPropsMappings,
java.lang.Object value,
XPath.StepList xpath,
org.opengis.feature.type.AttributeType targetNodeType)
Set xlink:href client property for multi-valued chained features. |
protected boolean |
sourceFeatureIteratorHasNext()
|
protected boolean |
unprocessedFeatureExists()
|
Methods inherited from class org.geotools.data.complex.AbstractMappingFeatureIterator |
---|
close, getUnrolledQuery, isHasNextCalled, next, remove, setGeometry, setHasNextCalled |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.opengis.referencing.crs.CoordinateReferenceSystem reprojection
protected org.opengis.feature.Feature curSrcFeature
protected FeatureSource<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> mappedSource
protected FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> sourceFeatures
Constructor Detail |
---|
public DataAccessMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query, boolean isFiltered, boolean isDenormalised) throws java.io.IOException
java.io.IOException
public DataAccessMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query, boolean isFiltered, boolean isDenormalised, boolean isQueryUnrolled) throws java.io.IOException
store
- mapping
- place holder for the target type, the surrogate FeatureSource and the mappings
between them.query
- the query over the target feature type, that is to be unpacked to its equivalent
over the surrogate feature type.
java.io.IOException
Method Detail |
---|
public boolean hasNext()
AbstractMappingFeatureIterator
hasNext
in interface java.util.Iterator<org.opengis.feature.Feature>
hasNext
in interface FeatureIterator<org.opengis.feature.Feature>
hasNext
in class AbstractMappingFeatureIterator
Iterator.hasNext()
protected java.util.Iterator<org.opengis.feature.Feature> getSourceFeatureIterator()
getSourceFeatureIterator
in class AbstractMappingFeatureIterator
protected boolean isSourceFeatureIteratorNull()
isSourceFeatureIteratorNull
in class AbstractMappingFeatureIterator
protected void initialiseSourceFeatures(FeatureTypeMapping mapping, Query query) throws java.io.IOException
initialiseSourceFeatures
in class AbstractMappingFeatureIterator
java.io.IOException
protected boolean unprocessedFeatureExists()
unprocessedFeatureExists
in class AbstractMappingFeatureIterator
protected java.lang.String extractIdForFeature()
extractIdForFeature
in class AbstractMappingFeatureIterator
protected java.lang.String extractIdForFeature(org.opengis.feature.Feature feature)
protected java.lang.String extractIdForAttribute(org.opengis.filter.expression.Expression idExpression, java.lang.Object sourceInstance)
AbstractMappingFeatureIterator
idExpression
from the source complex attribute.
extractIdForAttribute
in class AbstractMappingFeatureIterator
idExpression
- the location path of the attribute to be created, for which to obtain the id by
evaluating the corresponding org.geotools.filter.Expression
from
sourceInstance
.sourceInstance
- a complex attribute which is the source of the mapping.
attributeXPath
, or null
if there is no an id mapping for
that attribute.protected boolean isNextSourceFeatureNull()
isNextSourceFeatureNull
in class AbstractMappingFeatureIterator
protected boolean sourceFeatureIteratorHasNext()
sourceFeatureIteratorHasNext
in class AbstractMappingFeatureIterator
protected java.lang.Object getValues(boolean isMultiValued, org.opengis.filter.expression.Expression expression, java.lang.Object sourceFeatureInput)
protected void setAttributeValue(org.opengis.feature.Attribute target, org.opengis.feature.Feature source, AttributeMapping attMapping) throws java.io.IOException
sourceFeature
- groupingMappings
- targetFeature
-
java.io.IOException
protected void setXlinkReference(org.opengis.feature.Attribute target, java.util.Map<org.opengis.feature.type.Name,org.opengis.filter.expression.Expression> clientPropsMappings, java.lang.Object value, XPath.StepList xpath, org.opengis.feature.type.AttributeType targetNodeType)
target
- The target attributeclientPropsMappings
- Client properties mappingsvalue
- Nested featuresxpath
- Attribute xPath where the client properties are to be settargetNodeType
- Target node typeprotected void setClientProperties(org.opengis.feature.Attribute target, java.lang.Object source, java.util.Map<org.opengis.feature.type.Name,org.opengis.filter.expression.Expression> clientProperties)
setClientProperties
in class AbstractMappingFeatureIterator
protected void setNextFeature(java.lang.String fId, java.util.ArrayList<org.opengis.feature.Feature> features) throws java.io.IOException
java.io.IOException
protected org.opengis.feature.Feature computeNext() throws java.io.IOException
computeNext
in class AbstractMappingFeatureIterator
java.io.IOException
protected org.opengis.feature.Feature populateFeatureData(java.lang.String id) throws java.io.IOException
populateFeatureData
in class AbstractMappingFeatureIterator
java.io.IOException
protected void closeSourceFeatures()
closeSourceFeatures
in class AbstractMappingFeatureIterator
protected java.lang.Object getValue(org.opengis.filter.expression.Expression expression, java.lang.Object sourceFeature)
getValue
in class AbstractMappingFeatureIterator
protected boolean isByReference(java.util.Map<org.opengis.feature.type.Name,org.opengis.filter.expression.Expression> clientPropsMappings, boolean isNested)
clientPropsMappings
- the client properties mappingsisNested
- true if we're dealing with chained/nested features
public void flagNextFeature(boolean isSet)
public boolean isNextFeatureSet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |