Package org.geotools.data.complex
Class IndexedMappingFeatureIterator
- Object
-
- IndexedMappingFeatureIterator
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<Feature>,IMappingFeatureIterator,FeatureIterator<Feature>
- Direct Known Subclasses:
PartialIndexedMappingFeatureIterator,TotalIndexedMappingFeatureIterator
public abstract class IndexedMappingFeatureIterator extends Object implements IMappingFeatureIterator
Base class for Indexed Iterators- Author:
- Fernando MiƱo (Geosolutions
-
-
Field Summary
Fields Modifier and Type Field Description protected FilterFactoryffprotected IndexIdIteratorindexIteratorprotected IndexQueryManagerindexModeProcprotected FeatureTypeMappingmappingprotected Queryqueryprotected IndexQueryManager.QueryIndexCoveragequeryModeprotected FeatureIterator<? extends Feature>sourceIteratorprotected AppSchemaDataAccessstoreprotected Transactiontransactionprotected FilterunrolledFilter
-
Constructor Summary
Constructors Constructor Description IndexedMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query, Filter unrolledFilter, Transaction transaction, IndexQueryManager indexModeProcessor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeMappinggetFidAttrMap()StringgetFidIndexName()XPathUtil.StepListgetFidStepList()protected static AttributeMappinggetIndexedAttribute(FeatureTypeMapping mapping, String xpath)Search for indexed attribute, including on Nested Featuresprotected IndexIdIteratorgetIndexIterator()protected List<PropertyName>getIndexQueryProperties()protected List<String>getNextSourceIdList()Extracts next id list from index iteratorprotected voidinitializeIndexIterator()Initialize the index FeatureCollection and iteratorprotected booleanisDenormalized()protected voidselectExecutionPlan()Analyze query and select a plan: 1.- All fields indexed, execute all query on index layer 2.- Mixed fields indexed and not, execute indexed operators and re-map query to databaseprotected QuerytransformQueryToIdsOnly()Convert query to retrieve only id field, no other fieldsprotected FilterunrollFilter(Filter filter)static PropertyNameunrollIndex(PropertyName expression, FeatureTypeMapping mapping)protected QueryunrollIndexes(Query query)protected SortBy[]unrollSortBy(SortBy[] sortArray)-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface FeatureIterator
close, hasNext, next
-
Methods inherited from interface Iterator
forEachRemaining, hasNext, next, remove
-
-
-
-
Field Detail
-
ff
protected FilterFactory ff
-
store
protected final AppSchemaDataAccess store
-
mapping
protected final FeatureTypeMapping mapping
-
query
protected final Query query
-
unrolledFilter
protected final Filter unrolledFilter
-
transaction
protected final Transaction transaction
-
indexIterator
protected IndexIdIterator indexIterator
-
sourceIterator
protected FeatureIterator<? extends Feature> sourceIterator
-
indexModeProc
protected IndexQueryManager indexModeProc
-
queryMode
protected IndexQueryManager.QueryIndexCoverage queryMode
-
-
Constructor Detail
-
IndexedMappingFeatureIterator
public IndexedMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query, Filter unrolledFilter, Transaction transaction, IndexQueryManager indexModeProcessor)
-
-
Method Detail
-
selectExecutionPlan
protected void selectExecutionPlan()
Analyze query and select a plan: 1.- All fields indexed, execute all query on index layer 2.- Mixed fields indexed and not, execute indexed operators and re-map query to database
-
unrollIndex
public static PropertyName unrollIndex(PropertyName expression, FeatureTypeMapping mapping)
-
getFidStepList
public XPathUtil.StepList getFidStepList()
-
getFidAttrMap
public AttributeMapping getFidAttrMap()
-
getFidIndexName
public String getFidIndexName()
-
isDenormalized
protected boolean isDenormalized()
-
getIndexIterator
protected IndexIdIterator getIndexIterator()
-
initializeIndexIterator
protected void initializeIndexIterator() throws IOExceptionInitialize the index FeatureCollection and iterator- Throws:
IOException
-
transformQueryToIdsOnly
protected Query transformQueryToIdsOnly()
Convert query to retrieve only id field, no other fields- Returns:
- converted Query
-
getIndexQueryProperties
protected List<PropertyName> getIndexQueryProperties()
-
getNextSourceIdList
protected List<String> getNextSourceIdList()
Extracts next id list from index iterator- Returns:
- list of id string
-
getIndexedAttribute
protected static AttributeMapping getIndexedAttribute(FeatureTypeMapping mapping, String xpath)
Search for indexed attribute, including on Nested Features- Returns:
- indexed attribute xpath, or null if not found
-
-