Class GranuleCatalogSource
- Object
-
- GranuleCatalogSource
-
- All Implemented Interfaces:
GranuleSource
- Direct Known Subclasses:
GranuleCatalogStore
public class GranuleCatalogSource extends Object implements GranuleSource
AGranuleSource
implementation wrapping aGranuleCatalog
.- Author:
- Daniele Romagnoli, GeoSolutions SAS, Simone Giannecchini, GeoSolutions SAS
-
-
Field Summary
Fields Modifier and Type Field Description protected GranuleCatalog
catalog
The underlyingGranuleCatalog
protected Hints
hints
protected RasterManager
manager
protected String
typeName
-
Fields inherited from interface GranuleSource
FILE_VIEW, FILES, NATIVE_BOUNDS, NATIVE_BOUNDS_KEY
-
-
Constructor Summary
Constructors Constructor Description GranuleCatalogSource(RasterManager manager, GranuleCatalog catalog, String typeName, Hints hints)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
This will free/release any resource (cached granules, ...).ReferencedEnvelope
getBounds(Query q)
Get the spatial bounds of the granules that would be returned by the givenQuery
.int
getCount(Query q)
Gets the number of the granules that would be returned by the givenQuery
, taking into account any settings for max features and start index set on theQuery
.SimpleFeatureCollection
getGranules(Query q)
Retrieves granules, in the form of aSimpleFeatureCollection
, based on aQuery
.SimpleFeatureType
getSchema()
Retrieves the schema (feature type) that will apply to granules retrieved from thisGranuleSource
.Set<RenderingHints.Key>
getSupportedHints()
Returns the set of hints that thisGranuleSource
supports viaQuery
requests.
-
-
-
Field Detail
-
catalog
protected GranuleCatalog catalog
The underlyingGranuleCatalog
-
typeName
protected String typeName
-
hints
protected Hints hints
-
manager
protected RasterManager manager
-
-
Constructor Detail
-
GranuleCatalogSource
public GranuleCatalogSource(RasterManager manager, GranuleCatalog catalog, String typeName, Hints hints)
-
-
Method Detail
-
getGranules
public SimpleFeatureCollection getGranules(Query q) throws IOException
Description copied from interface:GranuleSource
Retrieves granules, in the form of aSimpleFeatureCollection
, based on aQuery
.- Specified by:
getGranules
in interfaceGranuleSource
- Parameters:
q
- theQuery
to select granules- Returns:
- the resulting granules.
- Throws:
IOException
-
getCount
public int getCount(Query q) throws IOException
Description copied from interface:GranuleSource
Gets the number of the granules that would be returned by the givenQuery
, taking into account any settings for max features and start index set on theQuery
.- Specified by:
getCount
in interfaceGranuleSource
- Parameters:
q
- theQuery
to select granules- Returns:
- the number of granules
- Throws:
IOException
-
getBounds
public ReferencedEnvelope getBounds(Query q) throws IOException
Description copied from interface:GranuleSource
Get the spatial bounds of the granules that would be returned by the givenQuery
.- Specified by:
getBounds
in interfaceGranuleSource
- Parameters:
q
- theQuery
to select granules- Returns:
- The bounding envelope of the requested data
- Throws:
IOException
-
getSchema
public SimpleFeatureType getSchema() throws IOException
Description copied from interface:GranuleSource
Retrieves the schema (feature type) that will apply to granules retrieved from thisGranuleSource
.- Specified by:
getSchema
in interfaceGranuleSource
- Throws:
IOException
-
dispose
public void dispose() throws IOException
Description copied from interface:GranuleSource
This will free/release any resource (cached granules, ...).- Specified by:
dispose
in interfaceGranuleSource
- Throws:
IOException
-
getSupportedHints
public Set<RenderingHints.Key> getSupportedHints()
Description copied from interface:GranuleSource
Returns the set of hints that thisGranuleSource
supports viaQuery
requests.Note: the existence of a specific hint does not guarantee that it will always be honored by the implementing class.
- Specified by:
getSupportedHints
in interfaceGranuleSource
- Returns:
- a set of
RenderingHints#Key
objects; may be empty but nevernull
- See Also:
Hints#SGCR_FILE_VIEW
-
-