Class RepositoryDataStoreCatalog
- Object
-
- GranuleCatalog
-
- RepositoryDataStoreCatalog
-
public class RepositoryDataStoreCatalog extends GranuleCatalog
A catalog fetching the backing GeoTools data store from aRepositoryon demand- Author:
- Andrea Aime - GeoSolutions
-
-
Field Summary
Fields Modifier and Type Field Description protected Propertiesparamsprotected StringparentLocationprotected static BooleanTRACE_ENABLEDWhen 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 RepositoryDataStoreCatalog(Properties params, CatalogConfigurationBeans configurations, boolean create, Repository repository, String dataStoreName, DataStoreFactorySpi spi, Hints hints)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGranules(String typeName, Collection<SimpleFeature> granules, Transaction transaction)voidcomputeAggregateFunction(Query query, FeatureCalc function)voidcreateType(String identification, String typeSpec)voidcreateType(String namespace, String typeName, String typeSpec)voidcreateType(SimpleFeatureType featureType)voiddispose()protected voiddisposeTileIndexStore()Allows subclasses to dispose the tile index storevoiddrop()Drop the underlying catalog, all the individual granule indexes.protected voidfinalize()BoundingBoxgetBounds(String typeName)BoundingBoxgetBounds(String typeName, Transaction t)protected CatalogConfigurationBeansgetConfigurations()voidgetGranuleDescriptors(Query query, GranuleCatalogVisitor visitor)SimpleFeatureCollectiongetGranules(Query q)SimpleFeatureCollectiongetGranules(Query q, Transaction t)intgetGranulesCount(Query q)protected StringgetParentLocation()QueryCapabilitiesgetQueryCapabilities(String typeName)protected DataStoregetTileIndexStore()Returns the tile index storeSimpleFeatureTypegetType(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 voidhandleInitializationException(Throwable t)Called in case the initialization of the class failed, allows subclasses to clean upprotected voidinitializeTypeNames(Properties params)protected voidinitTileIndexStore(Properties params, boolean create, DataStoreFactorySpi spi)Allows initialization of the tile index store before scanning type names.intremoveGranules(Query query)intremoveGranules(Query query, Transaction transaction)voidremoveType(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
-
RepositoryDataStoreCatalog
public RepositoryDataStoreCatalog(Properties params, CatalogConfigurationBeans configurations, boolean create, Repository repository, String dataStoreName, DataStoreFactorySpi spi, Hints hints)
-
-
Method Detail
-
handleInitializationException
protected void handleInitializationException(Throwable t)
Called in case the initialization of the class failed, allows subclasses to clean up
-
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:
IOExceptionMalformedURLException
-
disposeTileIndexStore
protected void disposeTileIndexStore()
Allows subclasses to dispose the tile index store
-
getTileIndexStore
protected DataStore getTileIndexStore()
Returns 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:
disposein classGranuleCatalog
-
removeGranules
public int removeGranules(Query query)
- Specified by:
removeGranulesin classGranuleCatalog
-
removeGranules
public int removeGranules(Query query, Transaction transaction)
- Overrides:
removeGranulesin classGranuleCatalog
-
addGranules
public void addGranules(String typeName, Collection<SimpleFeature> granules, Transaction transaction) throws IOException
- Specified by:
addGranulesin classGranuleCatalog- Throws:
IOException
-
getGranuleDescriptors
public void getGranuleDescriptors(Query query, GranuleCatalogVisitor visitor) throws IOException
- Specified by:
getGranuleDescriptorsin classGranuleCatalog- Throws:
IOException
-
getGranules
public SimpleFeatureCollection getGranules(Query q) throws IOException
- Specified by:
getGranulesin classGranuleCatalog- Throws:
IOException
-
getGranules
public SimpleFeatureCollection getGranules(Query q, Transaction t) throws IOException
- Overrides:
getGranulesin classGranuleCatalog- Throws:
IOException
-
getBounds
public BoundingBox getBounds(String typeName)
- Specified by:
getBoundsin classGranuleCatalog
-
getBounds
public BoundingBox getBounds(String typeName, Transaction t)
- Overrides:
getBoundsin classGranuleCatalog
-
createType
public void createType(String namespace, String typeName, String typeSpec) throws IOException, SchemaException
- Specified by:
createTypein classGranuleCatalog- Throws:
IOExceptionSchemaException
-
getTypeNames
public String[] getTypeNames()
- Specified by:
getTypeNamesin classGranuleCatalog
-
createType
public void createType(SimpleFeatureType featureType) throws IOException
- Specified by:
createTypein classGranuleCatalog- Throws:
IOException
-
removeType
public void removeType(String typeName) throws IOException
- Specified by:
removeTypein classGranuleCatalog- Throws:
IOException
-
createType
public void createType(String identification, String typeSpec) throws SchemaException, IOException
- Specified by:
createTypein classGranuleCatalog- Throws:
SchemaExceptionIOException
-
getType
public SimpleFeatureType getType(String typeName) throws IOException
- Specified by:
getTypein classGranuleCatalog- Throws:
IOException
-
computeAggregateFunction
public void computeAggregateFunction(Query query, FeatureCalc function) throws IOException
- Specified by:
computeAggregateFunctionin classGranuleCatalog- Throws:
IOException
-
getQueryCapabilities
public QueryCapabilities getQueryCapabilities(String typeName)
- Specified by:
getQueryCapabilitiesin classGranuleCatalog
-
finalize
protected void finalize() throws Throwable
-
getGranulesCount
public int getGranulesCount(Query q) throws IOException
- Specified by:
getGranulesCountin classGranuleCatalog- Throws:
IOException
-
drop
public void drop() throws IOExceptionDescription copied from class:GranuleCatalogDrop the underlying catalog, all the individual granule indexes.This is usuallu done when deleting an ImageMosaic storre.
- Specified by:
dropin classGranuleCatalog- Throws:
IOException- in case something bad happens
-
getConfigurations
protected CatalogConfigurationBeans getConfigurations()
- Overrides:
getConfigurationsin classGranuleCatalog
-
getParentLocation
protected String getParentLocation()
- Specified by:
getParentLocationin classGranuleCatalog
-
-