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 FilterFactory
ff
protected IndexIdIterator
indexIterator
protected IndexQueryManager
indexModeProc
protected FeatureTypeMapping
mapping
protected Query
query
protected IndexQueryManager.QueryIndexCoverage
queryMode
protected FeatureIterator<? extends Feature>
sourceIterator
protected AppSchemaDataAccess
store
protected Transaction
transaction
protected Filter
unrolledFilter
-
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 AttributeMapping
getFidAttrMap()
String
getFidIndexName()
XPathUtil.StepList
getFidStepList()
protected static AttributeMapping
getIndexedAttribute(FeatureTypeMapping mapping, String xpath)
Search for indexed attribute, including on Nested Featuresprotected IndexIdIterator
getIndexIterator()
protected List<PropertyName>
getIndexQueryProperties()
protected List<String>
getNextSourceIdList()
Extracts next id list from index iteratorprotected void
initializeIndexIterator()
Initialize the index FeatureCollection and iteratorprotected boolean
isDenormalized()
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 databaseprotected Query
transformQueryToIdsOnly()
Convert query to retrieve only id field, no other fieldsprotected Filter
unrollFilter(Filter filter)
static PropertyName
unrollIndex(PropertyName expression, FeatureTypeMapping mapping)
protected Query
unrollIndexes(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 IOException
Initialize 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
-
-