Class GTDataStoreGranuleCatalog
- Object
-
- GranuleCatalog
-
- GTDataStoreGranuleCatalog
-
public class GTDataStoreGranuleCatalog extends GranuleCatalog
-
-
Field Summary
Fields Modifier and Type Field Description protected Properties
params
protected String
parentLocation
protected static Boolean
TRACE_ENABLED
When true, the stack trace that created a store that wasn't closed is recorded and then printed out when warning the user about this.-
Fields inherited from class GranuleCatalog
configurations, hints, multiScaleROIProvider
-
-
Constructor Summary
Constructors Constructor Description GTDataStoreGranuleCatalog(Properties params, CatalogConfigurationBeans configurations, boolean create, DataStoreFactorySpi spi, Hints hints)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGranules(String typeName, Collection<SimpleFeature> granules, Transaction transaction)
void
computeAggregateFunction(Query query, FeatureCalc function)
void
createType(String identification, String typeSpec)
void
createType(String namespace, String typeName, String typeSpec)
void
createType(SimpleFeatureType featureType)
void
dispose()
protected void
disposeTileIndexStore()
Allows subclasses to dispose the tile index storevoid
drop()
Drop the underlying catalog, all the individual granule indexes.protected void
finalize()
BoundingBox
getBounds(String typeName)
BoundingBox
getBounds(String typeName, Transaction t)
protected CatalogConfigurationBeans
getConfigurations()
void
getGranuleDescriptors(Query query, GranuleCatalogVisitor visitor)
SimpleFeatureCollection
getGranules(Query q)
SimpleFeatureCollection
getGranules(Query q, Transaction t)
int
getGranulesCount(Query q)
protected String
getParentLocation()
QueryCapabilities
getQueryCapabilities(String typeName)
protected DataStore
getTileIndexStore()
Returns the tile index storeSimpleFeatureType
getType(String typeName)
String[]
getTypeNames()
protected Set<String>
getValidTypeNames()
Returns the set of valid type names (this is going to be a live collection, the code is allowed to modify it)protected void
handleInitializationException(Throwable t)
Called in case the initialization of the class failed, allows subclasses to clean upprotected void
initializeTypeNames(Properties params)
protected void
initTileIndexStore(Properties params, boolean create, DataStoreFactorySpi spi)
Allows initialization of the tile index store before scanning type names.int
removeGranules(Query query)
int
removeGranules(Query query, Transaction transaction)
void
removeType(String typeName)
-
Methods inherited from class GranuleCatalog
addGranule, getFootprintFiles, getGranuleFootprint, getHints, mergeHints, setMultiScaleROIProvider
-
-
-
-
Field Detail
-
TRACE_ENABLED
protected static final Boolean TRACE_ENABLED
When true, the stack trace that created a store that wasn't closed is recorded and then printed out when warning the user about this.
-
parentLocation
protected final String parentLocation
-
params
protected Properties params
-
-
Constructor Detail
-
GTDataStoreGranuleCatalog
public GTDataStoreGranuleCatalog(Properties params, CatalogConfigurationBeans configurations, boolean create, DataStoreFactorySpi spi, Hints hints)
-
-
Method Detail
-
initTileIndexStore
protected void initTileIndexStore(Properties params, boolean create, DataStoreFactorySpi spi) throws IOException, MalformedURLException
Allows initialization of the tile index store before scanning type names.- Throws:
IOException
MalformedURLException
-
handleInitializationException
protected void handleInitializationException(Throwable t)
Called in case the initialization of the class failed, allows subclasses to clean up
-
getTileIndexStore
protected DataStore getTileIndexStore()
Returns the tile index store
-
disposeTileIndexStore
protected void disposeTileIndexStore()
Allows subclasses to dispose the tile index store
-
getValidTypeNames
protected Set<String> getValidTypeNames()
Returns the set of valid type names (this is going to be a live collection, the code is allowed to modify it)
-
initializeTypeNames
protected void initializeTypeNames(Properties params) throws IOException
- Throws:
IOException
-
dispose
public void dispose()
- Specified by:
dispose
in classGranuleCatalog
-
removeGranules
public int removeGranules(Query query)
- Specified by:
removeGranules
in classGranuleCatalog
-
removeGranules
public int removeGranules(Query query, Transaction transaction)
- Overrides:
removeGranules
in classGranuleCatalog
-
addGranules
public void addGranules(String typeName, Collection<SimpleFeature> granules, Transaction transaction) throws IOException
- Specified by:
addGranules
in classGranuleCatalog
- Throws:
IOException
-
getGranuleDescriptors
public void getGranuleDescriptors(Query query, GranuleCatalogVisitor visitor) throws IOException
- Specified by:
getGranuleDescriptors
in classGranuleCatalog
- Throws:
IOException
-
getGranules
public SimpleFeatureCollection getGranules(Query q) throws IOException
- Specified by:
getGranules
in classGranuleCatalog
- Throws:
IOException
-
getGranules
public SimpleFeatureCollection getGranules(Query q, Transaction t) throws IOException
- Overrides:
getGranules
in classGranuleCatalog
- Throws:
IOException
-
getBounds
public BoundingBox getBounds(String typeName)
- Specified by:
getBounds
in classGranuleCatalog
-
getBounds
public BoundingBox getBounds(String typeName, Transaction t)
- Overrides:
getBounds
in classGranuleCatalog
-
createType
public void createType(String namespace, String typeName, String typeSpec) throws IOException, SchemaException
- Specified by:
createType
in classGranuleCatalog
- Throws:
IOException
SchemaException
-
getTypeNames
public String[] getTypeNames()
- Specified by:
getTypeNames
in classGranuleCatalog
-
createType
public void createType(SimpleFeatureType featureType) throws IOException
- Specified by:
createType
in classGranuleCatalog
- Throws:
IOException
-
removeType
public void removeType(String typeName) throws IOException
- Specified by:
removeType
in classGranuleCatalog
- Throws:
IOException
-
createType
public void createType(String identification, String typeSpec) throws SchemaException, IOException
- Specified by:
createType
in classGranuleCatalog
- Throws:
SchemaException
IOException
-
getType
public SimpleFeatureType getType(String typeName) throws IOException
- Specified by:
getType
in classGranuleCatalog
- Throws:
IOException
-
computeAggregateFunction
public void computeAggregateFunction(Query query, FeatureCalc function) throws IOException
- Specified by:
computeAggregateFunction
in classGranuleCatalog
- Throws:
IOException
-
getQueryCapabilities
public QueryCapabilities getQueryCapabilities(String typeName)
- Specified by:
getQueryCapabilities
in classGranuleCatalog
-
finalize
protected void finalize() throws Throwable
-
getGranulesCount
public int getGranulesCount(Query q) throws IOException
- Specified by:
getGranulesCount
in classGranuleCatalog
- Throws:
IOException
-
drop
public void drop() throws IOException
Description copied from class:GranuleCatalog
Drop the underlying catalog, all the individual granule indexes.This is usuallu done when deleting an ImageMosaic storre.
- Specified by:
drop
in classGranuleCatalog
- Throws:
IOException
- in case something bad happens
-
getConfigurations
protected CatalogConfigurationBeans getConfigurations()
- Overrides:
getConfigurations
in classGranuleCatalog
-
getParentLocation
protected String getParentLocation()
- Specified by:
getParentLocation
in classGranuleCatalog
-
-