generated from opengeospatial/bblock-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
acfb5f0
commit c82d6e8
Showing
9 changed files
with
245 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"$schema": "metaschema.yaml", | ||
"name": "9 - Schema-agnostic (Semantic) Building Block", | ||
"highlighted": true, | ||
"abstract": "A building block defining a building block for a data model described in ontology standards OWL and SHACL. Such a building block allows logical constraints to be inherited by multiple implementation schemas using semantic annotations (such as JSON-LD)", | ||
"status": "under-development", | ||
"dateTimeAddition": "2023-04-05T00:00:00Z", | ||
"itemClass": "model", | ||
"register": "building-blocks-tutorial", | ||
"version": "0.1", | ||
"dateOfLastChange": "2023-04-05", | ||
"ontology": "ontology.ttl", | ||
"sources": [ | ||
{ | ||
"title": "Sample source document", | ||
"link": "https://example.com/sources/1" | ||
} | ||
], | ||
"maturity": "mature", | ||
"scope": "unstable", | ||
"tags": ["building-blocks-tutorial", | ||
"templates" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## Exercise 4 | ||
|
||
Goal: Define a Building Block for a semantic data model | ||
|
||
This approach is appropriate where a given schema is one of many possible schemas for the same underlying semantic model, and allows defining the model and logical constraints independently, with re-usable validation rules and unit testing advantages. | ||
|
||
### Steps | ||
- uncomment line | ||
- examine file "ontology.ttl" | ||
- run build | ||
- run viewer | ||
- navigate to "Exercise 9"/Ontology and examine classes | ||
- view validation results on "about tab" | ||
- view validation results at [Validation Report](validation) or [build-local/...](/register/build-local/tests/bbr/template/exercise3/_report.json) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
$schema: https://raw.githubusercontent.com/opengeospatial/bblocks-postprocess/refs/heads/master/ogc/bblocks/schemas/examples.schema.yaml | ||
## Prefixes for examples | ||
prefixes: | ||
mynamespace: http://example.org/ns1/ | ||
## List of examples | ||
examples: | ||
- title: Example | ||
|
||
snippets: | ||
- language: ttl | ||
ref: examples/example.ttl | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix : <https://w3id.org/example#> . | ||
@prefix eg: <https://w3id.org/example-data#> . | ||
|
||
eg:Fred | ||
a :Researcher ; | ||
:partOf eg:GnomesInc ; | ||
rdfs:label "Fred the Gardener" . | ||
|
||
eg:GnomesInc | ||
a :Organization ; | ||
rdfs:label "Gnomes Inc. Gardeners to the Stars" . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
@prefix : <https://w3id.org/example#> . | ||
@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix xml: <http://www.w3.org/XML/1998/namespace> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@base <https://w3id.org/example> . | ||
|
||
<https://w3id.org/example> rdf:type owl:Ontology ; | ||
owl:versionIRI <https://w3id.org/example/1.0.0> ; | ||
<http://purl.org/dc/elements/1.1/abstract> "An example vocabulary designed to illustrate how to publish vocabularies on the Web following the FAIR principles"@en ; | ||
<http://purl.org/dc/elements/1.1/description> "This is an example ontology to illustrate some of the annotations that should be included"@en ; | ||
<http://purl.org/dc/elements/1.1/title> "The example ontology"@en ; | ||
<http://purl.org/dc/terms/created> "February 4th, 2020"@en ; | ||
<http://purl.org/dc/terms/creator> "Daniel Garijo"@en , | ||
"Maria Poveda-Villalon"@en ; | ||
<http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by/2.0/> ; | ||
<http://purl.org/vocab/vann/preferredNamespacePrefix> "exo"@en ; | ||
<http://purl.org/vocab/vann/preferredNamespaceUri> "https://w3id.org/example" ; | ||
<http://schema.org/citation> "Cite this vocabulary as: Garijo, D. and Poveda-Villalon, M. The example ontology 1.0.0."@en ; | ||
rdfs:comment "An example vocabulary designed to illustrate how to publish vocabularies on the Web following the FAIR principles. This vocabulary describes two simple classes with 2 properties and a data property."@en ; | ||
owl:versionInfo "1.0.0"@en . | ||
|
||
################################################################# | ||
# Annotation properties | ||
################################################################# | ||
|
||
### http://purl.org/dc/elements/1.1/abstract | ||
<http://purl.org/dc/elements/1.1/abstract> rdf:type owl:AnnotationProperty . | ||
|
||
|
||
### http://purl.org/dc/elements/1.1/created | ||
<http://purl.org/dc/elements/1.1/created> rdf:type owl:AnnotationProperty . | ||
|
||
|
||
### http://purl.org/dc/elements/1.1/description | ||
<http://purl.org/dc/elements/1.1/description> rdf:type owl:AnnotationProperty . | ||
|
||
|
||
### http://purl.org/dc/elements/1.1/publisher | ||
<http://purl.org/dc/elements/1.1/publisher> rdf:type owl:AnnotationProperty . | ||
|
||
|
||
### http://purl.org/dc/elements/1.1/title | ||
<http://purl.org/dc/elements/1.1/title> rdf:type owl:AnnotationProperty . | ||
|
||
|
||
### http://purl.org/dc/terms/created | ||
<http://purl.org/dc/terms/created> rdf:type owl:AnnotationProperty . | ||
|
||
|
||
### http://purl.org/dc/terms/creator | ||
<http://purl.org/dc/terms/creator> rdf:type owl:AnnotationProperty . | ||
|
||
|
||
### http://purl.org/dc/terms/license | ||
<http://purl.org/dc/terms/license> rdf:type owl:AnnotationProperty . | ||
|
||
|
||
### http://purl.org/vocab/vann/example | ||
<http://purl.org/vocab/vann/example> rdf:type owl:AnnotationProperty . | ||
|
||
|
||
### http://purl.org/vocab/vann/preferredNamespacePrefix | ||
<http://purl.org/vocab/vann/preferredNamespacePrefix> rdf:type owl:AnnotationProperty . | ||
|
||
|
||
### http://purl.org/vocab/vann/preferredNamespaceUri | ||
<http://purl.org/vocab/vann/preferredNamespaceUri> rdf:type owl:AnnotationProperty . | ||
|
||
|
||
### http://schema.org/author | ||
<http://schema.org/author> rdf:type owl:AnnotationProperty . | ||
|
||
|
||
### http://schema.org/citation | ||
<http://schema.org/citation> rdf:type owl:AnnotationProperty . | ||
|
||
|
||
### http://www.linkedmodel.org/schema/vaem#rationale | ||
<http://www.linkedmodel.org/schema/vaem#rationale> rdf:type owl:AnnotationProperty . | ||
|
||
|
||
################################################################# | ||
# Datatypes | ||
################################################################# | ||
|
||
### http://www.w3.org/2001/XMLSchema#date | ||
xsd:date rdf:type rdfs:Datatype . | ||
|
||
|
||
################################################################# | ||
# Object Properties | ||
################################################################# | ||
|
||
### https://w3id.org/example#hasMember | ||
:hasMember rdf:type owl:ObjectProperty ; | ||
rdfs:domain :Organization ; | ||
rdfs:range :Researcher ; | ||
rdfs:comment "This example property indicates that an Organization has a Researcher as member"@en ; | ||
rdfs:label "has member"@en . | ||
|
||
|
||
### https://w3id.org/example#partOf | ||
:partOf rdf:type owl:ObjectProperty ; | ||
rdfs:domain :Researcher ; | ||
rdfs:range :Organization ; | ||
rdfs:comment "This property links instances from Researcher to Organization"@en ; | ||
rdfs:label "part of"@en . | ||
|
||
|
||
################################################################# | ||
# Data properties | ||
################################################################# | ||
|
||
### https://w3id.org/example#foundedIn | ||
:foundedIn rdf:type owl:DatatypeProperty ; | ||
rdfs:domain :Organization ; | ||
rdfs:range xsd:date ; | ||
rdfs:comment "Date when an organization was founded"@en ; | ||
rdfs:label "founded in"@en . | ||
|
||
|
||
################################################################# | ||
# Classes | ||
################################################################# | ||
|
||
### https://w3id.org/example#Organization | ||
:Organization rdf:type owl:Class ; | ||
<http://purl.org/vocab/vann/example> "University of Southern California"@en ; | ||
rdfs:comment "An organized body of people with a particular purpose, especially a business, society, association, etc."@en ; | ||
rdfs:label "Organization"@en . | ||
|
||
|
||
### https://w3id.org/example#Researcher | ||
:Researcher rdf:type owl:Class ; | ||
<http://purl.org/vocab/vann/example> "An example using the Researcher class, e.g., Bob is a professor at the University of Southern California."@en ; | ||
<http://www.linkedmodel.org/schema/vaem#rationale> "The reason why this concept was added to the ontology. This could reflect some agreement or use cases that may need to be reflected here. For example: The concept Researcher was added to the ontology to represent those authors of scientific publications that belong to a public institution."@en ; | ||
rdfs:comment "A definition of your class. For example, A researcher is a person who publishes scientific papers, writes research proposals and mentors students"@en ; | ||
rdfs:label "Researcher"@en . | ||
|
||
|
||
### Generated by the OWL API (version 5.1.14) https://github.com/owlcs/owlapi/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
@prefix : <https://w3id.org/example#> . | ||
@base <https://www.ogc.org/rules/template/> . | ||
|
||
<#testValues> | ||
a sh:NodeShape ; | ||
sh:targetClass :Researcher ; | ||
sh:message "Researchers must belong to at least one named Organization" ; | ||
sh:property [ sh:path :partOf ; | ||
sh:class :Organization ; | ||
sh:minCount 1 ] | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Tests | ||
|
||
These tests are not show in the examples for the building block but provide a way to test the building block. | ||
|
||
tests ending with -fail.(extension) must fail as expected for validation to pass. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix : <https://w3id.org/example#> . | ||
@prefix eg: <https://w3id.org/example-data#> . | ||
|
||
eg:Fred | ||
a :Researcher ; | ||
rdfs:label "Fred the Gardener" . | ||
|
||
eg:GnomesInc | ||
rdfs:label "Gnomes Inc. Gardeners to the Stars" . |