From 07448205ebebf431118157704e1b5f35c50fce42 Mon Sep 17 00:00:00 2001 From: Rob Atkinson Date: Tue, 30 Jul 2024 08:58:22 +1000 Subject: [PATCH] Make agentType symmetrical form to other tying. update docs, note rationale for changes from PROV-JSON --- README.md | 18 ++++++++++++++++-- _sources/schema.json | 10 ++++++++++ build.sh | 2 ++ view.sh | 1 + 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 build.sh create mode 100644 view.sh diff --git a/README.md b/README.md index b03b55f..d4608a2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # OGC Building Block template -This repository defines a "building block" for use of [PROV-O Vocabulary](https://www.w3.org/TR/prov-o/) in a JSON or JSON-LD implementation. +This repository defines a "building block" for use of [PROV-O Vocabulary](https://www.w3.org/TR/prov-o/) using a schema valid for either JSON or JSON-LD implementation. (See ["Other Prov JSON serialisations"](#other-prov-json-serialisations) ) + + The "ready-to-use" form is generated [here:](https://ogcincubator.github.io/bblock-prov-schema/build/generateddocs/slate-build/ogc-utils/prov/index.html) @@ -10,8 +12,20 @@ Such a schema is complex, and the purpose of this building block is to provide a The **JSON-LD** context binds these structures to the PROV-O vocabulary. -The **SHACL** rules perform consistency checking above and beyond schema validation. +If provided **SHACL** rules perform consistency checking above and beyond schema validation. + +## Other Prov JSON serialisations + +NB. The W3C PROV working group published two early project drafts for JSON and JSON-LD serialisations, however these are not ideal solutions because: + +- the JSON is not directly mappable to the PROV-O ontology via JSON-LD +- the JSON-LD serialisation is -LD specific and not compatible with normal JSON schemas. +- neither is supported by a formally published JSON Schema. +- neither schema supports annotation of existing objects as prov:Entities - requiring specialised structures to register all entities under a "entities" property. + +This building block defines a schema that avoids all these limitations. Users may choose to define a building block that allows either one of the published JSON forms or this schema for backwards compatibility, however there is little evidence of significant usage of the published drafts. +## General [OGC Building Blocks](https://opengeospatial.github.io/bblocks) are defined by the Open Geospatial Consortium to support implementation of customised applications consistent with OGC specifications. diff --git a/_sources/schema.json b/_sources/schema.json index 67ccf85..19971cd 100644 --- a/_sources/schema.json +++ b/_sources/schema.json @@ -703,6 +703,16 @@ "required": [ "type" ] + }, + { + "properties": { + "agentType": { + "$ref": "#/$defs/AgentType" + } + }, + "required": [ + "agentType" + ] }, { "properties": { diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..e797fa2 --- /dev/null +++ b/build.sh @@ -0,0 +1,2 @@ +# Process building blocks +docker run --pull=always --rm --workdir /workspace -v "$(pwd):/workspace" ghcr.io/opengeospatial/bblocks-postprocess --clean true --base-url http://localhost:9090/register/ \ No newline at end of file diff --git a/view.sh b/view.sh new file mode 100644 index 0000000..4dbaa8b --- /dev/null +++ b/view.sh @@ -0,0 +1 @@ +docker run --rm --pull=always -v "$(pwd):/register" -p 9090:9090 ghcr.io/ogcincubator/bblocks-viewer \ No newline at end of file