Package org.geotools.coverage.grid.io
Class RenamingGranuleSource
- Object
-
- RenamingGranuleSource
-
- All Implemented Interfaces:
GranuleSource
- Direct Known Subclasses:
RenamingGranuleStore
public class RenamingGranuleSource extends Object implements GranuleSource
GranuleSourcewrapper exposing a different type name
-
-
Field Summary
Fields Modifier and Type Field Description protected GranuleSourcedelegateprotected Stringnameprotected SimpleFeatureTypeschema-
Fields inherited from interface GranuleSource
FILE_VIEW, FILES, NATIVE_BOUNDS, NATIVE_BOUNDS_KEY
-
-
Constructor Summary
Constructors Constructor Description RenamingGranuleSource(String name, GranuleSource delegate)Builds aRenamingGranuleSource
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()This will free/release any resource (cached granules, ...).ReferencedEnvelopegetBounds(Query q)Get the spatial bounds of the granules that would be returned by the givenQuery.intgetCount(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.SimpleFeatureCollectiongetGranules(Query q)Retrieves granules, in the form of aSimpleFeatureCollection, based on aQuery.SimpleFeatureTypegetSchema()Retrieves the schema (feature type) that will apply to granules retrieved from thisGranuleSource.protected QueryrenameQuery(Query q)-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface GranuleSource
getSupportedHints
-
-
-
-
Field Detail
-
name
protected final String name
-
delegate
protected final GranuleSource delegate
-
schema
protected final SimpleFeatureType schema
-
-
Constructor Detail
-
RenamingGranuleSource
public RenamingGranuleSource(String name, GranuleSource delegate)
Builds aRenamingGranuleSource- Parameters:
name- The new type namedelegate- The delegate to be wrapped
-
-
Method Detail
-
getGranules
public SimpleFeatureCollection getGranules(Query q) throws IOException
Description copied from interface:GranuleSourceRetrieves granules, in the form of aSimpleFeatureCollection, based on aQuery.- Specified by:
getGranulesin interfaceGranuleSource- Parameters:
q- theQueryto select granules- Returns:
- the resulting granules.
- Throws:
IOException
-
getCount
public int getCount(Query q) throws IOException
Description copied from interface:GranuleSourceGets 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:
getCountin interfaceGranuleSource- Parameters:
q- theQueryto select granules- Returns:
- the number of granules
- Throws:
IOException
-
getBounds
public ReferencedEnvelope getBounds(Query q) throws IOException
Description copied from interface:GranuleSourceGet the spatial bounds of the granules that would be returned by the givenQuery.- Specified by:
getBoundsin interfaceGranuleSource- Parameters:
q- theQueryto select granules- Returns:
- The bounding envelope of the requested data
- Throws:
IOException
-
getSchema
public SimpleFeatureType getSchema() throws IOException
Description copied from interface:GranuleSourceRetrieves the schema (feature type) that will apply to granules retrieved from thisGranuleSource.- Specified by:
getSchemain interfaceGranuleSource- Throws:
IOException
-
dispose
public void dispose() throws IOExceptionDescription copied from interface:GranuleSourceThis will free/release any resource (cached granules, ...).- Specified by:
disposein interfaceGranuleSource- Throws:
IOException
-
-