Class 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.
    Version:
    $Id: $
    Author:
    Simone Giannecchini, GeoSolutions
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean create​(java.lang.String workspace, java.lang.String coverageStore, java.lang.String path)
      Create a new ImageMosaic with the provided configuration provided as a zip file.
      boolean create​(java.lang.String workspace, java.lang.String coverageStore, java.lang.String path, GeoServerRESTStructuredGridCoverageReaderManager.ConfigureCoveragesOption configureOpt)
      Create a new ImageMosaic with the provided configuration provided as a zip file.
      RESTStructuredCoverageGranulesList getGranuleById​(java.lang.String workspace, java.lang.String coverageStore, java.lang.String coverage, java.lang.String id)
      Get information about a granule for a structured coverage.
      RESTStructuredCoverageIndexSchema getGranuleIndexSchema​(java.lang.String workspace, java.lang.String coverageStore, java.lang.String coverage)
      Get information about the schema of the index for a structured coverage.
      RESTStructuredCoverageGranulesList getGranules​(java.lang.String workspace, java.lang.String coverageStore, java.lang.String coverage)
      Get information about all the granules for a coverage with optional filter and paging.
      RESTStructuredCoverageGranulesList getGranules​(java.lang.String workspace, java.lang.String coverageStore, java.lang.String coverage, java.lang.String filter, java.lang.Integer offset, java.lang.Integer limit)
      Get information about the granules for a coverage with optional filter and paging.
      boolean harvestExternal​(java.lang.String workspace, java.lang.String coverageStore, java.lang.String format, java.lang.String path)
      Create a store or harvest the coverage from the provided external path.
      boolean removeGranuleById​(java.lang.String workspace, java.lang.String coverageStore, java.lang.String coverage, java.lang.String granuleId)
      Remove a granule from a structured coverage by id.
      boolean removeGranulesByCQL​(java.lang.String workspace, java.lang.String coverageStore, java.lang.String coverage, java.lang.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​(java.net.URL restURL,
                                                                java.lang.String username,
                                                                java.lang.String password)
                                                         throws java.lang.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:
        java.lang.IllegalArgumentException - if any.
    • Method Detail

      • create

        public boolean create​(java.lang.String workspace,
                              java.lang.String coverageStore,
                              java.lang.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
        path - 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​(java.lang.String workspace,
                              java.lang.String coverageStore,
                              java.lang.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
        path - 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​(java.lang.String workspace,
                                       java.lang.String coverageStore,
                                       java.lang.String format,
                                       java.lang.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
        path - 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​(java.lang.String workspace,
                                           java.lang.String coverageStore,
                                           java.lang.String coverage,
                                           java.lang.String filter)
                                    throws java.io.UnsupportedEncodingException
        Remove granules from a structured coverage, by providing a CQL filter.
        Parameters:
        workspace - the GeoServer workspace
        coverageStore - the GeoServer coverageStore
        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:
        java.io.UnsupportedEncodingException - if any.
        Since:
        geoserver-2.4.0, geoserver-mng-1.6.0
      • removeGranuleById

        public boolean removeGranuleById​(java.lang.String workspace,
                                         java.lang.String coverageStore,
                                         java.lang.String coverage,
                                         java.lang.String granuleId)
        Remove a granule from a structured coverage by id.
        Parameters:
        workspace - the GeoServer workspace
        coverageStore - the GeoServer coverageStore
        coverageStore - the GeoServer coverageStore
        coverage - the name of the target coverage from which we are going to remove
        granuleId - a String object.
        Returns:
        null in case the call does not succeed, or an instance of RESTStructuredCoverageGranulesList.
        Since:
        geoserver-2.4.0, geoserver-mng-1.6.0
      • getGranuleIndexSchema

        public RESTStructuredCoverageIndexSchema getGranuleIndexSchema​(java.lang.String workspace,
                                                                       java.lang.String coverageStore,
                                                                       java.lang.String coverage)
        Get information about the schema of the index for a structured coverage.
        Parameters:
        workspace - the GeoServer workspace
        coverageStore - the GeoServer coverageStore
        coverageStore - the GeoServer coverageStore
        coverage - the format of the file to upload
        Returns:
        null in case the call does not succeed, or an instance of RESTStructuredCoverageGranulesList.
        Since:
        geoserver-2.4.0, geoserver-mng-1.6.0
      • getGranules

        public RESTStructuredCoverageGranulesList getGranules​(java.lang.String workspace,
                                                              java.lang.String coverageStore,
                                                              java.lang.String coverage)
                                                       throws java.io.UnsupportedEncodingException
        Get information about all the granules for a coverage with optional filter and paging.
        Parameters:
        workspace - the GeoServer workspace
        coverageStore - the GeoServer coverageStore
        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:
        java.io.UnsupportedEncodingException - if any.
        Since:
        geoserver-2.4.0, geoserver-mng-1.6.0
      • getGranules

        public RESTStructuredCoverageGranulesList getGranules​(java.lang.String workspace,
                                                              java.lang.String coverageStore,
                                                              java.lang.String coverage,
                                                              java.lang.String filter,
                                                              java.lang.Integer offset,
                                                              java.lang.Integer limit)
                                                       throws java.io.UnsupportedEncodingException
        Get information about the granules for a coverage with optional filter and paging.
        Parameters:
        workspace - the GeoServer workspace
        coverageStore - the GeoServer coverageStore
        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:
        java.io.UnsupportedEncodingException - if any.
        Since:
        geoserver-2.4.0, geoserver-mng-1.6.0
      • getGranuleById

        public RESTStructuredCoverageGranulesList getGranuleById​(java.lang.String workspace,
                                                                 java.lang.String coverageStore,
                                                                 java.lang.String coverage,
                                                                 java.lang.String id)
        Get information about a granule for a structured coverage.
        Parameters:
        workspace - the GeoServer workspace
        coverageStore - the GeoServer coverageStore
        id - the ID of the granule to get information for
        coverage - a String object.
        Returns:
        null in case the call does not succeed, or an instance of RESTStructuredCoverageGranulesList.
        Since:
        geoserver-2.4.0, geoserver-mng-1.6.0