diff --git a/document.html b/document.html index e3917a3..b4e94e8 100644 --- a/document.html +++ b/document.html @@ -1433,7 +1433,7 @@

Contents

-

I.  Abstract

This best practice document on UML to JSON encoding rules is an initiative of Geonovum. The aim is to come to a standardized encoding from UML to JSON, in order to achieve technical interoperability in the chain from conceptual models to JSON implementation. In this document, JSON implementation includes plain JSON, GeoJSON and JSON-FG.

Application schemas in UML are used to model geospatial information for a given domain, as part of data specifications defining information and data content of a relevant universe of discourse. In the geospatial domain, UML profiles are defined by ISO 19103:2015 and ISO 19109:2015. These profiles are also used in this document. Application schemas operate at the conceptual level. At the implementation or data level, JSON is one of the major data encodings used by current web applications. The UML to JSON encoding rules defined in the context of this document is a best practice. Eventually, this document may also support the development of an international standard for the conversion of UML to JSON (Schema) in the geospatial domain.

To facilitate a proper JSON encoding, an extension of the ISO 19103 and 19109 UML profiles is proposed, resulting in a UML-JSON encoding profile.

The encoding rules are structured in 40 requirements and a number of recommendations, subdivided into 18 core requirements, 1 requirement specific for plain JSON schema format, 5 for GeoJSON format, 5 for JSON-FG Schema format, 3 requirements for binding and referencing of elements, 2 for union constructs, 5 for code lists and 1 for encoding a dedicated entity property in JSON. The requirement classes are supported by UML examples and subsequent JSON encodings.

II.  Keywords

The following are keywords to be used by search engines and +


I.  Abstract

This best practice document on UML to JSON encoding rules is an initiative of Geonovum. The aim is to come to a standardized encoding from UML to JSON, in order to achieve technical interoperability in the chain from conceptual models to JSON implementation. In this document, JSON implementation includes plain JSON, GeoJSON and JSON-FG.

Application schemas in UML are used to model geospatial information for a given domain, as part of data specifications defining information and data content of a relevant universe of discourse. In the geospatial domain, UML profiles are defined by ISO 19103:2015 and ISO 19109:2015. These profiles are also used in this document. Application schemas operate at the conceptual level. At the implementation or data level, JSON is one of the major data encodings used by current web applications. The UML to JSON encoding rules defined in the context of this document is a best practice. Eventually, this document may also support the development of an international standard for the conversion of UML to JSON (Schema) in the geospatial domain.

To facilitate a proper JSON encoding, an extension of the ISO 19103 and 19109 UML profiles is proposed, resulting in a UML-JSON encoding profile.

The encoding rules are structured in 40 requirements and a number of recommendations, subdivided into 18 core requirements, 1 requirement specific for plain JSON schema format, 5 for GeoJSON format, 5 for JSON-FG Schema format, 3 requirements for binding and referencing of elements, 2 for union constructs, 5 for code lists and 1 for encoding a dedicated entity property in JSON. The requirement classes are supported by UML examples and subsequent JSON encodings.

II.  Keywords

The following are keywords to be used by search engines and document catalogues.

ogcdoc, OGC document, UML, JSON, JSON Schema, encoding, GeoJSON, JSON-FG


III.  Preface

The project leading to this document was initiated by Geonovum. In collaboration with Interactive Instruments a best practice is developed on encoding UML to JSON. The project team consisted of the following persons:

This document defines how a conceptual schema in UML, compliant to ISO 19103:2015 and ISO 19109:2015, can be encoded in JSON. A number of requirements classes are defined, which contain the necessary requirements and technical details.

JSON is one of the major data encodings used by current web applications. In order to achieve a high level of interoperability when exchanging JSON encoded data between such applications, especially when the applications are developed by different entities, the semantics and structure of the data need to be well defined. In the geospatial domain, conceptual schemas are used to define application relevant information. Typically, some additional schema language is used to define the structures for encoding the information. For JSON encoded data, such a schema language is JSON Schema. Ideally, the JSON Schema constructs can automatically be derived from a conceptual schema. For that task, a set of encoding rules is needed.

Within the OGC, the UML-to-GML Application Schema Pilot 2020 (UGAS-2020) was the first innovation initiative that produced a comprehensive set of encoding rules, for the conversion of ISO 19109 compliant application schemas in UML to JSON Schema. The UGAS-2020 Engineering Report documents the findings of that initiative.

This document is based on and extends the results of UGAS-2020 regarding JSON Schema encoding rules. It defines the conversion behavior in an implementation agnostic way, adhering to the requirements defined in OGC 08-131r3 for writing OGC standards. This document thus represents the next step on the way to standardizing JSON Schema encoding rules in the geospatial domain.

IMPORTANT This working document is developed and maintained by Geonovum. It is intended for presentation to OGC later on, and will potentially be put forward into the OGC process.

Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. The Open Geospatial Consortium shall not be held responsible for identifying any or all such patent rights.

Recipients of this document are requested to submit, with their comments, notification of any relevant patent claims or other intellectual property rights of which they may be aware that might be infringed by any implementation of the standard set forth in this document, and to provide supporting documentation.

IV.  Security Considerations

No security considerations have been made for this document.

V.  Submitting Organizations

The following organizations submitted this Document to the +

This document defines how a conceptual schema in UML, compliant to ISO 19103:2015 and ISO 19109:2015, can be encoded in JSON. A number of requirements classes are defined, which contain the necessary requirements and technical details.

JSON is one of the major data encodings used by current web applications. In order to achieve a high level of interoperability when exchanging JSON encoded data between such applications, especially when the applications are developed by different entities, the semantics and structure of the data need to be well defined. In the geospatial domain, conceptual schemas are used to define application relevant information. Typically, some additional schema language is used to define the structures for encoding the information. For JSON encoded data, such a schema language is JSON Schema. Ideally, the JSON Schema constructs can automatically be derived from a conceptual schema. For that task, a set of encoding rules is needed.

Within the OGC, the UML-to-GML Application Schema Pilot 2020 (UGAS-2020) was the first innovation initiative that produced a comprehensive set of encoding rules, for the conversion of ISO 19109 compliant application schemas in UML to JSON Schema. The UGAS-2020 Engineering Report documents the findings of that initiative.

This document is based on and extends the results of UGAS-2020 regarding JSON Schema encoding rules. It defines the conversion behavior in an implementation agnostic way, adhering to the requirements defined in OGC 08-131r3 for writing OGC standards. This document thus represents the next step on the way to standardizing JSON Schema encoding rules in the geospatial domain.

IMPORTANT This working document is developed and maintained by Geonovum. It is intended for presentation to OGC later on, and will potentially be put forward into the OGC process.

Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. The Open Geospatial Consortium shall not be held responsible for identifying any or all such patent rights.

Recipients of this document are requested to submit, with their comments, notification of any relevant patent claims or other intellectual property rights of which they may be aware that might be infringed by any implementation of the standard set forth in this document, and to provide supporting documentation.

IV.  Security Considerations

No security considerations have been made for this document.

V.  Submitting Organizations

The following organizations submitted this Document to the Open Geospatial Consortium (OGC):

Best Practice for OGC - UML to JSON Encoding Rules

1.  Scope

This document defines requirements for encoding application schemas in UML, which conform to the UML profile defined by ISO 19103:2015 and potentially also ISO 19109:2015, as JSON schemas. The requirements classes cover the creation of JSON schemas for:

-

NOTE 3  A feature type that has multiple UML properties with tag “primaryGeometry” = true is not modeled correctly.

+

NOTE 3  A feature type that has multiple UML properties with tag “primaryGeometry” = true is not modeled correctly.

+ +

NOTE 4  Setting tagged value “primaryGeometry” = false can be useful in cases of geometric properties of classes that are (expected to be) subtyped, with the subtypes defining their own primary geometry properties. If the supertype had a geometric property without such a tagged value, the second part of the rule (for determining the primary geometry) would apply, thereby incorrectly identifying the supertype property as primary geometry. That can lead to undesired JSON Schema constraints.

7.3.9.  Primary temporal information

OGC 23-058r1 defines the concept of primary temporal information:

-

primary temporal information -the time instant or time interval that the publisher considers as the most important temporal characteristic of a feature

+

primary temporal information

+ +

the time instant or time interval that the publisher considers as the most important temporal characteristic of a feature

NOTE 1  A feature can be described by multiple temporal properties. For example, an event can have a property with an instant or interval when the event occurred or will occur and another property when the event was recorded in the dataset. The primary temporal information can also be built from two properties, e.g., when the feature has two properties describing the start and end instants of an interval.

— OGC API — Features — Part 5: Schemas, OGC 23-058r1, Section 4.1

diff --git a/sections/clause_7_normative_text.adoc b/sections/clause_7_normative_text.adoc index 8e283bb..64ac3c4 100644 --- a/sections/clause_7_normative_text.adoc +++ b/sections/clause_7_normative_text.adoc @@ -820,6 +820,8 @@ In order to identify the UML property that represents the primary geometry of a NOTE: A feature type that has multiple UML properties with tag "primaryGeometry" = true is not modeled correctly. +NOTE: Setting tagged value "primaryGeometry" = false can be useful in cases of geometric properties of classes that are (expected to be) subtyped, with the subtypes defining their own primary geometry properties. If the supertype had a geometric property without such a tagged value, the second part of the rule (for determining the primary geometry) would apply, thereby incorrectly identifying the supertype property as primary geometry. That can lead to undesired JSON Schema constraints. + [[jsonschema_req_core_primary_tempinfo]] ==== Primary temporal information @@ -830,6 +832,7 @@ NOTE: A feature type that has multiple UML properties with tag "primaryGeometry" ____ *primary temporal information* + the time instant or time interval that the publisher considers as the most important temporal characteristic of a *feature* NOTE: A feature can be described by multiple temporal properties. For example, an event can have a property with an instant or interval when the event occurred or will occur and another property when the event was recorded in the dataset. The primary temporal information can also be built from two properties, e.g., when the feature has two properties describing the start and end instants of an interval.