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 classSTACClient.SearchModeUsed to indicate how to perform search queries.
-
Field Summary
Fields Modifier and Type Field Description static StringGEOJSON_MIMEstatic StringJSON_MIME
-
Constructor Summary
Constructors Constructor Description STACClient(URL landingPageURL, HTTPClient http)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()List<Collection>getCollections()Returns the collection description, if a "data" link is available in the home pageHTTPClientgetHttp()Returns the HTTP client used by the this STAC clientSTACLandingPagegetLandingPage()Returns the landing page of the STAC serviceSimpleFeatureCollectionsearch(SearchQuery search, STACClient.SearchMode mode)Retrieves data using the Search APISimpleFeatureCollectionsearch(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:
closein interfaceAutoCloseable- Specified by:
closein 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
-
-