Package org.geotools.data.complex
Class XmlMappingFeatureIterator
Object
AbstractMappingFeatureIterator
DataAccessMappingFeatureIterator
XmlMappingFeatureIterator
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<Feature>,IMappingFeatureIterator,FeatureIterator<Feature>
An implementation of AbstractMappingFeatureIterator to handle XML datasources.
- Author:
- Russell Petty (GeoScience Victoria), Rini Angreani (CSIRO Earth Science and Resource Engineering)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected XmlResponsestatic final StringConstants for manipulating XPath ExpressionsFields inherited from class DataAccessMappingFeatureIterator
curSrcFeature, foreignIds, mappedSource, reprojection, sourceFeatures, targetFeatureFields inherited from class AbstractMappingFeatureIterator
attf, dataMaxFeatures, featureCounter, filterFac, ftf, GEOMETRY_FACTORY, includeMandatory, LOGGER, mapping, MULTI_VALUE_TYPE, namespaceAwareFilterFactory, namespaces, query, requestMaxFeatures, RESOLVE_TIMEOUT_POLL_INTERVAL, resolveDepth, resolveTimeOut, selectedMapping, selectedProperties, store, transaction, UNBOUNDED_MULTI_VALUE, XLINK_HREF_NAME, xpathAttributeBuilder -
Constructor Summary
ConstructorsConstructorDescriptionXmlMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query) XmlMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query, String xpath, String value) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected Featurestatic StringcreateIndexedItemXpathString(XmlFeatureTypeMapping mapping, XmlResponse xmlResponse, int indexCounter) protected StringextractIdForAttribute(Expression idExpression, Object sourceInstance) Based on the set of xpath expression/id extracting expression, finds the ID for the attributeidExpressionfrom the source complex attribute.protected FeatureIterator<? extends Feature>booleanhasNext()Return true if there are more features.protected booleanprotected booleanprotected Featureprotected voidsetClientProperties(Attribute target, Object xpathPrefix, Map<Name, Expression> clientProperties) protected booleanprotected booleanMethods inherited from class DataAccessMappingFeatureIterator
checkForeignIdValues, checkForeignIdValues, cleanEmptyElements, extractIdForFeature, getForeignIdValues, getIdValues, getMappedSource, getNextFeatureId, getSources, getValue, getValues, initialiseSourceFeatures, isByReference, isReprojectionCrsEqual, isTransactionOwner, peekNextValue, peekValue, populateFeatureData, setAttributeValue, setForeignIds, setListFilter, setNextFeature, setXlinkReference, skip, skipNestedMapping, skipTopElementMethods inherited from class AbstractMappingFeatureIterator
close, getClientProperties, getTransaction, getUnrolledQuery, isHasNextCalled, next, referenceToIdentifier, remove, setAttributeContent, setGeometryUserData, setHasNextCalledMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining
-
Field Details
-
XPATH_SEPARATOR
Constants for manipulating XPath Expressions- See Also:
-
xmlResponse
-
-
Constructor Details
-
XmlMappingFeatureIterator
public XmlMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query) throws IOException - Parameters:
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
-
-
Method Details
-
getSourceFeatureIterator
- Overrides:
getSourceFeatureIteratorin classDataAccessMappingFeatureIterator
-
isSourceFeatureIteratorNull
protected boolean isSourceFeatureIteratorNull()- Overrides:
isSourceFeatureIteratorNullin classDataAccessMappingFeatureIterator
-
extractIdForAttribute
Description copied from class:AbstractMappingFeatureIteratorBased on the set of xpath expression/id extracting expression, finds the ID for the attributeidExpressionfrom the source complex attribute.- Overrides:
extractIdForAttributein classDataAccessMappingFeatureIterator- Parameters:
idExpression- the location path of the attribute to be created, for which to obtain the id by evaluating the correspondingorg.geotools.filter.ExpressionfromsourceInstance.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, ornullif there is no an id mapping for that attribute.
-
createIndexedItemXpathString
public static String createIndexedItemXpathString(XmlFeatureTypeMapping mapping, XmlResponse xmlResponse, int indexCounter) -
populateFeatureData
- Throws:
IOException
-
setClientProperties
protected void setClientProperties(Attribute target, Object xpathPrefix, Map<Name, Expression> clientProperties) - Overrides:
setClientPropertiesin classAbstractMappingFeatureIterator
-
unprocessedFeatureExists
protected boolean unprocessedFeatureExists()- Overrides:
unprocessedFeatureExistsin classDataAccessMappingFeatureIterator
-
sourceFeatureIteratorHasNext
protected boolean sourceFeatureIteratorHasNext()- Overrides:
sourceFeatureIteratorHasNextin classDataAccessMappingFeatureIterator
-
isNextSourceFeatureNull
protected boolean isNextSourceFeatureNull()- Overrides:
isNextSourceFeatureNullin classDataAccessMappingFeatureIterator
-
getValue
-
closeSourceFeatures
protected void closeSourceFeatures()- Overrides:
closeSourceFeaturesin classDataAccessMappingFeatureIterator
-
hasNext
public boolean hasNext()Return true if there are more features.- Specified by:
hasNextin interfaceFeatureIterator<Feature>- Specified by:
hasNextin interfaceIterator<Feature>- Overrides:
hasNextin classDataAccessMappingFeatureIterator- Returns:
- true if more Features exist, false otherwise.
- See Also:
-
computeNext
- Overrides:
computeNextin classDataAccessMappingFeatureIterator- Throws:
IOException
-