Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 178 - Move 'created' and 'updated' fields from the record to the links pointing to the representation of the record. #179

Merged
merged 9 commits into from
Jan 12, 2023
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,22 @@ The record building block defines the core schema of a catalogue record. It inc
|Queryables |Requirement |Description
|-----------|------------|-----------------------------------
|recordId |**M** |A unique record identifier assigned by the server.
|recordCreated |O |The date this record was created in the server.
|recordUpdated |O |The most recent date on which the record was changed.
|links |O |A list of links for accessing the resource (e.g. download link, access link, etc.) in one of the supported distribution formats and/or links to other resources associated with this resource. Also, a list of links for navigating the API (e.g. prev, next, alternate, etc.).
|created |O |The date this record was created in the server.
|updated |O |The most recent date on which the record was changed.
|type |**M** |The nature or genre of the resource.
|title |**M** |A human-readable name given to the resource.
|description |O |A free-text description of the resource.
|keywords |O |A list of free-form keywords or tag associated with the resource.
|language |O |This refers to the natural language used for textual values (i.e. titles, descriptions, etc) of a resource.
|externalId |O |An identifier for the resource assigned by an external entity.
|created |O |The date the resource was created.
|updated |O |The more recent date on which the resource was changed.
|publisher |O |The entity making the resource available.
|themes |O |A knowledge organization system used to classify the resource.
|formats |O |A list of available distributions for the resource.
|contactPoint |O |An entity to contact about the resource.
|license |O |A legal document under which the resource is made available.
|rights |O |A statement that concerns all rights not addressed by the license such as a copyright statement.
|extent |O |The spatio-temporal coverage and resolution of the resource.
|links |O |A list of links including links for accessing the resource (e.g. download link, access link, etc.) in one of the supported distribution formats, links to other resources associated with this resource and links for navigating the API (e.g. prev, next, alternate, etc.). See [link schema.](https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/schemas/common/link.yaml).

It is anticipated that the schema of a record will be extended to describe specific resource types (e.g. data sets, earth observation products, services, machine models, etc.) and also extended by information communities wishing to enrich the information content of the record to suit their needs. The specification does not mandate a specific encoding for a record but conformance classes are defined for encoding records as GeoJSON feature and HTML.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
},
"properties":
{
"recordCreated": "2021-08-17",
"recordUpdated": "2021-08-17",
"created": "2021-08-17T00:00:00Z",
"updated": "2021-08-17T00:00:00Z",
"type": "dataset",
"title": "New Zealand Building Outlines",
"description": "This dataset provides current outlines of buildings within mainland New Zealand captured from the latest aerial imagery. A building outline is a 2D representation of the roof outline of a building which has been classified from LINZ aerial imagery using a combination of automated and manual processes to extract and refine a building roof outline. Building outlines observed in aerial imagery larger than or equal to 10 square meters are captured in this dataset, and may include structures such as garages and large sheds. **Data vintage** This dataset shows the most recent set of building outlines extracted from the LINZ aerial imagery available on the LINZ Data Service. Current coverage includes nearly all regions of New Zealand, except parts of rural Auckland, remote parts of Bay of Plenty, Tasman and the Southern Alps, as well as Fiordland, Stewart Island and the Chatham Islands. This dataset will be updated and expanded as new aerial imagery becomes available. Since aerial imagery is flown only every few years in each region of the country, building outlines only reflect those buildings observed at the date of this aerial imagery capture, and may not reflect buildings constructed after this time period. Please refer to the [NZ Building Outlines Data Dictionary](https://nz-buildings.readthedocs.io/en/latest/introduction.html) for detailed metadata and information about this dataset.",
Expand All @@ -42,8 +42,6 @@
"New Zealand"
],
"language": "en-NZ",
"created": "2013-01-21",
"updated": "2020-04-23",
"publisher":
{
"organizationName": "LINZ - Land Information New Zealand",
Expand Down Expand Up @@ -80,14 +78,18 @@
"href": "buildings-collection.json",
"rel": "alternate",
"type": "application/json",
"title": "OGC Collection JSON of this data"
"title": "OGC Collection JSON of this data",
"created": "2013-01-21T00:00:00Z",
"updated": "2020-04-23T00:00:00Z"
},
{
"href": "https://storage.googleapis.com/open-geodata/linz-examples/nz-building-outlines.gpkg",
"rel": "enclosure",
"type": "application/geopackage+sqlite3",
"length": 1449656320,
"title": "Data as a Geopackage"
"title": "Data as a Geopackage",
"created": "2013-01-21T00:00:00Z",
"updated": "2020-04-23T00:00:00Z"
},
{
"href": "./nz-building-outlines.xml",
Expand All @@ -96,4 +98,4 @@
"title": "ISO 19115/19139 Metadata"
}
]
}
}
4 changes: 2 additions & 2 deletions core/examples/json/queryables.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
"type": "datetime"
},
{
"queryable": "recordcreated",
"queryable": "created",
"type": "datetime"
},
{
"queryable": "recordmodified",
"queryable": "updated",
"type": "datetime"
}
]
Expand Down
14 changes: 8 additions & 6 deletions core/examples/json/record.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
]
},
"properties": {
"recordCreated": "2021-02-08",
"recordUpdated": "2021-02-08",
"created": "2021-02-08T00:00:00Z",
"updated": "2021-02-08T00:00:00Z",
"type": "dataset",
"title": "Total Ozone - daily observations",
"description": "A measurement of the total amount of atmospheric ozone in a given column from the surface to the edge of the atmosphere. Ground based instruments such as spectrophotometers and ozonemeters are used to measure results daily",
Expand All @@ -53,8 +53,6 @@
"value": "urn:x-wmo:md:int.wmo.wis::https://geo.woudc.org/def/data/ozone/total-column-ozone/totalozone"
}
],
"created": "2015-01-23",
"updated": "2015-01-23",
"publisher": "https://woudc.org",
"themes": [
{
Expand Down Expand Up @@ -163,7 +161,9 @@
"rel": "enclosure",
"type": "text/html",
"title": "Web Accessible Folder (WAF)",
"href": "https://woudc.org/archive/Archive-NewFormat/TotalOzone_1.0_1"
"href": "https://woudc.org/archive/Archive-NewFormat/TotalOzone_1.0_1",
"created": "2015-01-23T00:00:00Z",
"updated": "2015-01-23T00:00:00Z"
},
{
"rel": "search",
Expand All @@ -175,7 +175,9 @@
"rel": "enclosure",
"type": "application/zip",
"title": "Static dataset archive file",
"href": "https://woudc.org/archive/Summaries/dataset-snapshots/totalozone.zip"
"href": "https://woudc.org/archive/Summaries/dataset-snapshots/totalozone.zip",
"created": "2015-01-23T00:00:00Z",
"updated": "2015-01-23T00:00:00Z"
},
{
"rel": "service",
Expand Down
22 changes: 12 additions & 10 deletions core/openapi/ogcapi-records-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,11 @@ components:
- type
- title
properties:
recordCreated:
created:
type: string
description: Date of creation of this record.
format: date-time
recordUpdated:
updated:
type: string
description: The most recent date on which the record was changed.
format: date-time
Expand Down Expand Up @@ -474,14 +474,6 @@ components:
description: The value of the identifier.
required:
- value
created:
type: string
description: Date of creation of the resource.
format: date-time
updated:
type: string
description: Most recent date on which the resource was changed.
format: date-time
publisher:
type: string
description: |-
Expand Down Expand Up @@ -621,6 +613,16 @@ components:
type: string
length:
type: integer
templated:
type: boolean
variables:
type: object
created:
type: string
format: date-time
updated:
type: string
format: date-time
multilinestringGeoJSON:
type: object
required:
Expand Down
14 changes: 2 additions & 12 deletions core/openapi/schemas/catalogue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ allOf:
- itemType
- type
properties:
recordCreated:
created:
type: string
description:
Date of creation of this catalogue.
format: date-time
recordUpdated:
updated:
type: string
description:
The most recent date on which this catalogue was changed.
Expand All @@ -30,16 +30,6 @@ allOf:
descriptions, etc.) of the catalogue. ISO 639-1/639-2 codes
should be used.
default: en
created:
type: string
description:
Date of creation of this catalogue.
format: date-time
updated:
type: string
description:
Most recent date on which the catalogue was changed.
format: date-time
themes:
type: array
description:
Expand Down
10 changes: 10 additions & 0 deletions core/openapi/schemas/common/link.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,13 @@ properties:
In combination with a templated href, the variables section should
provide enough information to bind to the target resource (e.g. a WMS).
type: object
created:
type: string
description:
Date of creation of the resource pointed to by the link.
format: date-time
updated:
type: string
description:
Most recent date on which the resource pointed to by the link was changed.
format: date-time
14 changes: 2 additions & 12 deletions core/openapi/schemas/recordGeoJSON.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ properties:
- type
- title
properties:
recordCreated:
created:
type: string
description:
Date of creation of this record.
format: date-time
recordUpdated:
updated:
type: string
description:
The most recent date on which the record was changed.
Expand Down Expand Up @@ -103,16 +103,6 @@ properties:
description: The value of the identifier.
required:
- value
created:
type: string
description:
Date of creation of the resource.
format: date-time
updated:
type: string
description:
Most recent date on which the resource was changed.
format: date-time
themes:
type: array
description:
Expand Down
17 changes: 9 additions & 8 deletions core/standard/clause_7_record.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,23 @@ Other encoding are allow but are not described in this document.
|===
|Queryables |Requirement |Description |GeoJSON key
|recordId |**required** |A unique record identifier assigned by the server. |id
|recordCreated |optional |The date this record was created in the server. |properties.recordCreated
|recordUpdated |optional |The most recent date on which the record was changed. |properties.recordUpdated
|created |optional |The date this record was created in the server. |properties.created
|updated |optional |The most recent date on which the record was changed. |properties.updated
|===

[#core-queryables-resource-table,reftext='{table-caption} {counter:table-num}']
.Table of Core Queryables related to the resource
[cols="20,5,55,20",options="header"]
|===
|Queryables |Requirement |Description |GeoJSON key
|geometry |**required** |A geometry associated with the resource that is used for discovery. Can be null if there is no associated geometry |geometry
|time |**required** |The temporal extent of the resource. Can be null. |time
|geometry |**required** |A geometry associated with the resource that is used for discovery. Can be null if there is no associated geometry. |geometry
|time |**required** |The temporal extent of the resource. Can be null is there is not associated temporal extent. |time
|type |**required** |The nature or genre of the resource. |properties.type
|title |**required** |A human-readable name given to the resource. |properties.title

|description |optional |A free-text description of the resource. |properties.description
|keywords |optional |A list of free-form keywords or tags associated with the resource. |properties.keyword
|language |optional |The natural language used for textual values (i.e. titles, descriptions, etc) of a resource. |properties.language
|externalIds |optional |One or more identifiers for the resource assigned by an external entity. |properties.externalIds
|created |optional |The date the resource was created. |properties.created
|updated |optional |The more recent date on which the resource was changed. |properties.updated
|themes |optional |A knowledge organization system used to classify the resource. |properties.themes
|formats |optional |A list of available distributions for the resource. |properties.formats
|providers |optional |A list of providers qualified by their role in association to the record. |properties.providers
Expand Down Expand Up @@ -165,7 +162,7 @@ Templated links may also be used to bind to resources that may require additiona

This specification extends the https://github.com/opengeospatial/ogcapi-common/blob/master/core/openapi/schemas/link.json[schema for a link] to include substitution variables who values are filled in at runtime prior to resolving the link.

The https://github.com/opengeospatial/ogcapi-common/blob/master/core/openapi/schemas/link.json[link schema] is extended with the addition of two properties names `templated` and `variables`. The `templated` property is a boolean that is used to indicate the the URL of the link (i.e. `href`) is a template and contains substitution variables. The `variables` property uses https://json-schema.org/draft/2020-12/json-schema-validation.html[JSON-Schema fragments] to define the characteristics of each substitution variable referenced in the templated link URL.
The https://github.com/opengeospatial/ogcapi-common/blob/master/core/openapi/schemas/link.json[link schema] is extended with the addition of two properties named `templated` and `variables`. The `templated` property is a boolean that is used to indicate the the URL of the link (i.e. `href`) is a template and contains substitution variables. The `variables` property uses https://json-schema.org/draft/2020-12/json-schema-validation.html[JSON-Schema fragments] to define the characteristics of each substitution variable referenced in the templated link URL.

include::requirements/record-core/REQ_templated-link.adoc[]

Expand All @@ -176,6 +173,10 @@ include::requirements/record-core/REQ_templated-link.adoc[]
include::../examples/json/templated-link.json[]
----

==== Resource timestamps

A <<fix.me,record>> contains information for accessing the resource described by the record which is encoded in the links section. Since a resource may have multiple representations there may be multiple links pointing to each represention of a resource. Furthermore, representations of a resource may be created and updated at different times. In order to capture this life cycle information of resource representations, the https://github.com/opengeospatial/ogcapi-common/blob/master/core/openapi/schemas/link.json[link schema] is extended with the addition of two properties named `created` and `updated`. The values of these properties are used to indicate the creation and last updated dates of the resource representation pointed to by the link.

[[sc_language_negotiation]]
==== Language negotiation

Expand Down
6 changes: 2 additions & 4 deletions extensions/OpenSearch/clause_15_opensearch.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -211,17 +211,15 @@ The following table maps the <<query-response,core query response properties>> t
|===
|Core query response property |ATOM entry element
|`recordId` |`atom:entry/atom:id`
|`recordCreated` |`dct:issued`
|`recordUpdated` |`dct:modified`
|`created` |`atom:entry/atom:published`
|`updated` |`atom:entry/atom:modified`
|`links` |`atom:link`
|`type` |`dc:type`
|`title` |`atom:entry/atom:title`
|`description` |`atom:entry/atom:summary`
|`keywords` |`atom:entry/atom:category`
|`language` |`dct:language`
|`externalId` |n/a`
|`created` |`atom:entry/atom:published`
|`updated` |`atom:entry/atom:modified`
|`publisher` |`atom:entry/atom:creator`
|`themes` |`atom:entry/atom:category`
|`formats` |`atom/entry/atom:link[@rel="enclosure"]/@type`
Expand Down
20 changes: 10 additions & 10 deletions extensions/collections/openapi/ogcapi-records-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,11 @@ components:
- type
- title
properties:
recordCreated:
created:
type: string
description: Date of creation of this record.
format: date-time
recordUpdated:
updated:
type: string
description: The most recent date on which the record was changed.
format: date-time
Expand Down Expand Up @@ -460,14 +460,6 @@ components:
the catalogue) entity.
items:
type: string
created:
type: string
description: Date of creation of the resource.
format: date-time
updated:
type: string
description: Most recent date on which the resource was changed.
format: date-time
publisher:
type: string
description: |-
Expand Down Expand Up @@ -607,6 +599,14 @@ components:
type: string
length:
type: integer
created:
type: string
description: Date of creation of the resource.
format: date-time
updated:
type: string
description: Most recent date on which the resource was changed.
format: date-time
multilinestringGeoJSON:
type: object
required:
Expand Down
Loading