Add json-ld templating for feature collection item (#868)
* Render template if specified in config and provide example config Update linked_data.py Merge branch 'geopython:master' into jsonld Rended from json-ld output Render jinja2 json-ld template from json-ld output instead of json output Merge branch 'geopython:master' into jsonld Add documentation - Add documentation - Add test to workflow Update pygeoapi-test-config.yml Update test_api.py Update api.py Update linked_data.py Move template declaration in configuration Update docs Update configuration.rst Update configuration.rst * Updates per requested changes * Fix spelling * Fix json-ld template pathing * Remove root path for the templating * Move json-ld template from api.py - Move single item json-ld templating to inside geojson2jsonld - Reformat json-ld configuration for context and item_template to children of json-ld block - Update docs and example configurations * Fix ref * Use FileSystemLoader to control template search path search for templates is in order of `template_paths` list * s/json-ld/linked-data/ig rename json-ld to more generic name
This commit is contained in:
@@ -97,11 +97,12 @@ resources:
|
||||
keywords:
|
||||
- observations
|
||||
- monitoring
|
||||
context:
|
||||
- datetime: https://schema.org/DateTime
|
||||
- vocab: https://example.com/vocab#
|
||||
stn_id: "vocab:stn_id"
|
||||
value: "vocab:value"
|
||||
linked-data:
|
||||
context:
|
||||
- datetime: https://schema.org/DateTime
|
||||
- vocab: https://example.com/vocab#
|
||||
stn_id: "vocab:stn_id"
|
||||
value: "vocab:value"
|
||||
links:
|
||||
- type: text/csv
|
||||
rel: canonical
|
||||
|
||||
@@ -103,11 +103,12 @@ resources:
|
||||
- Things
|
||||
- SensorThings
|
||||
- BRGM
|
||||
context:
|
||||
- sosa: "http://www.w3.org/ns/sosa/"
|
||||
ssn: "http://www.w3.org/ns/ssn/"
|
||||
Datastreams: sosa:ObservationCollection
|
||||
name: schema:name
|
||||
linked-data:
|
||||
context:
|
||||
- sosa: "http://www.w3.org/ns/sosa/"
|
||||
ssn: "http://www.w3.org/ns/ssn/"
|
||||
Datastreams: sosa:ObservationCollection
|
||||
name: schema:name
|
||||
links:
|
||||
- type: application/html
|
||||
rel: canonical
|
||||
@@ -140,12 +141,13 @@ resources:
|
||||
- Datastreams
|
||||
- SensorThings
|
||||
- BRGM
|
||||
context:
|
||||
- sosa: http://www.w3.org/ns/sosa/
|
||||
ssn: http://www.w3.org/ns/ssn/
|
||||
Observations: sosa:hasMember
|
||||
Thing: sosa:hasFeatureOfInterest
|
||||
name: schema:name
|
||||
linked-data:
|
||||
context:
|
||||
- sosa: http://www.w3.org/ns/sosa/
|
||||
ssn: http://www.w3.org/ns/ssn/
|
||||
Observations: sosa:hasMember
|
||||
Thing: sosa:hasFeatureOfInterest
|
||||
name: schema:name
|
||||
links:
|
||||
- type: application/html
|
||||
rel: canonical
|
||||
@@ -181,11 +183,12 @@ resources:
|
||||
- Observations
|
||||
- SensorThings
|
||||
- BRGM
|
||||
context:
|
||||
- sosa: http://www.w3.org/ns/sosa/
|
||||
ssn: http://www.w3.org/ns/ssn/
|
||||
Datastream: sosa:isMemberOf
|
||||
name: schema:name
|
||||
linked-data:
|
||||
context:
|
||||
- sosa: http://www.w3.org/ns/sosa/
|
||||
ssn: http://www.w3.org/ns/ssn/
|
||||
Datastream: sosa:isMemberOf
|
||||
name: schema:name
|
||||
links:
|
||||
- type: application/html
|
||||
rel: canonical
|
||||
|
||||
@@ -97,11 +97,12 @@ resources:
|
||||
- Things
|
||||
- SensorThings
|
||||
- IoW
|
||||
context:
|
||||
- sosa: "http://www.w3.org/ns/sosa/"
|
||||
ssn: "http://www.w3.org/ns/ssn/"
|
||||
Datastreams: sosa:ObservationCollection
|
||||
name: schema:name
|
||||
linked-data:
|
||||
context:
|
||||
- sosa: "http://www.w3.org/ns/sosa/"
|
||||
ssn: "http://www.w3.org/ns/ssn/"
|
||||
Datastreams: sosa:ObservationCollection
|
||||
name: schema:name
|
||||
links:
|
||||
- type: application/html
|
||||
rel: canonical
|
||||
@@ -134,12 +135,13 @@ resources:
|
||||
- Datastreams
|
||||
- SensorThings
|
||||
- IoW
|
||||
context:
|
||||
- sosa: http://www.w3.org/ns/sosa/
|
||||
ssn: http://www.w3.org/ns/ssn/
|
||||
Observations: sosa:hasMember
|
||||
Thing: sosa:hasFeatureOfInterest
|
||||
name: schema:name
|
||||
linked-data:
|
||||
context:
|
||||
- sosa: http://www.w3.org/ns/sosa/
|
||||
ssn: http://www.w3.org/ns/ssn/
|
||||
Observations: sosa:hasMember
|
||||
Thing: sosa:hasFeatureOfInterest
|
||||
name: schema:name
|
||||
links:
|
||||
- type: application/html
|
||||
rel: canonical
|
||||
@@ -176,11 +178,12 @@ resources:
|
||||
- Observations
|
||||
- SensorThings
|
||||
- IoW
|
||||
context:
|
||||
- sosa: http://www.w3.org/ns/sosa/
|
||||
ssn: http://www.w3.org/ns/ssn/
|
||||
Datastream: sosa:isMemberOf
|
||||
name: schema:name
|
||||
linked-data:
|
||||
context:
|
||||
- sosa: http://www.w3.org/ns/sosa/
|
||||
ssn: http://www.w3.org/ns/ssn/
|
||||
Datastream: sosa:isMemberOf
|
||||
name: schema:name
|
||||
links:
|
||||
- type: application/html
|
||||
rel: canonical
|
||||
|
||||
@@ -97,11 +97,12 @@ resources:
|
||||
keywords:
|
||||
- Things
|
||||
- SensorThings
|
||||
context:
|
||||
- sosa: "http://www.w3.org/ns/sosa/"
|
||||
ssn: "http://www.w3.org/ns/ssn/"
|
||||
Datastreams: sosa:ObservationCollection
|
||||
name: schema:name
|
||||
linked-data:
|
||||
context:
|
||||
- sosa: "http://www.w3.org/ns/sosa/"
|
||||
ssn: "http://www.w3.org/ns/ssn/"
|
||||
Datastreams: sosa:ObservationCollection
|
||||
name: schema:name
|
||||
links:
|
||||
- type: application/html
|
||||
rel: canonical
|
||||
@@ -132,12 +133,13 @@ resources:
|
||||
keywords:
|
||||
- Datastreams
|
||||
- SensorThings
|
||||
context:
|
||||
- sosa: http://www.w3.org/ns/sosa/
|
||||
ssn: http://www.w3.org/ns/ssn/
|
||||
Observations: sosa:hasMember
|
||||
Thing: sosa:hasFeatureOfInterest
|
||||
name: schema:name
|
||||
linked-data:
|
||||
context:
|
||||
- sosa: http://www.w3.org/ns/sosa/
|
||||
ssn: http://www.w3.org/ns/ssn/
|
||||
Observations: sosa:hasMember
|
||||
Thing: sosa:hasFeatureOfInterest
|
||||
name: schema:name
|
||||
links:
|
||||
- type: application/html
|
||||
rel: canonical
|
||||
@@ -172,11 +174,12 @@ resources:
|
||||
keywords:
|
||||
- Observations
|
||||
- SensorThings
|
||||
context:
|
||||
- sosa: http://www.w3.org/ns/sosa/
|
||||
ssn: http://www.w3.org/ns/ssn/
|
||||
Datastream: sosa:isMemberOf
|
||||
name: schema:name
|
||||
linked-data:
|
||||
context:
|
||||
- sosa: http://www.w3.org/ns/sosa/
|
||||
ssn: http://www.w3.org/ns/ssn/
|
||||
Datastream: sosa:isMemberOf
|
||||
name: schema:name
|
||||
links:
|
||||
- type: application/html
|
||||
rel: canonical
|
||||
|
||||
@@ -108,11 +108,12 @@ resources:
|
||||
keywords:
|
||||
- observations
|
||||
- monitoring
|
||||
context:
|
||||
- datetime: https://schema.org/DateTime
|
||||
- vocab: https://example.com/vocab#
|
||||
stn_id: "vocab:stn_id"
|
||||
value: "vocab:value"
|
||||
linked-data:
|
||||
context:
|
||||
- datetime: https://schema.org/DateTime
|
||||
- vocab: https://example.com/vocab#
|
||||
stn_id: "vocab:stn_id"
|
||||
value: "vocab:value"
|
||||
links:
|
||||
- type: text/csv
|
||||
rel: canonical
|
||||
|
||||
Reference in New Issue
Block a user