Skip to content

Commit

Permalink
improved validators
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholascar committed Oct 18, 2024
1 parent 46e4eca commit 58f0642
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 8 deletions.
4 changes: 4 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ tasks:
cmds:
- asciidoctor -o spec/spec.html spec/00-master.adoc
- echo "HTML remade"
rdfcheck:
desc: check the validity of an RDF file
cmds:
- python scripts/validate_rdf.py {{.CLI_ARGS}}
6 changes: 6 additions & 0 deletions scripts/validate_rdf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from rdflib import Graph
import sys

g = Graph().parse(sys.argv[1])
if len(g) > 0:
print("ok")
30 changes: 25 additions & 5 deletions validators/abis-validator.ttl → validators/abis.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,31 @@ ds:
:shape-01 ,
:shape-02 ,
:shape-03 ;
owl:imports [
schema:url
"file:///geo-validator.ttl" ,
"http://www.opengis.net/def/geosparql/validator" ;
] ;
owl:imports
[
schema:name "GeoSPARQL" ;
schema:url
"file:///geo.ttl" ,
"http://www.opengis.net/def/geosparql/validator" ;
] ,
[
schema:name "SOSA" ;
schema:url
"file:///sosa.ttl" ;
# "https://linked.data.gov.au/def/sosa-validator"
] ,
[
schema:name "TERN Ontology" ;
schema:url
"file:///tern.ttl" ;
# "https://w3id.org/tern/shapes/tern/" ;
] ,
[
schema:name "VocPub" ;
schema:url
"file:///vocpub.ttl" ,
"https://w3id.org/profile/vocpub/validator" ;
] ;
.

<https://linked.data.gov.au/org/ausbigg>
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions validators/sosa-validator.ttl → validators/sosa.ttl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PREFIX : <https://linked.data.gov.au/def/abis/sosa-validator/>
PREFIX ds: <https://linked.data.gov.au/def/abis/sosa-validator>
PREFIX : <https://linked.data.gov.au/def/sosa-validator/>
PREFIX ont: <https://linked.data.gov.au/def/sosa-validator>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <https://schema.org/>
Expand All @@ -9,7 +9,7 @@ PREFIX sosa: <http://www.w3.org/ns/sosa/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>


ds:
ont:
a owl:Ontology ;
schema:name "BDR SOSA Validator" ;
schema:description """This is a [Shapes Constraint Language (SHACL)](https://www.w3.org/TR/shacl/) file that specifies validation rules for testing RDF data claiming conformance to the W3C's Sensor, Observation, Sample, and Actuator (SOSA) ontology, as needed by the Biodiversity Data Repository (BDR)
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 58f0642

Please sign in to comment.