-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
3 changed files
with
86 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: shacl | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Validate against SHACL shape | ||
uses: konradhoeffner/shacl@v1 | ||
with: | ||
shacl: myshaclfile.ttl | ||
data: TACIO.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 @@ | ||
[![SHACL status](https://github.com/username/reponame/actions/workflows/workflowname.yml/badge.svg)](https://github.com/username/reponame/actions/workflows/workflowname.yml) |
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,65 @@ | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
@prefix cco: <http://www.ontologyrepository.com/CommonCoreOntologies/> . | ||
|
||
# Shapes Graph | ||
[] rdf:type sh:NodeShape ; | ||
sh:targetClass cco:ActOfEncoding ; | ||
sh:property [ | ||
sh:path rdfs:label ; | ||
sh:datatype xsd:string ; | ||
sh:minCount 1 ; | ||
sh:message "Instances of cco:ActOfEncoding must have a label." ; | ||
] ; | ||
sh:property [ | ||
sh:path cco:definition ; | ||
sh:datatype xsd:string ; | ||
sh:minCount 1 ; | ||
sh:message "Instances of cco:ActOfEncoding must have a definition." ; | ||
] . | ||
|
||
# Validate cco:ActOfCopying | ||
[] rdf:type sh:NodeShape ; | ||
sh:targetClass cco:ActOfCopying ; | ||
sh:property [ | ||
sh:path cco:definition ; | ||
sh:datatype xsd:string ; | ||
sh:minCount 1 ; | ||
sh:message "Instances of cco:ActOfCopying must have a definition." ; | ||
] ; | ||
sh:property [ | ||
sh:path rdfs:label ; | ||
sh:datatype xsd:string ; | ||
sh:minCount 1 ; | ||
sh:message "Instances of cco:ActOfCopying must have a label." ; | ||
] . | ||
|
||
# Object Property: cco:has_information_descendent_copy | ||
[] rdf:type sh:PropertyShape ; | ||
sh:targetObjectsOf cco:has_information_descendent_copy ; | ||
sh:class cco:ReferenceCarrier ; | ||
sh:message "Objects of cco:has_information_descendent_copy must be of type cco:ReferenceCarrier." . | ||
|
||
# Object Property: cco:is_a_canonical_copy_of | ||
[] rdf:type sh:PropertyShape ; | ||
sh:targetObjectsOf cco:is_a_canonical_copy_of ; | ||
sh:class cco:ReferenceCarrier ; | ||
sh:message "Objects of cco:is_a_canonical_copy_of must be of type cco:ReferenceCarrier." . | ||
|
||
# Validate Properties of cco:ReferenceCarrier | ||
[] rdf:type sh:NodeShape ; | ||
sh:targetClass cco:ReferenceCarrier ; | ||
sh:property [ | ||
sh:path rdfs:label ; | ||
sh:datatype xsd:string ; | ||
sh:minCount 1 ; | ||
sh:message "Instances of cco:ReferenceCarrier must have a label." ; | ||
] ; | ||
sh:property [ | ||
sh:path cco:definition ; | ||
sh:datatype xsd:string ; | ||
sh:minCount 1 ; | ||
sh:message "Instances of cco:ReferenceCarrier must have a definition." ; | ||
] . |