it.geosolutions.geoserver.rest.manager
Class GeoServerRESTStructuredGridCoverageReaderManager

java.lang.Object
  extended by it.geosolutions.geoserver.rest.manager.GeoServerRESTAbstractManager
      extended by it.geosolutions.geoserver.rest.manager.GeoServerRESTStructuredGridCoverageReaderManager

public class GeoServerRESTStructuredGridCoverageReaderManager
extends GeoServerRESTAbstractManager

Manage GeoTools StructuredGridCoverageReader. It allows to create a store from a file or harvest the coverages contained in a file, to delete granules from an existing coverage and eventually to get information about the granules inside a StructuredGridCoverageReader.

Author:
Simone Giannecchini, GeoSolutions

Nested Class Summary
static class GeoServerRESTStructuredGridCoverageReaderManager.ConfigureCoveragesOption
          Option that tells GeoServer whether or not to configure all the coverages for a certain ImageMosaic.
 
Field Summary
 
Fields inherited from class it.geosolutions.geoserver.rest.manager.GeoServerRESTAbstractManager
gsBaseUrl, gspass, gsuser
 
Constructor Summary
GeoServerRESTStructuredGridCoverageReaderManager(URL restURL, String username, String password)
          Default constructor.
 
Method Summary
 boolean create(String workspace, String coverageStore, String path)
          Create a new ImageMosaic with the provided configuration provided as a zip file.
 boolean create(String workspace, String coverageStore, String path, GeoServerRESTStructuredGridCoverageReaderManager.ConfigureCoveragesOption configureOpt)
          Create a new ImageMosaic with the provided configuration provided as a zip file.
 RESTStructuredCoverageGranulesList getGranuleById(String workspace, String coverageStore, String coverage, String id)
          Get information about a granule for a structured coverage.
 RESTStructuredCoverageIndexSchema getGranuleIndexSchema(String workspace, String coverageStore, String coverage)
          Get information about the schema of the index for a structured coverage.
 RESTStructuredCoverageGranulesList getGranules(String workspace, String coverageStore, String coverage)
          Get information about all the granules for a coverage with optional filter and paging.
 RESTStructuredCoverageGranulesList getGranules(String workspace, String coverageStore, String coverage, String filter, Integer offset, Integer limit)
          Get information about the granules for a coverage with optional filter and paging.
 boolean harvestExternal(String workspace, String coverageStore, String format, String path)
          Create a store or harvest the coverage from the provided external path.
 boolean removeGranuleById(String workspace, String coverageStore, String coverage, String granuleId)
          Remove a granule from a structured coverage by id.
 boolean removeGranulesByCQL(String workspace, String coverageStore, String coverage, String filter)
          Remove granules from a structured coverage, by providing a CQL filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoServerRESTStructuredGridCoverageReaderManager

public GeoServerRESTStructuredGridCoverageReaderManager(URL restURL,
                                                        String username,
                                                        String password)
                                                 throws IllegalArgumentException
Default constructor.

Parameters:
restURL - GeoServer REST API endpoint
username - GeoServer REST API authorized username
password - GeoServer REST API password for the former username
Throws:
IllegalArgumentException
Method Detail

create

public boolean create(String workspace,
                      String coverageStore,
                      String path)
Create a new ImageMosaic with the provided configuration provided as a zip file.

This call configures all the coverages contained in the ImageMosaic.

Parameters:
workspace - the GeoServer workspace
coverageStore - the GeoServer coverageStore
the - absolute path to the file to upload
Returns:
true if the call succeeds or false otherwise.
Since:
geoserver-2.4.0, geoserver-mng-1.6.0

create

public boolean create(String workspace,
                      String coverageStore,
                      String path,
                      GeoServerRESTStructuredGridCoverageReaderManager.ConfigureCoveragesOption configureOpt)
Create a new ImageMosaic with the provided configuration provided as a zip file.

With the options configure we can decide whether or not to configure or not the coverages contained in the ImageMosaic.

Parameters:
workspace - the GeoServer workspace
coverageStore - the GeoServer coverageStore
the - absolute path to the file to upload
configureOpt - tells GeoServer whether to configure all coverages in this mosaic (ALL) or none of them (NONE).
Returns:
true if the call succeeds or false otherwise.
Since:
geoserver-2.4.0, geoserver-mng-1.6.0

harvestExternal

public boolean harvestExternal(String workspace,
                               String coverageStore,
                               String format,
                               String path)
Create a store or harvest the coverage from the provided external path.

Parameters:
workspace - the GeoServer workspace
coverageStore - the GeoServer coverageStore
format - the format of the file to upload
the - absolute path to the file to upload
Returns:
true if the call succeeds or false otherwise.
Since:
geoserver-2.4.0, geoserver-mng-1.6.0

removeGranulesByCQL

public boolean removeGranulesByCQL(String workspace,
                                   String coverageStore,
                                   String coverage,
                                   String filter)
                            throws UnsupportedEncodingException
Remove granules from a structured coverage, by providing a CQL filter.

Parameters:
workspace - the GeoServer workspace
coverageStore - the GeoServer coverageStore
coverage - the name of the target coverage from which we are going to remove
filter - the absolute path to the file to upload
Returns:
null in case the call does not succeed, or an instance of RESTStructuredCoverageGranulesList.
Throws:
MalformedURLException
UnsupportedEncodingException
Since:
geoserver-2.4.0, geoserver-mng-1.6.0

removeGranuleById

public boolean removeGranuleById(String workspace,
                                 String coverageStore,
                                 String coverage,
                                 String granuleId)
Remove a granule from a structured coverage by id.

Parameters:
workspace - the GeoServer workspace
coverageStore - the GeoServer coverageStore
coverage - the name of the target coverage from which we are going to remove
filter - the absolute path to the file to upload
Returns:
null in case the call does not succeed, or an instance of RESTStructuredCoverageGranulesList.
Throws:
MalformedURLException
UnsupportedEncodingException
Since:
geoserver-2.4.0, geoserver-mng-1.6.0

getGranuleIndexSchema

public RESTStructuredCoverageIndexSchema getGranuleIndexSchema(String workspace,
                                                               String coverageStore,
                                                               String coverage)
                                                        throws MalformedURLException
Get information about the schema of the index for a structured coverage.

Parameters:
workspace - the GeoServer workspace
coverageStore - the GeoServer coverageStore
format - the format of the file to upload
Returns:
null in case the call does not succeed, or an instance of RESTStructuredCoverageGranulesList.
Throws:
MalformedURLException
UnsupportedEncodingException
Since:
geoserver-2.4.0, geoserver-mng-1.6.0

getGranules

public RESTStructuredCoverageGranulesList getGranules(String workspace,
                                                      String coverageStore,
                                                      String coverage)
                                               throws MalformedURLException,
                                                      UnsupportedEncodingException
Get information about all the granules for a coverage with optional filter and paging.

Parameters:
workspace - the GeoServer workspace
coverageStore - the GeoServer coverageStore
coverage - the name of the target coverage
Returns:
null in case the call does not succeed, or an instance of RESTStructuredCoverageGranulesList.
Throws:
MalformedURLException
UnsupportedEncodingException
Since:
geoserver-2.4.0, geoserver-mng-1.6.0

getGranules

public RESTStructuredCoverageGranulesList getGranules(String workspace,
                                                      String coverageStore,
                                                      String coverage,
                                                      String filter,
                                                      Integer offset,
                                                      Integer limit)
                                               throws MalformedURLException,
                                                      UnsupportedEncodingException
Get information about the granules for a coverage with optional filter and paging.

Parameters:
workspace - the GeoServer workspace
coverageStore - the GeoServer coverageStore
coverage - the name of the target coverage
filter - the format of the file to upload, can be null to include all the granules
offset - the start page, can be null or an integer
limit - the dimension of the page, can be null or a positive integer
Returns:
null in case the call does not succeed, or an instance of RESTStructuredCoverageGranulesList.
Throws:
MalformedURLException
UnsupportedEncodingException
Since:
geoserver-2.4.0, geoserver-mng-1.6.0

getGranuleById

public RESTStructuredCoverageGranulesList getGranuleById(String workspace,
                                                         String coverageStore,
                                                         String coverage,
                                                         String id)
                                                  throws MalformedURLException,
                                                         UnsupportedEncodingException
Get information about a granule for a structured coverage.

Parameters:
workspace - the GeoServer workspace
coverageStore - the GeoServer coverageStore
format - the format of the file to upload
the - absolute path to the file to upload
id - the ID of the granule to get information for
Returns:
null in case the call does not succeed, or an instance of RESTStructuredCoverageGranulesList.
Throws:
MalformedURLException
UnsupportedEncodingException
Since:
geoserver-2.4.0, geoserver-mng-1.6.0


Copyright © 2007-2014 GeoSolutions. All Rights Reserved.