Skip to content

Commit

Permalink
Building blocks postprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Oct 4, 2024
1 parent cb6774a commit 9adcc56
Show file tree
Hide file tree
Showing 29 changed files with 311 additions and 208 deletions.
46 changes: 39 additions & 7 deletions build/bblocks.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"name": "Building Blocks - Building Blocks Examples",
"abstract": "This register provides a collection of **examples** designed to illustrate capabilities and implementation patterns for [Building Blocks (see more)](https://ogcincubator.github.io/bblocks-docs). \n\n*These buildings blocks may be copied and edited into a new repository based on the [template](https://github.com/opengeospatial/bblock-template) - but should not be referenced and extended for reuse*\n",
"description": "The aim of the highlighted examples is to illustrate implementation patterns for reusing OGC building blocks. The emphasis is on typical requirements to extend or constrain generic or abstract models such as OGC API Features, Observations etc. \n\n Other examples will illustrate different possible ways to use the Building Block machinery to semantically annotate externally defines schemas, develop and test logical constraints, or simply test examples using a published specification.\n\nMore complex examples will include transformation testing - testing a format can be transformed into a related structure and/or data model.\n",
"modified": "2024-10-04T07:59:28.174849",
"modified": "2024-10-04T08:22:56.120469",
"tooling": {
"bblocks-postprocess": {
"commitId": "\"5d47077eb2f3255708fae570e734806772b94223",
Expand Down Expand Up @@ -287,6 +287,38 @@
}
]
}
},
{
"id": "inline-transform",
"description": "A transform's code can also be defined inside the transform's object",
"type": "jq",
"code": ".test = \"test\"\n",
"inputs": {
"mediaTypes": [
{
"id": "json",
"defaultExtension": "json",
"label": "JSON",
"mimeType": "application/json",
"extensions": [
"json"
]
}
]
},
"outputs": {
"mediaTypes": [
{
"id": "json",
"defaultExtension": "json",
"label": "JSON",
"mimeType": "application/json",
"extensions": [
"json"
]
}
]
}
}
],
"documentation": {
Expand Down Expand Up @@ -515,9 +547,9 @@
"maturity": "development",
"scope": "unstable",
"dependsOn": [
"ogc.geo.features.feature",
"ogc.bbr.examples.propertySet",
"ogc.bbr.examples.feature.propertySet",
"ogc.bbr.examples.propertySet"
"ogc.geo.features.feature"
],
"tags": [
"feature",
Expand Down Expand Up @@ -638,8 +670,8 @@
]
},
"dependsOn": [
"ogc.geo.features.feature",
"ogc.bbr.examples.feature.propertySet"
"ogc.bbr.examples.feature.propertySet",
"ogc.geo.features.feature"
],
"ldContext": "https://ogcincubator.github.io/bblocks-examples/build/annotated/bbr/examples/feature/geosparqlFeature/context.jsonld",
"schema": {
Expand Down Expand Up @@ -692,8 +724,8 @@
"dependsOn": [
"ogc.sosa.features.observationCollection",
"ogc.bbr.examples.observation.vectorObservation",
"ogc.sosa.features.observation",
"ogc.sosa.properties.observation"
"ogc.sosa.properties.observation",
"ogc.sosa.features.observation"
],
"tags": [
"sosa",
Expand Down
72 changes: 36 additions & 36 deletions build/bblocks.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
rdfs:label "External Schema (Smart Data Models)" ;
dct:abstract "This example shows a simple customisation for OGC API Feature using an externally defined domain schema." ;
dct:created "2023-05-19T00:00:00+00:00"^^xsd:dateTime ;
dct:description [ dct:format "application/json" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/json-full/bbr/examples/feature/externalSchema/index.json" ],
dct:description [ dct:format "text/html" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/bblock/ogc.bbr.examples.feature.externalSchema" ],
[ dct:format "text/markdown" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/markdown/bbr/examples/feature/externalSchema/index.md" ],
[ dct:format "text/html" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/bblock/ogc.bbr.examples.feature.externalSchema" ] ;
[ dct:format "application/json" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/json-full/bbr/examples/feature/externalSchema/index.json" ] ;
dct:hasVersion "1.0" ;
dct:modified "2024-10-04"^^xsd:date ;
dct:source <https://docs.ogc.org/is/17-069r3/17-069r3.html#_response_7>,
Expand All @@ -41,10 +41,10 @@
rdfs:label "Custom Feature" ;
dct:abstract "This example shows a simple customisation method for OGC API Feature schemas" ;
dct:created "2023-05-19T00:00:00+00:00"^^xsd:dateTime ;
dct:description [ dct:format "text/markdown" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/markdown/bbr/examples/feature/geojsonFeature/index.md" ],
[ dct:format "text/html" ;
dct:description [ dct:format "text/html" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/bblock/ogc.bbr.examples.feature.geojsonFeature" ],
[ dct:format "text/markdown" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/markdown/bbr/examples/feature/geojsonFeature/index.md" ],
[ dct:format "application/json" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/json-full/bbr/examples/feature/geojsonFeature/index.json" ] ;
dct:hasVersion "1.0" ;
Expand All @@ -69,12 +69,12 @@
rdfs:label "Custom JSON-FG (lenient) Feature" ;
dct:abstract "This example shows a simple customisation method for a JSON-FG (lenient) feature" ;
dct:created "2024-07-25T00:00:00+00:00"^^xsd:dateTime ;
dct:description [ dct:format "application/json" ;
dct:description [ dct:format "text/markdown" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/markdown/bbr/examples/feature/geojsonFeatureFGLenient/index.md" ],
[ dct:format "application/json" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/json-full/bbr/examples/feature/geojsonFeatureFGLenient/index.json" ],
[ dct:format "text/html" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/bblock/ogc.bbr.examples.feature.geojsonFeatureFGLenient" ],
[ dct:format "text/markdown" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/markdown/bbr/examples/feature/geojsonFeatureFGLenient/index.md" ] ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/bblock/ogc.bbr.examples.feature.geojsonFeatureFGLenient" ] ;
dct:hasVersion "1.0" ;
dct:modified "2024-10-04"^^xsd:date ;
skos:inScheme <https://ogcincubator.github.io/bblocks-examples/> ;
Expand All @@ -95,12 +95,12 @@
rdfs:label "GeoJSON transformed to GeoSPARQL geometry" ;
dct:abstract "This example includes an uplift step to use a GeoSPARQL geometry in a GeoJSON object" ;
dct:created "2024-07-30T00:00:00+00:00"^^xsd:dateTime ;
dct:description [ dct:format "application/json" ;
dct:description [ dct:format "text/markdown" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/markdown/bbr/examples/feature/geosparqlFeature/index.md" ],
[ dct:format "application/json" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/json-full/bbr/examples/feature/geosparqlFeature/index.json" ],
[ dct:format "text/html" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/bblock/ogc.bbr.examples.feature.geosparqlFeature" ],
[ dct:format "text/markdown" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/markdown/bbr/examples/feature/geosparqlFeature/index.md" ] ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/bblock/ogc.bbr.examples.feature.geosparqlFeature" ] ;
dct:hasVersion "1.0" ;
dct:modified "2024-10-04"^^xsd:date ;
skos:inScheme <https://ogcincubator.github.io/bblocks-examples/> ;
Expand All @@ -122,10 +122,10 @@
rdfs:label "Custom Result for Observation Feature" ;
dct:abstract "This building block defines an example specialisation of an existing Feature specialisation (SOSA Observation), using another schema to define a result set - in this case the GeoPose model" ;
dct:created "2023-05-19T00:00:00+00:00"^^xsd:dateTime ;
dct:description [ dct:format "text/html" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/bblock/ogc.bbr.examples.observation.vectorObservationFeature" ],
[ dct:format "application/json" ;
dct:description [ dct:format "application/json" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/json-full/bbr/examples/observation/vectorObservationFeature/index.json" ],
[ dct:format "text/html" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/bblock/ogc.bbr.examples.observation.vectorObservationFeature" ],
[ dct:format "text/markdown" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/markdown/bbr/examples/observation/vectorObservationFeature/index.md" ] ;
dct:hasVersion "1.0" ;
Expand Down Expand Up @@ -176,12 +176,12 @@
rdfs:label "Transforms example" ;
dct:abstract "A sample building block to showcase transforms" ;
dct:created "2024-10-03T11:31:00+02:00"^^xsd:dateTime ;
dct:description [ dct:format "text/markdown" ;
dct:description [ dct:format "text/html" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/bblock/ogc.bbr.examples.transforms.transforms-example" ],
[ dct:format "text/markdown" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/markdown/bbr/examples/transforms/transforms-example/index.md" ],
[ dct:format "application/json" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/json-full/bbr/examples/transforms/transforms-example/index.json" ],
[ dct:format "text/html" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/bblock/ogc.bbr.examples.transforms.transforms-example" ] ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/json-full/bbr/examples/transforms/transforms-example/index.json" ] ;
dct:hasVersion "0.1" ;
dct:modified "2024-10-04"^^xsd:date ;
skos:inScheme <https://ogcincubator.github.io/bblocks-examples/> ;
Expand All @@ -199,12 +199,12 @@
rdfs:label "Observation Result (Vector based on GeoPose)" ;
dct:abstract "This building block defines the *property set* for an example specialisation of a SOSA Observation using the GeoPose standard as a result. These two patterns are defined by other Building Blocks." ;
dct:created "2023-05-19T00:00:00+00:00"^^xsd:dateTime ;
dct:description [ dct:format "application/json" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/json-full/bbr/examples/observation/vectorObservation/index.json" ],
[ dct:format "text/html" ;
dct:description [ dct:format "text/html" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/bblock/ogc.bbr.examples.observation.vectorObservation" ],
[ dct:format "text/markdown" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/markdown/bbr/examples/observation/vectorObservation/index.md" ] ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/markdown/bbr/examples/observation/vectorObservation/index.md" ],
[ dct:format "application/json" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/json-full/bbr/examples/observation/vectorObservation/index.json" ] ;
dct:hasVersion "1.0" ;
dct:modified "2024-10-04"^^xsd:date ;
skos:inScheme <https://ogcincubator.github.io/bblocks-examples/> ;
Expand Down Expand Up @@ -237,10 +237,10 @@
dct:created "2023-05-19T00:00:00+00:00"^^xsd:dateTime ;
dct:description [ dct:format "text/markdown" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/markdown/bbr/examples/feature/propertySet/index.md" ],
[ dct:format "text/html" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/bblock/ogc.bbr.examples.feature.propertySet" ],
[ dct:format "application/json" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/json-full/bbr/examples/feature/propertySet/index.json" ] ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/build/generateddocs/json-full/bbr/examples/feature/propertySet/index.json" ],
[ dct:format "text/html" ;
rdfs:isDefinedBy "https://ogcincubator.github.io/bblocks-examples/bblock/ogc.bbr.examples.feature.propertySet" ] ;
dct:hasVersion "1.0" ;
dct:modified "2024-10-04"^^xsd:date ;
dct:source <https://www.w3.org/TR/vocab-ssn/> ;
Expand Down Expand Up @@ -276,15 +276,15 @@ More complex examples will include transformation testing - testing a format can
<https://opengeospatial.github.io/ogcapi-sosa/build/register.json> .

[] a prov:Activity ;
prov:endedAtTime "2024-10-04T07:59:40.106892"^^xsd:dateTime ;
prov:startedAtTime "2024-10-04T07:59:40.036689"^^xsd:dateTime ;
prov:endedAtTime "2024-10-04T08:23:02.267844"^^xsd:dateTime ;
prov:startedAtTime "2024-10-04T08:23:02.199179"^^xsd:dateTime ;
prov:used [ a prov:Entity ;
dct:format "application/yaml" ;
rdfs:seeAlso <file:///src/ogc/bblocks/register-context.yaml> ],
[ a prov:Entity ;
dct:format "application/json" ;
dct:hasVersion "git:b9f0bf18c6c52ba6f2e757f297d641d98ca39528" ;
rdfs:seeAlso <https://ogcincubator.github.io/bblocks-examples/build/register.json> ] ;
dct:hasVersion "git:cb6774a1be9b99bec2cc89b729564fc2bb4e723c" ;
rdfs:seeAlso <https://ogcincubator.github.io/bblocks-examples/build/register.json> ],
[ a prov:Entity ;
dct:format "application/yaml" ;
rdfs:seeAlso <file:///src/ogc/bblocks/register-context.yaml> ] ;
prov:wasAssociatedWith [ a prov:Agent,
schema:SoftwareApplication ;
rdfs:label "OGC-NA tools" ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"maturity": "development",
"scope": "unstable",
"dependsOn": [
"ogc.geo.features.feature",
"ogc.bbr.examples.propertySet",
"ogc.bbr.examples.feature.propertySet",
"ogc.bbr.examples.propertySet"
"ogc.geo.features.feature"
],
"tags": [
"feature",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
]
},
"dependsOn": [
"ogc.geo.features.feature",
"ogc.bbr.examples.feature.propertySet"
"ogc.bbr.examples.feature.propertySet",
"ogc.geo.features.feature"
],
"ldContext": "https://ogcincubator.github.io/bblocks-examples/build/annotated/bbr/examples/feature/geosparqlFeature/context.jsonld",
"schema": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"dependsOn": [
"ogc.sosa.features.observationCollection",
"ogc.bbr.examples.observation.vectorObservation",
"ogc.sosa.features.observation",
"ogc.sosa.properties.observation"
"ogc.sosa.properties.observation",
"ogc.sosa.features.observation"
],
"tags": [
"sosa",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,38 @@
}
]
}
},
{
"id": "inline-transform",
"description": "A transform's code can also be defined inside the transform's object",
"type": "jq",
"code": ".test = \"test\"\n",
"inputs": {
"mediaTypes": [
{
"id": "json",
"defaultExtension": "json",
"label": "JSON",
"mimeType": "application/json",
"extensions": [
"json"
]
}
]
},
"outputs": {
"mediaTypes": [
{
"id": "json",
"defaultExtension": "json",
"label": "JSON",
"mimeType": "application/json",
"extensions": [
"json"
]
}
]
}
}
],
"examples": [
Expand All @@ -128,7 +160,8 @@
"language": "json",
"code": "{\n \"one\": 1,\n \"two\": 2,\n \"string\": \"value\"\n}",
"transformResults": {
"prefix-keys": "https://ogcincubator.github.io/bblocks-examples/build/tests/bbr/examples/transforms/transforms-example/transforms/example_1_1.prefix-keys.json"
"prefix-keys": "https://ogcincubator.github.io/bblocks-examples/build/tests/bbr/examples/transforms/transforms-example/transforms/example_1_1.prefix-keys.json",
"inline-transform": "https://ogcincubator.github.io/bblocks-examples/build/tests/bbr/examples/transforms/transforms-example/transforms/example_1_1.inline-transform.json"
},
"url": "https://ogcincubator.github.io/bblocks-examples/build/tests/bbr/examples/transforms/transforms-example/example_1_1.json"
},
Expand Down
Loading

0 comments on commit 9adcc56

Please sign in to comment.