Class GranuleCatalogStore

Object
GranuleCatalogSource
GranuleCatalogStore
All Implemented Interfaces:
GranuleSource, GranuleStore

public class GranuleCatalogStore extends GranuleCatalogSource implements GranuleStore
A GranuleStore implementation wrapping a GranuleCatalog.
Author:
Daniele Romagnoli, GeoSolutions SAS
  • Constructor Details

  • Method Details

    • addGranules

      public void addGranules(SimpleFeatureCollection granules)
      Description copied from interface: GranuleStore
      Add all the granules from the specified collection to this GranuleStore.
      Specified by:
      addGranules in interface GranuleStore
      Parameters:
      granules - the granules to add
    • removeGranules

      public int removeGranules(Filter filter)
      Description copied from interface: GranuleStore
      Removes granules selected by the given filter.
      Specified by:
      removeGranules in interface GranuleStore
      Parameters:
      filter - an OpenGIS filter
    • removeGranules

      public int removeGranules(Filter filter, Hints hints)
      Description copied from interface: GranuleStore
      Removes granules selected by the given filter, controlled by a set of hints (might be implementation dependent and eventually ignored).
      Specified by:
      removeGranules in interface GranuleStore
      Parameters:
      filter - an OpenGIS filter
      hints - a set of hints to control how the removal is performed
    • updateGranules

      public void updateGranules(String[] attributeNames, Object[] attributeValues, Filter filter)
      Description copied from interface: GranuleStore
      Modifies the attributes with the supplied values in all granules selected by the given filter.
      Specified by:
      updateGranules in interface GranuleStore
      Parameters:
      attributeNames - the attributes to modify
      attributeValues - the new values for the attributes
      filter - an OpenGIS filter
    • getTransaction

      public Transaction getTransaction()
      Description copied from interface: GranuleStore
      Gets the Transaction that this GranuleStore is currently operating against.
       
       Transaction t = GranuleStore.getTransaction();
       try {
           GranuleStore.addGranules (granules);
           t.commit();
       } catch( IOException erp ){
           // something went wrong;
           t.rollback();
       }
       
       
      Specified by:
      getTransaction in interface GranuleStore
      Returns:
      Transaction in use, or Transaction.AUTO_COMMIT
    • setTransaction

      public void setTransaction(Transaction transaction)
      Description copied from interface: GranuleStore
      Provide a transaction for commit/rollback control of a modifying operation on this GranuleStore.
       
       Transaction t = new DefaultTransaction();
       GranuleStore.setTransaction(t);
       try {
           GranuleStore.addGranules (granules);
           t.commit();
       } catch ( IOException ex ) {
           // something went wrong;
           t.rollback();
       } finally {
           t.close();
       }
       
       
      Specified by:
      setTransaction in interface GranuleStore
      Parameters:
      transaction - the transaction