Package org.geotools.stac.client
Class STACClient
- Object
-
- 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
STACClient.SearchMode
Used to indicate how to perform search queries.
-
Field Summary
Fields Modifier and Type Field Description static String
GEOJSON_MIME
static String
JSON_MIME
-
Constructor Summary
Constructors Constructor Description STACClient(URL landingPageURL, HTTPClient http)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
List<Collection>
getCollections()
Returns the collection description, if a "data" link is available in the home pageHTTPClient
getHttp()
Returns the HTTP client used by the this STAC clientSTACLandingPage
getLandingPage()
Returns the landing page of the STAC serviceSimpleFeatureCollection
search(SearchQuery search, STACClient.SearchMode mode)
Retrieves data using the Search APISimpleFeatureCollection
search(SearchQuery search, STACClient.SearchMode mode, SimpleFeatureType schema)
Retrieves data using the Search API
-
-
-
Field Detail
-
JSON_MIME
public static final String JSON_MIME
- See Also:
- Constant Field Values
-
GEOJSON_MIME
public static final String GEOJSON_MIME
- See Also:
- Constant Field Values
-
-
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 interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- 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) throws IOException
Retrieves data using the Search API- Parameters:
search
- The search requestmode
- The search mode- 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 requestmode
- The search modeschema
- 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
-
-