Package org.geotools.data.complex
Class AbstractMappingFeatureIterator
Object
AbstractMappingFeatureIterator
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<Feature>,IMappingFeatureIterator,FeatureIterator<Feature>
- Direct Known Subclasses:
DataAccessMappingFeatureIterator
public abstract class AbstractMappingFeatureIterator
extends Object
implements IMappingFeatureIterator
Base class for several MappingFeatureImplementation's.
- Author:
- Russell Petty (GeoScience Victoria)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FeatureFactoryFactory used to create the target feature and attributesprotected final intmaximum number of features to request when running the data(base?)protected intcounter to ensure maxFeatures is not exceededprotected FilterFactoryprotected FeatureTypeFactorystatic final GeometryFactoryprotected booleanprotected static final LoggerThe logger for the filter module.protected FeatureTypeMappingThe mappings for the source and target schemasstatic final StringKey value for Attribute userData Map for indicating the presence of a multi value classifier.protected FilterFactoryprotected NamespaceSupportprotected Queryprotected final intmaxFeatures restriction value as provided by query.static final longMilliseconds between polls of resolver thread.protected intprotected Integerprotected List<AttributeMapping>Mappings after Property Selection is appliedprotected Map<AttributeMapping,List<PropertyName>> Selected Properties for Feature Chainingprotected AppSchemaDataAccessprotected Transactionstatic final StringValue for Attribute userData Map for indicating an anonymous unbounded sequence classifier.static final NameName representation of xlink:hrefprotected final XPath -
Constructor Summary
ConstructorsConstructorDescriptionAbstractMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query) AbstractMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query, Query unrolledQuery) AbstractMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query, Query unrolledQuery, boolean hasPostFilter) AbstractMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query, Query unrolledQuery, boolean removeQueryLimitIfDenormalised, boolean hasPostFilter) AbstractMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query, Query unrolledQuery, boolean removeQueryLimitIfDenormalised, boolean hasPostFilter, Transaction tx) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the underlying FeatureIteratorprotected abstract voidprotected abstract Featureprotected abstract 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 Map<Name,Expression> getClientProperties(Property attribute) protected abstract FeatureIterator<? extends Feature>protected QuerygetUnrolledQuery(Query query) Return a query appropriate to its underlying feature source.protected abstract ObjectgetValue(Expression expression, Object sourceFeature) abstract booleanhasNext()Does another Feature exist in this Iteration.protected abstract voidinitialiseSourceFeatures(FeatureTypeMapping mapping, Query query, CoordinateReferenceSystem crs) protected booleanprotected abstract booleanprotected abstract booleannext()Return next feature.protected abstract Featureprotected static StringreferenceToIdentifier(String reference) voidremove()Shall not be called, just throws an UnsupportedOperationExceptionprotected AttributesetAttributeContent(Attribute target, XPathUtil.StepList xpath, Object value, String id, AttributeType targetNodeType, boolean isXlinkRef, Expression sourceExpression, Object source, Map<Name, Expression> clientProperties, boolean ignoreXlinkHref) protected voidsetClientProperties(Attribute target, Object source, Map<Name, Expression> clientProperties) protected voidsetGeometryUserData(Attribute target, Map<Name, Object> targetAttributes) protected voidsetHasNextCalled(boolean hasNextCalled) protected abstract booleanprotected abstract booleanMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining
-
Field Details
-
LOGGER
The logger for the filter module. -
GEOMETRY_FACTORY
-
filterFac
-
ftf
-
XLINK_HREF_NAME
Name representation of xlink:href -
MULTI_VALUE_TYPE
Key value for Attribute userData Map for indicating the presence of a multi value classifier.- See Also:
-
UNBOUNDED_MULTI_VALUE
Value for Attribute userData Map for indicating an anonymous unbounded sequence classifier.- See Also:
-
RESOLVE_TIMEOUT_POLL_INTERVAL
public static final long RESOLVE_TIMEOUT_POLL_INTERVALMilliseconds between polls of resolver thread.- See Also:
-
mapping
The mappings for the source and target schemas -
selectedMapping
Mappings after Property Selection is applied -
selectedProperties
Selected Properties for Feature Chaining -
includeMandatory
protected boolean includeMandatory -
attf
Factory used to create the target feature and attributes -
store
-
xpathAttributeBuilder
-
namespaceAwareFilterFactory
-
requestMaxFeatures
protected final int requestMaxFeaturesmaxFeatures restriction value as provided by query. After the data query has run, *this* limit is also applied to the result. -
dataMaxFeatures
protected final int dataMaxFeaturesmaximum number of features to request when running the data(base?) query. For denormalised data sources, this neesd to be be Query.DEFAULT_MAX to trigger a full table scan. In all other cases it will be the same value as requestMaxFeatures -
featureCounter
protected int featureCountercounter to ensure maxFeatures is not exceeded -
namespaces
-
resolveDepth
protected int resolveDepth -
resolveTimeOut
-
transaction
-
query
-
-
Constructor Details
-
AbstractMappingFeatureIterator
public AbstractMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query) throws IOException - Throws:
IOException
-
AbstractMappingFeatureIterator
public AbstractMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query, Query unrolledQuery) throws IOException - Throws:
IOException
-
AbstractMappingFeatureIterator
public AbstractMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query, Query unrolledQuery, boolean hasPostFilter) throws IOException - Throws:
IOException
-
AbstractMappingFeatureIterator
public AbstractMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query, Query unrolledQuery, boolean removeQueryLimitIfDenormalised, boolean hasPostFilter) throws IOException - Throws:
IOException
-
AbstractMappingFeatureIterator
public AbstractMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query, Query unrolledQuery, boolean removeQueryLimitIfDenormalised, boolean hasPostFilter, Transaction tx) throws IOException - Throws:
IOException
-
-
Method Details
-
getTransaction
-
remove
public void remove()Shall not be called, just throws an UnsupportedOperationException -
close
public void close()Closes the underlying FeatureIterator- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceFeatureIterator<Feature>
-
extractIdForAttribute
Based on the set of xpath expression/id extracting expression, finds the ID for the attributeidExpressionfrom the source complex attribute.- 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.
-
getUnrolledQuery
Return a query appropriate to its underlying feature source.- Parameters:
query- the original query against the output schema- Returns:
- a query appropriate to be executed over the underlying feature source.
-
isHasNextCalled
protected boolean isHasNextCalled() -
setHasNextCalled
protected void setHasNextCalled(boolean hasNextCalled) -
next
Return next feature. -
getClientProperties
- Throws:
DataSourceException
-
referenceToIdentifier
-
setAttributeContent
protected Attribute setAttributeContent(Attribute target, XPathUtil.StepList xpath, Object value, String id, AttributeType targetNodeType, boolean isXlinkRef, Expression sourceExpression, Object source, Map<Name, Expression> clientProperties, boolean ignoreXlinkHref) -
setClientProperties
protected void setClientProperties(Attribute target, Object source, Map<Name, Expression> clientProperties) -
setGeometryUserData
-
closeSourceFeatures
protected abstract void closeSourceFeatures() -
getSourceFeatureIterator
-
initialiseSourceFeatures
protected abstract void initialiseSourceFeatures(FeatureTypeMapping mapping, Query query, CoordinateReferenceSystem crs) throws IOException - Throws:
IOException
-
unprocessedFeatureExists
protected abstract boolean unprocessedFeatureExists() -
sourceFeatureIteratorHasNext
protected abstract boolean sourceFeatureIteratorHasNext() -
isNextSourceFeatureNull
protected abstract boolean isNextSourceFeatureNull() -
populateFeatureData
- Throws:
IOException
-
getValue
-
isSourceFeatureIteratorNull
protected abstract boolean isSourceFeatureIteratorNull() -
computeNext
- Throws:
IOException
-
hasNext
public abstract boolean hasNext()Description copied from interface:FeatureIteratorDoes another Feature exist in this Iteration.Iterator defin: Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)
-