org.geotools.data.complex
Class XmlMappingFeatureIterator
Object
AbstractMappingFeatureIterator
DataAccessMappingFeatureIterator
XmlMappingFeatureIterator
- All Implemented Interfaces:
- Closeable, Iterator<Feature>, IMappingFeatureIterator, FeatureIterator<Feature>
public class XmlMappingFeatureIterator
- extends DataAccessMappingFeatureIterator
An implementation of AbstractMappingFeatureIterator to handle XML datasources.
- Author:
- Russell Petty (GeoScience Victoria), Rini Angreani (CSIRO Earth Science and Resource Engineering)
Fields inherited from class AbstractMappingFeatureIterator |
attf, dataMaxFeatures, featureCounter, ftf, includeMandatory, LOGGER, mapping, namespaceAwareFilterFactory, namespaces, requestMaxFeatures, RESOLVE_TIMEOUT_POLL_INTERVAL, resolveDepth, resolveTimeOut, selectedMapping, selectedProperties, store, XLINK_HREF_NAME, xpathAttributeBuilder |
Methods inherited from class DataAccessMappingFeatureIterator |
checkForeignIdValues, checkForeignIdValues, cleanEmptyElements, extractIdForFeature, getForeignIdValues, getIdValues, getNextFeatureId, getSources, getValue, getValues, initialiseSourceFeatures, isByReference, isReprojectionCrsEqual, peekNextValue, peekValue, populateFeatureData, setAttributeValue, setForeignIds, setListFilter, setNextFeature, setXlinkReference, skip, skipNestedMapping, skipTopElement |
Methods inherited from class AbstractMappingFeatureIterator |
close, getClientProperties, getDataMaxFeatures, getRequestMaxFeatures, getUnrolledQuery, isHasNextCalled, next, referenceToIdentifier, remove, setAttributeContent, setGeometryUserData, setHasNextCalled |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XPATH_SEPARATOR
public static final String XPATH_SEPARATOR
- Constants for manipulating XPath Expressions
- See Also:
- Constant Field Values
xmlResponse
protected XmlResponse xmlResponse
XmlMappingFeatureIterator
public XmlMappingFeatureIterator(AppSchemaDataAccess store,
FeatureTypeMapping mapping,
Query query)
throws IOException
- Parameters:
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.
- Throws:
IOException
XmlMappingFeatureIterator
public XmlMappingFeatureIterator(AppSchemaDataAccess store,
FeatureTypeMapping mapping,
Query query,
String xpath,
String value)
throws IOException
- Throws:
IOException
getSourceFeatureIterator
protected FeatureIterator<? extends Feature> getSourceFeatureIterator()
- Overrides:
getSourceFeatureIterator
in class DataAccessMappingFeatureIterator
isSourceFeatureIteratorNull
protected boolean isSourceFeatureIteratorNull()
- Overrides:
isSourceFeatureIteratorNull
in class DataAccessMappingFeatureIterator
extractIdForAttribute
protected String extractIdForAttribute(Expression idExpression,
Object sourceInstance)
- Description copied from class:
AbstractMappingFeatureIterator
- Based on the set of xpath expression/id extracting expression, finds the ID for the attribute
idExpression
from the source complex attribute.
- Overrides:
extractIdForAttribute
in class DataAccessMappingFeatureIterator
- Parameters:
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.
- Returns:
- the ID to be applied to a new attribute instance addressed by
attributeXPath
, or null
if there is no an id mapping for
that attribute.
createIndexedItemXpathString
public static String createIndexedItemXpathString(XmlFeatureTypeMapping mapping,
XmlResponse xmlResponse,
int indexCounter)
populateFeatureData
protected Feature populateFeatureData()
throws IOException
- Throws:
IOException
setClientProperties
protected void setClientProperties(Attribute target,
Object xpathPrefix,
Map<Name,Expression> clientProperties)
- Overrides:
setClientProperties
in class AbstractMappingFeatureIterator
unprocessedFeatureExists
protected boolean unprocessedFeatureExists()
- Overrides:
unprocessedFeatureExists
in class DataAccessMappingFeatureIterator
sourceFeatureIteratorHasNext
protected boolean sourceFeatureIteratorHasNext()
- Overrides:
sourceFeatureIteratorHasNext
in class DataAccessMappingFeatureIterator
isNextSourceFeatureNull
protected boolean isNextSourceFeatureNull()
- Overrides:
isNextSourceFeatureNull
in class DataAccessMappingFeatureIterator
getValue
protected List<String> getValue(String expressionValue)
closeSourceFeatures
protected void closeSourceFeatures()
- Overrides:
closeSourceFeatures
in class DataAccessMappingFeatureIterator
hasNext
public boolean hasNext()
- Return true if there are more features.
- Specified by:
hasNext
in interface Iterator<Feature>
- Specified by:
hasNext
in interface FeatureIterator<Feature>
- Overrides:
hasNext
in class DataAccessMappingFeatureIterator
- Returns:
- true if more Features exist, false otherwise.
- See Also:
Iterator.hasNext()
computeNext
protected Feature computeNext()
throws IOException
- Overrides:
computeNext
in class DataAccessMappingFeatureIterator
- Throws:
IOException
Copyright © 1996-2014 Geotools. All Rights Reserved.