Skip to content

Commit

Permalink
Changes for closer STAC harmonization.
Browse files Browse the repository at this point in the history
  • Loading branch information
pvretano committed Apr 26, 2023
1 parent 4e76656 commit ea2a766
Show file tree
Hide file tree
Showing 18 changed files with 183 additions and 80 deletions.
18 changes: 18 additions & 0 deletions core/openapi/schemas/license.yaml
@@ -0,0 +1,18 @@
---
type: string
description:
A legal document under which the resource is made available.
If the resource is being made available under a common license
then use an SPDX license id (https://spdx.org/licenses/).
If the resource is being made available under multiple common
licenses then use an SPDX license expression v2.3 string
(https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/)
If the resource is being made available under one or more licenses
that haven't been assigned an SPDX identifier or one or more custom
licenses then use a string value of 'other' and include one or more
links (rel="license") in the `link` section of the record to the
file(s) that contains the text of the license(s).
There is also the case of a resource that is private or unpublished
and is thus unlicensed; in this case do not register such a resource
in the catalogue in the first place since there is no point in making
such a resource discoverable.
64 changes: 4 additions & 60 deletions core/openapi/schemas/recordGeoJSON.yaml
@@ -1,3 +1,4 @@
---
type: object
required:
- id
Expand All @@ -19,21 +20,7 @@ properties:
enum:
- Feature
time:
oneOf:
- type: null
- type: object
properties:
oneOf:
- type: string
format: date-time
- type: array
minItems: 2
maxItems: 2
items:
oneOf:
- type: null
- type: string
format: date-time
$ref: time.yaml
geometry:
oneOf:
- type: null
Expand Down Expand Up @@ -105,42 +92,7 @@ properties:
required:
- value
themes:
type: array
description:
A knowledge organization system used to classify the resource.
items:
type: object
properties:
concepts:
type: array
description:
One or more entity/concept identifers from this knowledge
system. it is recommended that a resolvable URI be used
for each entity/concept identifier.
items:
type: object
properties:
id:
type: string
description: An identifier for the concept.
title:
type: string
description: A human readable title for the concept.
description:
type: string
description: A human readable description for the concept.
url:
type: string
format: uri
description: A URI providing further description of the concept.
required:
- id
scheme:
type: string
description:
An identifier for the knowledge organization system used
to classify the resource. It is recommended that the
identifier be a resolvable URI.
$ref: themes.yaml
formats:
type: array
description:
Expand All @@ -155,15 +107,7 @@ properties:
A list of providers qualified by their role in association to the
record.
license:
type: string
description:
A legal document under which the resource is made available.
The value should be a code, convenient for filtering the records.
Where applicable, the use of the identifiers from the SPDX License
List is recommended. If multiple licenses apply, it is recommended
to use "various". Where available, links to a URI of each applicable
license should be added to the 'links' property.
maxLength: 64
$ref: license.yaml
rights:
type: string
description:
Expand Down
36 changes: 36 additions & 0 deletions core/openapi/schemas/themes.yaml
@@ -0,0 +1,36 @@
type: array
description:
A knowledge organization system used to classify the resource.
items:
type: object
properties:
concepts:
type: array
description:
One or more entity/concept identifers from this knowledge
system. it is recommended that a resolvable URI be used
for each entity/concept identifier.
items:
type: object
required:
- id
properties:
id:
type: string
description: An identifier for the concept.
title:
type: string
description: A human readable title for the concept.
description:
type: string
description: A human readable description for the concept.
url:
type: string
format: uri
description: A URI providing further description of the concept.
scheme:
type: string
description:
An identifier for the knowledge organization system used
to classify the resource. It is recommended that the
identifier be a resolvable URI.
23 changes: 23 additions & 0 deletions core/openapi/schemas/time.yaml
@@ -0,0 +1,23 @@
oneOf:
- type: 'null'
- type: object
properties:
date:
type: string
pattern: "^\\d{4}-\\d{2}-\\d{2}$"
timestamp:
type: string
pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z$"
interval:
type: array
minItems: 2
maxItems: 2
items:
oneOf:
- type: string
pattern: "^\\d{4}-\\d{2}-\\d{2}$"
- type: string
pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z$"
- type: string
enum:
- ".."
5 changes: 1 addition & 4 deletions core/standard/annex_resource_types.adoc
Expand Up @@ -6,10 +6,7 @@
[[common_resource_types-overview]]
=== Overview

This annex describes common resource types when qualifying resources via a record's `properties.type` property, in the absence
of a formal controlled vocabulary. Please note that these codelists and identifiers are NOT normative. For information
communities wishing to formally identify and qualify, it is suggested that a specification extension be developed to meet those
requirements.
This annex describes common resource types when qualifying resources via a record's `properties.type` property, in the absence of a formal controlled vocabulary. Please note that these codelists and identifiers are NOT normative. For information communities wishing to formally identify and qualify, it is suggested that a specification extension be developed to meet those requirements.

==== Data

Expand Down
2 changes: 2 additions & 0 deletions core/standard/clause_12_local_resources_catalogue.adoc
Expand Up @@ -58,6 +58,8 @@ include::requirements/local-resources-catalogue/REQ_property-title.adoc[]

include::requirements/local-resources-catalogue/REQ_property-description.adoc[]

include::recommendations/local-resources-catalogue/PER_common-mark.adoc[]

=== Property `extent`

include::recommendations/local-resources-catalogue/REC_property-extent.adoc[]
Expand Down
39 changes: 33 additions & 6 deletions core/standard/clause_7_record.adoc
Expand Up @@ -65,15 +65,37 @@ Other encoding are allowed but are not described in this document.

include::requirements/record-core/REQ_mandatory-queryables-record.adoc[]

include::recommendations/record-core/PER_common-mark.adoc[]

include::recommendations/record-core/PER_additional-queryables-record.adoc[]


[[sc_record_extensions]]
==== Record extensions

In tables <<core-queryables-record-table>> and <<core-queryables-resource-table>> this standard defines a core set of properties for describing discoverable resources. It is anticipated that this core set of properties will be extended to suite specific use cases or requirements. For example, a catalogue record may be extended to include additional properties from the https://semiceu.github.io/GeoDCAT-AP/releases/[GeoDCAT] vocabulary. The fact that a catalogue record has been extended in this way can be advertised using the `conformsTo` member. The `conformsTo` member is a list of URIs that identify each extension used in a record. This specification does not define the specific URIs that are used to identify a specific extension; it simply provides a place where these identifiers can be listed.

In the case where all the records of a catalogue use the same set of extensions, and to prevent unnecessary duplication, there is also a `conformsTo` member at the https://github.com/opengeospatial/ogcapi-records/blob/master/core/openapi/schemas/catalogue.yaml[collection or catalogue level] that may be used to declare which extensions are used in all records of the catalogue. Extensions listed at the catalogue and record levels are cumulative.

[[sc_temporal_information]]
==== Temporal information

===== Instants

include::requirements/record-core/REQ_time-instant.adoc[]

===== Intervals

include::requirements/record-core/REQ_time-interval.adoc[]

===== Instants and intervals

include::requirements/record-core/REQ_time-instant-interval.adoc[]

===== Time zones

include::requirements/record-core/REQ_time-zone.adoc[]

[[sc_keywords_and_themes]]
==== Keywords and Themes

Expand All @@ -94,18 +116,25 @@ these properties in a record.

include::recommendations/record-core/REC_record-keywords-themes.adoc[]

[[sc_type_and_licenses]]
==== Type and Licenses
[[sc_type_vocabulary]]
==== Type vocabulary

A record has one `properties.type` and one `properties.license` property. The value of each property should be a code, convenient for filtering records.
A record has one `properties.type` property. The value of this property should be a code, convenient for filtering records.

include::recommendations/record-core/REC_record-type.adoc[]

include::recommendations/record-core/PER_record-type.adoc[]

In addition, links to external resources describing the record type vocabulary used to populate the `properties.type` member are recommended, as described in <<sc_associations_and_links,Associations and Links>>.

[[sc_licenses_vocabulary]]
==== Licenses vocabulary

A record has one `properties.licenses` property. The value of this property should be a code, convenient for filtering records.

include::recommendations/record-core/REC_record-license.adoc[]

In addition, links to external resources representing the record type and the licenses are recommended, as described in the next section.
In addition, links to external resources describing the licences used are recommended, as described in <<sc_associations_and_links,Associations and Links>>.

[[sc_associations_and_links]]
==== Associations and Links
Expand All @@ -120,8 +149,6 @@ Links in the `links` section may also encode canoncial URIs for record propertie

include::recommendations/record-core/REC_record-links_type.adoc[]

include::recommendations/record-core/REC_record-links_license.adoc[]

include::recommendations/record-core/REC_record-links_iana.adoc[]

Association links point to the resource(s) being described by a record. Such links allow binding to a resource once it has been discovered by searching a catalogue. Depending on how the target resource of a record is represented and how it may be accessed, there may be one or more association links. For example, if the target resource is an Earth observation imagery file, links may point to the indivdually accessible bands of the image file.
Expand Down
2 changes: 2 additions & 0 deletions core/standard/clause_8_collection.adoc
Expand Up @@ -48,6 +48,8 @@ NOTE: The properties _id_, _title_, _description_, _links_, _extent_, _itemsType

include::requirements/record-collection/REQ_mandatory-queryables.adoc[]

include::recommendations/record-collection/PER_common-mark.adoc[]

include::recommendations/record-collection/PER_additional-queryables.adoc[]

=== Keywords and Themes
Expand Down
@@ -0,0 +1,7 @@
[[per_crawlable-catalogue_common-mark]]
[width="90%",cols="2,6a"]
|===
^|*Recommendation {counter:rec-id}* |*/per/crawlable-catalogue/common-mark*

For any `description` member in a _collections object_, https://spec.commonmark.org/current/(CommonMark) MAY be used for a rich text representation.
|===
@@ -0,0 +1,7 @@
[[per_collections_common-mark]]
[width="90%",cols="2,6a"]
|===
^|*Recommendation {counter:rec-id}* |*/per/collections/common-mark*

For any `description` member in a local resources object, https://spec.commonmark.org/current/(CommonMark) MAY be used for a rich text representation.
|===
@@ -0,0 +1,7 @@
[[per_record-collection_common-mark]]
[width="90%",cols="2,6a"]
|===
^|*Recommendation {counter:rec-id}* |*/per/record-collection/common-mark*

For any `description` member in a record collection, https://spec.commonmark.org/current/(CommonMark) MAY be used for a rich text representation.
|===
@@ -0,0 +1,7 @@
[[per_common-mark]]
[width="90%",cols="2,6a"]
|===
^|*Recommendation {counter:rec-id}* |*/per/core/common-mark*

For any `description` member in a record, https://spec.commonmark.org/current/(CommonMark) MAY be used for a rich text representation.
|===
Expand Up @@ -2,7 +2,9 @@
[width="90%",cols="2,6a"]
|===
^|*Recommendation {counter:rec-id}* |*/rec/core/record-license*
^|A |The list of codes that can occur in records of a catalog for the property `properties.license` SHOULD be listed as enum values in the API definition of the record schema.
^|B |The use of the https://spdx.dev/ids[identifiers] from the <<SPDX,SPDX License List>> is recommended, where applicable.
^|C |If multiple licenses apply, it is recommended to use "various" as a special value.
^|A |If the resource is being made available under a common license then a https://spdx.org/licenses/[SPDX license identifier] SHOULD be used as the value of the `license` member.
^|B |If the resource is being made available under multiple common licenses then a https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/[SPDX license expression string] SHOULD be used as the value of `license` member.
^|C |If the resource is being made available under one or more licenses that haven't been assigned an https://spdx.org/licenses/[SPDX license identifier] or one or more custom licenses then the value of the `license` member SHOULD be the value `other` and one or more links (relation: `license`) SHOULD be included in the `links` section of the record pointing to the file(s) that contain the text of the licenses.
|===

NOTE: There is also the case of a resource that is private or unpublished and is thus unlicensed; in this case do not register such a resource in the catalogue in the first place since there is no point in making such a resource discoverable.

This file was deleted.

@@ -0,0 +1,10 @@
[[req_record-core_time-instant-interval]]
[width="90%",cols="2,7a"]
|===
^|*Requirement {counter:req-num}* |*/req/core/time-instant-interval*
^|A |If the `time` object in a record includes both a `date` and a `timestamp` member, the `full-date` parts SHALL be identical.
^|B |If the `time` object in a record includes both a `timestamp` and an `interval` member with start/end dates, the interval SHALL contain the date of the timestamp.
^|C |If the `time` object in a record includes both a `timestamp` and an `interval` member with start/end timestamps, the interval SHALL contain the timestamp.
^|D |If the `time` object in a record includes both a `date` and an `interval` member with with start/end dates, the interval SHALL contain the date.
^|E |If the `time` object in a record includes both a `date` and an `interval` member with with start/end timestamps, the interval SHALL include timestamps on the date.
|===
7 changes: 7 additions & 0 deletions core/standard/requirements/record-core/REQ_time-instant.adoc
@@ -0,0 +1,7 @@
[[req_record-core_time-instant]]
[width="90%",cols="2,7a"]
|===
^|*Requirement {counter:req-num}* |*/req/core/time-instant*
^|A |If the `time` object in a record includes a `date` member, the value SHALL conform to <<rfc3339,RFC 3339 (Date and Time on the Internet: Timestamps)>> and match the production rule `full-date`.
^|B |If the `time` object in a record includes a `timestamp` member, the value SHALL conform to <<rfc3339,RFC 3339 (Date and Time on the Internet: Timestamps)>> and match the production rule `date-time`.
|===
8 changes: 8 additions & 0 deletions core/standard/requirements/record-core/REQ_time-interval.adoc
@@ -0,0 +1,8 @@
[[req_record-core_time-interval]]
[width="90%",cols="2,7a"]
|===
^|*Requirement {counter:req-num}* |*/req/core/interval*
^|A |If the `time` object in a record includes an `interval` member, each array item SHALL be a string that is a double-dot ("..") or conforms to <<rfc3339,RFC 3339 (Date and Time on the Internet: Timestamps)>> and match one of the following production rules: `full-date` (a date) or `date-time` (a timestamp).
^|B |If the start is a date, the end SHALL be a date, too, or "..".
^|C |If the start is a timestamp, the end SHALL be a timestamp, too, or "..".
|===
6 changes: 6 additions & 0 deletions core/standard/requirements/record-core/REQ_time-zone.adoc
@@ -0,0 +1,6 @@
[[req_record-core_time-zone]]
[width="90%",cols="2,7a"]
|===
^|*Requirement {counter:req-num}* |*/req/core/time-zone*
^|A |Timestamps in the `time` member in a record SHALL use UTC ("Z") as the time zone.
|===

0 comments on commit ea2a766

Please sign in to comment.