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
FieldsModifier and TypeFieldDescriptionprotected FilterFactory
protected IndexIdIterator
protected IndexQueryManager
protected final FeatureTypeMapping
protected final Query
protected IndexQueryManager.QueryIndexCoverage
protected FeatureIterator<? extends Feature>
protected final AppSchemaDataAccess
protected final Transaction
protected final Filter
-
Constructor Summary
ConstructorsConstructorDescriptionIndexedMappingFeatureIterator
(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query, Filter unrolledFilter, Transaction transaction, IndexQueryManager indexModeProcessor) -
Method Summary
Modifier and TypeMethodDescriptionprotected static AttributeMapping
getIndexedAttribute
(FeatureTypeMapping mapping, String xpath) Search for indexed attribute, including on Nested Featuresprotected IndexIdIterator
protected List<PropertyName>
Extracts next id list from index iteratorprotected void
Initialize the index FeatureCollection and iteratorprotected boolean
protected void
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
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 Details
-
ff
-
store
-
mapping
-
query
-
unrolledFilter
-
transaction
-
indexIterator
-
sourceIterator
-
indexModeProc
-
queryMode
-
-
Constructor Details
-
IndexedMappingFeatureIterator
public IndexedMappingFeatureIterator(AppSchemaDataAccess store, FeatureTypeMapping mapping, Query query, Filter unrolledFilter, Transaction transaction, IndexQueryManager indexModeProcessor)
-
-
Method Details
-
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 -
unrollIndexes
-
unrollSortBy
-
unrollIndex
-
unrollFilter
-
getFidStepList
-
getFidAttrMap
-
getFidIndexName
-
isDenormalized
protected boolean isDenormalized() -
getIndexIterator
-
initializeIndexIterator
Initialize the index FeatureCollection and iterator- Throws:
IOException
-
transformQueryToIdsOnly
Convert query to retrieve only id field, no other fields- Returns:
- converted Query
-
getIndexQueryProperties
-
getNextSourceIdList
Extracts next id list from index iterator- Returns:
- list of id string
-
getIndexedAttribute
Search for indexed attribute, including on Nested Features- Returns:
- indexed attribute xpath, or null if not found
-