Class STACClient

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class STACClient
    extends Object
    implements Closeable
    Minimal STAC API client supporting the needs of the STAC datastore. Not currently meant to be a generic STAC client.
    • Constructor Detail

      • STACClient

        public STACClient​(URL landingPageURL,
                          HTTPClient http)
                   throws IOException
        Throws:
        IOException
    • Method Detail

      • getLandingPage

        public STACLandingPage getLandingPage()
        Returns the landing page of the STAC service
        Returns:
      • close

        public void close()
                   throws IOException
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Throws:
        IOException
      • getCollections

        public List<Collection> getCollections()
                                        throws IOException
        Returns the collection description, if a "data" link is available in the home page
        Returns:
        Throws:
        IOException
      • search

        public SimpleFeatureCollection search​(SearchQuery search,
                                              STACClient.SearchMode mode,
                                              SimpleFeatureType schema)
                                       throws IOException
        Retrieves data using the Search API
        Parameters:
        search - The search request
        mode - The search mode
        schema - An optional base schema, can be used to ensure at least those properties are present
        Throws:
        IOException
      • getHttp

        public HTTPClient getHttp()
        Returns the HTTP client used by the this STAC client