Skip to content

Commit 3813287

Browse files
authored
Merge pull request #10 from planetlabs/0.9.0
WIP Upgrade to 0.9.0-RC1
2 parents 8bfadfc + 706c58e commit 3813287

123 files changed

Lines changed: 1507 additions & 1093 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.idea/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Added
9+
- STAC spec v0.9.0-RC1 updates
810

9-
## [0.8.0.3] - 2019-10-30
11+
## [0.9.0.0] - 2019-10-30
1012
### Added
1113
- STAC spec v0.8.0 updates
1214
- Upgrade to Spring Boot 2.2.0

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Requires:
3737

3838
Example build command: `mvn clean install`
3939

40-
Additionally the docker image can be built from the [staccato-main](./staccato-main) package using the command:
40+
Additionally the docker image can be built from the [staccato-application](./staccato-application) package using the command:
4141
`mvn dockerfile:build`
4242

4343
### Running
@@ -50,15 +50,15 @@ An Elasticsearch instance must be available. To run locally in a docker contain
5050
Any of the following methods are acceptable ways of running Staccato
5151
- `./staccato-{version}.jar (self executing jar)`
5252
- `java -jar staccato-{version}.jar`
53-
- `mvn spring-boot:run` (from the [staccato-main](./staccato-main) directory)
53+
- `mvn spring-boot:run` (from the [staccato-application](./staccato-application) directory)
5454
- `docker run -d -i -t -p:8080:8080 quay.io/boundlessgeo/staccato:{version}`
5555

5656
## Endpoints
5757

5858
### API Endpoints
5959

60-
- GET /stac/search - dynamic catalog endpoint
61-
- GET /stac/search/{id} - returns an item by ID
60+
- GET /search - dynamic catalog endpoint
61+
- GET /search/{id} - returns an item by ID
6262

6363
### Collection Endpoints
6464

@@ -68,27 +68,27 @@ Any of the following methods are acceptable ways of running Staccato
6868

6969
### Catalog Endpoints
7070

71-
- GET /stac - retrieves the root catalog
71+
- GET / - retrieves the root catalog
7272
- GET /stac/{catalog_id} - retrieves a catalog by ID
7373
- GET /stac/{catalog_id}/items - retrieves a collection of items belonging to a collection
7474
- GET /stac/{collection_id}/items/{id} - retrieves an item by ID from a collection
7575

7676
### Transaction Endpoints
7777

78-
- POST /stac/{collection_id}/items - creates a new item
79-
- PUT /stac/{collection_id}/items/{item_id} - creates a new item
80-
- PATCH /stac/{collection_id}/items/{item_id} - updates an item item
81-
- DELETE /stac/{collection_id}/items/{item_id} - deletes an item
78+
- POST /collection/{collection_id}/items - creates a new item
79+
- PUT /collection/{collection_id}/items/{item_id} - creates a new item
80+
- PATCH /collection/{collection_id}/items/{item_id} - updates an item item
81+
- DELETE /collection/{collection_id}/items/{item_id} - deletes an item
8282

8383
### Stats Endpoints
8484

85-
- GET /stac/stats - retrieves aggregations for all collections
86-
- GET /stac/stats/{collection_id} - retrieves aggregations for a specific collection
85+
- GET /stats - retrieves aggregations for all collections
86+
- GET /stats/{collection_id} - retrieves aggregations for a specific collection
8787

8888
### Schema Endpoints
8989

90-
- GET /stac/schema - returns the STAC specification in JSON format
91-
- GET /stac/schema/{collection_id} - returns the JSON schema for the specified collection
90+
- GET /schema - returns the STAC specification in JSON format
91+
- GET /schema/{collection_id} - returns the JSON schema for the specified collection
9292

9393
### Actuator Endpoints
9494

@@ -103,15 +103,15 @@ Any of the following methods are acceptable ways of running Staccato
103103
- **query** a Common Query Language text string to query properties of the catalog entry (see below for examples)
104104
- **ids** a list of comma separated IDs to be returned
105105
- **collections** a list of comma separated collection IDs on which to filter the results
106-
- **fields.include** a comma separated list of json field names to include in the result
107-
- **fields.exclude** a comma separated list of json field names to exclude in the result
106+
- **fields** a comma separated list of json field names to include in the result; fields to be excluded can be prefixed with "-"
107+
- **sortby** a comma separated list of fields to sort by
108108

109109
Examples:
110110
_GET_
111-
- <https://stac.boundlessgeo.io/stac/search?fields.include=id,bbox>
112-
- [https://stac.boundlessgeo.io/stac/search?query=landsat:wrs_path=105 AND landsat:wrs_row=83](https://stac.boundlessgeo.io/stac/search?query=landsat:wrs_path=105%20AND%20landsat:wrs_row=83)
113-
- <https://stac.boundlessgeo.io/stac/search?ids=LC81050832019135LGN00,LC81050822019135LGN00&collections=landsat-8-l1>
114-
- [https://stac.boundlessgeo.io/stac/search?limit=20&page=2&query=eo:cloud_cover<0.1&bbox=27.3245,29.85465,30.5214,31.8685&time=2018-02-12T00:00:00Z/2019-06-12T00:00:00Z](https://stac.boundlessgeo.io/stac/search?limit=20&page=2&query=eo:cloud_cover%3C.1&bbox=27.3245,29.85465,30.5214,31.8685&time=2018-02-12T00:00:00Z/2019-06-12T00:00:00Z)
111+
- <https://stac.boundlessgeo.io/search?fields.include=id,bbox>
112+
- [https://stac.boundlessgeo.io/search?query=landsat:wrs_path=105 AND landsat:wrs_row=83](https://stac.boundlessgeo.io/stac/search?query=landsat:wrs_path=105%20AND%20landsat:wrs_row=83)
113+
- <https://stac.boundlessgeo.io/search?ids=LC81050832019135LGN00,LC81050822019135LGN00&collections=landsat-8-l1>
114+
- [https://stac.boundlessgeo.io/search?limit=20&page=2&query=eo:cloud_cover<0.1&bbox=27.3245,29.85465,30.5214,31.8685&time=2018-02-12T00:00:00Z/2019-06-12T00:00:00Z](https://stac.boundlessgeo.io/stac/search?limit=20&page=2&query=eo:cloud_cover%3C.1&bbox=27.3245,29.85465,30.5214,31.8685&time=2018-02-12T00:00:00Z/2019-06-12T00:00:00Z)
115115

116116
_POST_
117117

@@ -163,7 +163,7 @@ _POST_
163163
## Configuration
164164

165165
The STAC API has several properties that are configurable from the command line, as environment properties in the
166-
[application.yml](./staccato-main/src/main/resources/application.yml) file. The table below details the properties that
166+
[application.yml](./staccato-application/src/main/resources/application.yml) file. The table below details the properties that
167167
are available for configuration.
168168

169169
Property | Default Value | Description
@@ -257,7 +257,7 @@ Each query interface defines a method to return the list of item types that the
257257
the actual `doFilter` method which does the actual work. The basic premise is that the `doFilter` method accepts an
258258
Item as input and returns an item as output. This can be used to automatically add data, remove data, or transform
259259
data. Several examples of some included filters can be found in the
260-
[filter](./staccato-main/src/main/java/com/planet/staccato/filter) package. Collections can also provide custom
260+
[filter](./staccato-application/src/main/java/com/planet/staccato/filter) package. Collections can also provide custom
261261
filters to accomplish various tasks, such as automatically generating links to related items based on values found in
262262
the item's properties.
263263

@@ -311,7 +311,7 @@ the `collection` field in every item. Because each collection will have a differ
311311
implement several different extension interfaces or custom fieldsExtension, Jackson cannot deserialize Item classes without
312312
more information on which properties class to deserialize to. Having the "collections" field in each item provides an
313313
extremely convenient 1:1 relationship between the item and it's properties implementation. The Jackson configuration
314-
for this can be found [here](./staccato-main/src/main/java/com/planet/staccato/config/ExtensionConfig.java).
314+
for this can be found [here](./staccato-application/src/main/java/com/planet/staccato/config/ExtensionConfig.java).
315315

316316
### Custom annotations
317317

@@ -326,7 +326,7 @@ Set type `type` attribute to one of the enumerated values found in
326326

327327
The `@Subcatalog` annotation, when applied to a `getter` interface method, will make that field eligible to be
328328
automatically subcataloged via the `/stac/{catalog}` endpoint. The
329-
[catalog spec implementation](./staccato-main/src/main/java/com/planet/staccato/catalog) will automatically detect
329+
[catalog spec implementation](./staccato-application/src/main/java/com/planet/staccato/catalog) will automatically detect
330330
methods with this annotation and build a subcatalog link containing the field name. That subcatalog will build links
331331
containing all unique values in Elasticsearch for that field. After all eligible subcatalog fieldsExtension have been
332332
traversed, the links section will be populated with links to all items that match the selected subcatalog values.
@@ -421,11 +421,11 @@ actual index it belongs to and update it on that index.
421421

422422
STAC will need to be configured with the mappings between the Elasticsearch alias name and the collection ID (eg, the
423423
value used in the `items.properties.collection` field). This can be set in
424-
[application.yml](./staccato-main/src/main/resources/application.yml) under the path
424+
[application.yml](./staccato-application/src/main/resources/application.yml) under the path
425425
`stac.es.index.aliases`. The key should be the name of the write alias used in Elasticsearch (not the actual index
426426
name!). The value should be the collection id. So in our example case, the key would be `my-index-name` and the value
427427
would be the collection ID. STAC will automatically append `-search` to the alias for executing searches.
428428

429429
At this point, you should be good to start inserting items. See the
430-
[transaction API controller](./staccato-main/src/main/java/com/planet/staccato/transaction/TransactionApi.java)
430+
[transaction API controller](./staccato-application/src/main/java/com/planet/staccato/transaction/TransactionApi.java)
431431
for the proper methods to use for creating new items.

pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55

66
<groupId>com.planet.staccato</groupId>
77
<artifactId>staccato</artifactId>
8-
<version>0.8.0.3</version>
8+
<version>0.9.0.1</version>
99
<packaging>pom</packaging>
1010

1111
<parent>
1212
<groupId>org.springframework.boot</groupId>
1313
<artifactId>spring-boot-starter-parent</artifactId>
14-
<version>2.2.1.RELEASE</version>
14+
<version>2.2.3.RELEASE</version>
1515
<relativePath/> <!-- lookup parent from repository -->
1616
</parent>
1717

18-
<name>staccato</name>
19-
<description>Staccato STAC implementation by Planet Labs</description>
18+
<name>Staccato</name>
19+
<description>STAC implementation by Planet Labs</description>
2020

2121
<properties>
2222
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -33,7 +33,7 @@
3333
</properties>
3434

3535
<modules>
36-
<module>staccato-main</module>
36+
<module>staccato-application</module>
3737
<module>staccato-collections</module>
3838
<module>staccato-commons</module>
3939
<module>staccato-community</module>
@@ -45,7 +45,7 @@
4545
<dependency>
4646
<groupId>org.springframework.cloud</groupId>
4747
<artifactId>spring-cloud-dependencies</artifactId>
48-
<version>Hoxton.RC1</version>
48+
<version>Hoxton.SR1</version>
4949
<type>pom</type>
5050
<scope>import</scope>
5151
</dependency>
File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
<modelVersion>4.0.0</modelVersion>
55

66
<groupId>com.planet.staccato</groupId>
7-
<artifactId>staccato-main</artifactId>
7+
<artifactId>staccato-application</artifactId>
88

9-
<name>staccato-main</name>
9+
<name>staccato-application</name>
1010
<description>Planet STAC Implementation</description>
1111

1212
<parent>
1313
<groupId>com.planet.staccato</groupId>
1414
<artifactId>staccato</artifactId>
15-
<version>0.8.0.3</version>
15+
<version>0.9.0.1</version>
1616
</parent>
1717

1818
<properties>

staccato-main/src/main/java/com/planet/staccato/StaccatoApplication.java renamed to staccato-application/src/main/java/com/planet/staccato/StaccatoApplication.java

File renamed without changes.

staccato-main/src/main/java/com/planet/staccato/StaccatoApplicationInitializer.java renamed to staccato-application/src/main/java/com/planet/staccato/StaccatoApplicationInitializer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.planet.staccato;
22

33
import com.fasterxml.jackson.annotation.JsonInclude;
4+
import com.fasterxml.jackson.databind.DeserializationFeature;
45
import com.fasterxml.jackson.databind.ObjectMapper;
56
import com.planet.staccato.config.StacConfigProps;
67
import lombok.extern.slf4j.Slf4j;
@@ -40,6 +41,7 @@ public void run(ApplicationArguments args) throws Exception {
4041
if (!configProps.isIncludeNullFields()) {
4142
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
4243
}
44+
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true);
4345

4446
if (null != stacInitializers && !stacInitializers.isEmpty()) {
4547
for (StacInitializer stacInitializer : stacInitializers) {

staccato-main/src/main/java/com/planet/staccato/StaccatoHealthIndicator.java renamed to staccato-application/src/main/java/com/planet/staccato/StaccatoHealthIndicator.java

File renamed without changes.

0 commit comments

Comments
 (0)