Class STACDataStore

Object
ContentDataStore
STACDataStore
All Implemented Interfaces:
DataAccess<SimpleFeatureType,SimpleFeature>, DataStore

public class STACDataStore extends ContentDataStore
A DataStore implementation connecting to a STAC API, exposing collections as feature types, and items as features.
  • Constructor Details

    • STACDataStore

      public STACDataStore(STACClient client)
  • Method Details

    • getSearchMode

      public STACClient.SearchMode getSearchMode()
    • setSearchMode

      public void setSearchMode(STACClient.SearchMode searchMode)
    • getFetchSize

      public int getFetchSize()
    • setFetchSize

      public void setFetchSize(int fetchSize)
    • createTypeNames

      protected List<Name> createTypeNames() throws IOException
      Description copied from class: ContentDataStore
      Creates a set of qualified names corresponding to the types that the datastore provides.

      Namespaces may be left null for data stores which do not support namespace qualified type names.

      Specified by:
      createTypeNames in class ContentDataStore
      Returns:
      A list of Name.
      Throws:
      IOException - Any errors occuring connecting to data.
    • createFeatureSource

      protected ContentFeatureSource createFeatureSource(ContentEntry entry) throws IOException
      Description copied from class: ContentDataStore
      Instantiates new feature source for the entry.

      Subclasses should override this method to return a specific subclass of ContentFeatureSource.

      Specified by:
      createFeatureSource in class ContentDataStore
      Parameters:
      entry - The entry.
      Returns:
      An new instance of ContentFeatureSource for the entry.
      Throws:
      IOException
    • dispose

      public void dispose()
      Description copied from interface: DataAccess
      Disposes of this data store and releases any resource that it is using.

      A DataStore cannot be used after dispose has been called, neither can any data access object it helped create, such as FeatureReader, FeatureSource or FeatureCollection.

      This operation can be called more than once without side effects.

      There is no thread safety assurance associated with this method. For example, client code will have to make sure this method is not called while retrieving/saving data from/to the storage, or be prepared for the consequences.

      Specified by:
      dispose in interface DataAccess<SimpleFeatureType,SimpleFeature>
      Overrides:
      dispose in class ContentDataStore
    • setHardLimit

      public void setHardLimit(int hardLimit)
      Maximum number of STAC items a collection will ever provide (set to zero or negative not to have this limit).
      Parameters:
      hardLimit -
    • getHardLimit

      public int getHardLimit()
    • getFeatureTypeItems

      public int getFeatureTypeItems()
    • setFeatureTypeItems

      public void setFeatureTypeItems(int featureTypeItems)
    • getClient

      public STACClient getClient()
      Returns the STACClient used by the store