The current implementation in Backend and Webgui (from November 2016) rely on preliminary GeoJson results from Atom encoding mappings from OWS-10 TestBed working groups during the last years, before an official OWC GeoJson encoding was standardised. We are currently not supporting the ATOM encoding.
There are a couple of changes that have to be reflected in our implementation of OwcDocument and how it translates to JSON. The issues need to be reconciled in the Backend, Webgui and CSW Ingester.
[x] Throughout the standard the "OWS Context document" is being referred to constantly, however, the implementing class from the OWS Conceptual Model is named: Class OWC:Context
[x] besides the updated attribute, the context and entry properties also can have a 0..1 date attribute: Date or range of dates relevant to the Context resource (timeIntervalOfInterest)
[x] check that we include the trailing slash in IRI context ids
[x] .features[i].properties.links.via 0..* : This element is optional and references an external resource from which the Context document is derived (e.g. metadata document from which the metadata of the resource is derived).
[x] .features[i].properties.links.alternates 0..* : Reference to a description of the Context resource in alternative format Array of link objects
[x] .features[i].properties.links.previews 0..* : Reference to a quick-look or browse image representing the Context resource Array of link objects. The element length SHOULD be provided
[x] .features[i].properties.links.data 0..* : Reference to the location of the data resource described in the Context resource Array of link objects
[x] 7.1.10 DataType links: The "links" array is not an array anymore. It is an Object that contains different "keys" like "via" or "profile". These are then arrays of objects. The current "rel" of the "OwcLink" is now the "key". So what we need is an OwcLinks class, that basically contains a "map[String, OwcLink]". (this might be a bit tricky to implement see: http://stackoverflow.com/questions/27732552/how-to-parse-json-with-variable-keys-in-scala-play
[x] Links can now also have optional lang and length. Owc document links has profiles and via. The via element is an array of link objects that contains four elements named type, href, title and lang
[x] .properties.links.profiles: The OwcDocument needs to have at least one link in its properties. Should look like
"links" : {
"profiles": [{
"href": "http://www.opengis.net/spec/owc-geojson/1.0/req/core",
"title": "This file is compliant with version 1.0 of OGC Context"
}],
...
[x] 7.1.8 the "generator" properties element is now an object OWC:Creator/OWC:CreatorApplication:
.properties.display - "display" properties element 0..1 an object of OWC:Creator/OWC:CreatorDisplay:
```
```
[x] The list of OWC: Resource Class is mapped to an array of GeoJSON Feature objects (currently an array of our OwcEntry)
[x] the OwcEntry properties don't contain subtitle, but an abstract
[x] .features[i].properties.active 0..1 : Flag value indicating to the client if the Context resource should be displayed by default (Boolean) Default value is ‘true’
[x] : .features[i].properties.folder
[x] .features[i].properties.offering 0..* : Service or inline content offering for the resource targeted at OGC compliant clients owc:OfferingType - IMPORTANT, Offerings are INSIDE the entry properties, not parallel
[x] we don't have styleSet .styles[k] Array of style sets owc:StyleSetType in Offerings
[x] we don't implement Owc:ContentType .contents[k] Array of contents (inline or byRef)
owc:ContentType, also: request .request and result .result are of type owc:ContentType -> owc:Content elements
[x] If the href attribute is present, the element content SHALL be empty. If href is not provided, content SHALL be provided
[x] type - .type: MIME type of the Content String type, not empty that contains a MIME media type. One (mandatory)
[x] URL - .href: URL of the Content URL Zero or one (optional)
[x] a title - .title: Title of the Content String type, not empty Zero or one (optional)
[x] content - .content In-line content for the Content element String type, not empty that can
contain any text encoded media type Zero or one (optional)
[x] author .properties.authors.name is array of obj {"name": "the name" (with email and uri as opt props)} , no contributors array anymore
[x] The HttpLink Offering is not needed. This GetFile thingy should be done by "xz.features[i].properties.links.data[j]"
[x] Same goes for the "NetCdfOffering"
[x] [ ] The UUID parameters that we need to save objects in the DB can (and probably should) be written to the JSON. See "7.1.1.16 extension": "Any other element can be added to the JSON object as long as they do not clash with the elements names defined within table 1."
Explicit extensions were named throughout the standard:
The OGC OWS Context GeoJSON Encoding Standard 1.0 (14-055r2) was finalised and published 2017-04-06.
https://portal.opengeospatial.org/files/?artifact_id=68826
The current implementation in Backend and Webgui (from November 2016) rely on preliminary GeoJson results from Atom encoding mappings from OWS-10 TestBed working groups during the last years, before an official OWC GeoJson encoding was standardised. We are currently not supporting the ATOM encoding.
There are a couple of changes that have to be reflected in our implementation of OwcDocument and how it translates to JSON. The issues need to be reconciled in the Backend, Webgui and CSW Ingester.
Referenced from: https://github.com/ZGIS/smart-csw-ingester/issues/32
Referenced from: https://github.com/ZGIS/smart-portal-webgui/issues/63
Referenced from: https://github.com/ZGIS/smart-portal-backend/issues/25
[x] Throughout the standard the "OWS Context document" is being referred to constantly, however, the implementing class from the OWS Conceptual Model is named: Class OWC:Context
[x] besides the
updated
attribute, the context and entry properties also can have a 0..1date
attribute: Date or range of dates relevant to the Context resource (timeIntervalOfInterest)[x] check that we include the trailing slash in IRI context ids
[x].features[i].properties.links.via 0..* : This element is optional and references an external resource from which the Context document is derived (e.g. metadata document from which the metadata of the resource is derived).
[x].features[i].properties.links.alternates 0..* : Reference to a description of the Context resource in alternative format Array of link objects
[x].features[i].properties.links.previews 0..* : Reference to a quick-look or browse image representing the Context resource Array of link objects. The element
length
SHOULD be provided[x].features[i].properties.links.data 0..* : Reference to the location of the data resource described in the Context resource Array of link objects
[x] 7.1.10 DataType links: The "links" array is not an array anymore. It is an Object that contains different "keys" like "via" or "profile". These are then arrays of objects. The current "rel" of the "OwcLink" is now the "key". So what we need is an OwcLinks class, that basically contains a "map[String, OwcLink]". (this might be a bit tricky to implement see: http://stackoverflow.com/questions/27732552/how-to-parse-json-with-variable-keys-in-scala-play
[x] Links can now also have optional
lang
andlength
. Owc document links hasprofiles
andvia
. The via element is an array of link objects that contains four elements namedtype
,href
,title
andlang
[x].properties.links.profiles: The OwcDocument needs to have at least one link in its properties. Should look like
[x] 7.1.8 the "generator" properties element is now an object OWC:Creator/OWC:CreatorApplication:
[x] The list of OWC: Resource Class is mapped to an array of GeoJSON Feature objects (currently an array of our OwcEntry)
[x] the OwcEntry properties don't contain
subtitle
, but anabstract
[x].features[i].properties.active 0..1 : Flag value indicating to the client if the Context resource should be displayed by default (Boolean) Default value is ‘true’
[x] :.features[i].properties.folder
[x].features[i].properties.offering 0..* : Service or inline content offering for the resource targeted at OGC compliant clients owc:OfferingType - IMPORTANT, Offerings are INSIDE the entry properties, not parallel
[x] we don't have styleSet.styles[k] Array of style sets owc:StyleSetType in Offerings
[x] we don't implement Owc:ContentType.contents[k] Array of contents (inline or byRef)
owc:ContentType, also: request .request and result .result are of type owc:ContentType -> owc:Content elements
href
attribute is present, the element content SHALL be empty. Ifhref
is not provided, content SHALL be provided[x] author.properties.authors.name is array of obj {"name": "the name" (with email and uri as opt props)} , no contributors array anymore
[x] The HttpLink Offering is not needed. This GetFile thingy should be done by "xz.features[i].properties.links.data[j]"
[x] Same goes for the "NetCdfOffering"
[x] [ ] The UUID parameters that we need to save objects in the DB can (and probably should) be written to the JSON. See "7.1.1.16 extension": "Any other element can be added to the JSON object as long as they do not clash with the elements names defined within table 1."
Explicit extensions were named throughout the standard: