org.geotools.gce.imagemosaic.catalog
Class GranuleCatalogSource

Object
  extended by GranuleCatalogSource
All Implemented Interfaces:
GranuleSource
Direct Known Subclasses:
GranuleCatalogStore

public class GranuleCatalogSource
extends Object
implements GranuleSource

A GranuleSource implementation wrapping a GranuleCatalog.

Author:
Daniele Romagnoli, GeoSolutions SAS, Simone Giannecchini, GeoSolutions SAS

Field Summary
protected  GranuleCatalog catalog
          The underlying GranuleCatalog
protected  Hints hints
           
protected  String typeName
           
 
Constructor Summary
GranuleCatalogSource(GranuleCatalog catalog, String typeName, Hints hints)
           
 
Method Summary
 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 given Query.
 int getCount(Query q)
          Gets the number of the granules that would be returned by the given Query, taking into account any settings for max features and start index set on the Query.
 SimpleFeatureCollection getGranules(Query q)
          Retrieves granules, in the form of a SimpleFeatureCollection, based on a Query.
 SimpleFeatureType getSchema()
          Retrieves the schema (feature type) that will apply to granules retrieved from this GranuleSource.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

catalog

protected GranuleCatalog catalog
The underlying GranuleCatalog


typeName

protected String typeName

hints

protected Hints hints
Constructor Detail

GranuleCatalogSource

public GranuleCatalogSource(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 a SimpleFeatureCollection, based on a Query.

Specified by:
getGranules in interface GranuleSource
Parameters:
q - the Query 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 given Query, taking into account any settings for max features and start index set on the Query.

Specified by:
getCount in interface GranuleSource
Parameters:
q - the Query 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 given Query.

Specified by:
getBounds in interface GranuleSource
Parameters:
q - the Query 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 this GranuleSource.

Specified by:
getSchema in interface GranuleSource
Returns:
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 interface GranuleSource
Throws:
IOException


Copyright © 1996-2014 Geotools. All Rights Reserved.