Skip to content

Commit

Permalink
Add ontology file and use it to replace the non existing describe
Browse files Browse the repository at this point in the history
  • Loading branch information
JervenBolleman committed Sep 25, 2024
1 parent fbb3a70 commit 68ad978
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
java-version: '21'

- name: Install tester
run: wget "https://github.com/sib-swiss/sparql-examples-utils/releases/download/v2.0.0/sparql-examples-utils-2.0.0-uber.jar" -O sparql-examples-utils.jar
run: wget "https://github.com/sib-swiss/sparql-examples-utils/releases/download/v2.0.5/sparql-examples-utils-2.0.5-uber.jar" -O sparql-examples-utils.jar

- name: Run tests
run: java -jar sparql-examples-utils.jar test --input-directory=examples/
2 changes: 1 addition & 1 deletion .github/workflows/publish_github_pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
java-version: '21'

- name: Install tester
run: wget "https://github.com/sib-swiss/sparql-examples-utils/releases/download/v2.0.0/sparql-examples-utils-2.0.0-uber.jar" -O sparql-examples-utils-uber.jar
run: wget "https://github.com/sib-swiss/sparql-examples-utils/releases/download/v2.0.5/sparql-examples-utils-2.0.5-uber.jar" -O sparql-examples-utils-uber.jar

- name: generate markdown
run: java -jar sparql-examples-utils-uber.jar convert -i examples/ -m
Expand Down
3 changes: 2 additions & 1 deletion examples/HAMAP/2.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix spex: <https://purl.expasy.org/sparql-examples/ontology#> .

ex:2 a sh:SPARQLExecutable ;
rdfs:comment "Show the triples about <a href=\"https://hamap.expasy.org/rule/\">MF_00001</a>"^^rdf:HTML ;
sh:describe "DESCRIBE <http://purl.uniprot.org/hamap/MF_00001>" ;
spex:describe "DESCRIBE <http://purl.uniprot.org/hamap/MF_00001>" ;
sh:prefixes _:sparql_examples_prefixes ;
schema:target <https://hamap.expasy.org/sparql/> .

3 changes: 2 additions & 1 deletion examples/UniProt/15_describe_an_EMBL_cds.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix spex: <https://purl.expasy.org/sparql-examples/ontology#> .

ex:15 a sh:SPARQLExecutable ;
rdfs:comment "Select all triples that relate to the EMBL CDS entry AA089367.1: "@en ;
sh:describe "DESCRIBE <http://purl.uniprot.org/embl-cds/AAO89367.1>" ;
spex:describe "DESCRIBE <http://purl.uniprot.org/embl-cds/AAO89367.1>" ;
schema:target <https://sparql.uniprot.org/sparql/> .

Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix spex: <https://purl.expasy.org/sparql-examples/ontology#> .

ex:16 a sh:SPARQLExecutable,
sh:SPARQLSelectExecutable ;
rdfs:comment "Select all triples that relate to the taxon that describes <i>Homo sapiens</i> in the named graph for <a href=\"http://sparql.uniprot.org/taxonomy\">taxonomy</a>"^^rdf:HTML ;
sh:describe """PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
spex:describe """PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
DESCRIBE taxon:9606
FROM <http://sparql.uniprot.org/taxonomy>""" ;
Expand Down
35 changes: 35 additions & 0 deletions examples/sparql-examples-ontology.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# baseURI: https://purl.expasy.org/sparql-examples/ontology#

@prefix spex: <https://purl.expasy.org/sparql-examples/ontology#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@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#> .

<https://purl.expasy.org/sparql-examples/ontology#> a owl:Ontology ;
<http://purl.org/dc/terms/license>
<http://creativecommons.org/publicdomain/zero/1.0/> ;
owl:versionInfo "1.0"^^xsd:string .

spex:describe
a rdf:Property ;
rdfs:label "describe"@en ;
rdfs:comment "The SPARQL describe query to execute"@en ;
rdfs:domain spex:SPARQLDescribeExecutable ;
rdfs:range xsd:string ;
rdfs:isDefinedBy spex: .

spex:SPARQLDescribeExecutable
a rdfs:Class ;
rdfs:label "SPARQL Describe executable"@en ;
rdfs:comment "The class of SPARQL executables that are based on Describe queries"@en ;
rdfs:subClassOf sh:SPARQLExecutable ;
rdfs:isDefinedBy spex: .

spex:federatesWith
a rdf:Property ;
rdfs:label "Endpoint a SPARQL Executable uses with SERVICE clauses."@en ;
rdfs:range sh:SPARQLExecutable ;
rdfs:comment "SPARQL endpoints used in an SPARQL executable which are not the direct target."@en ;
rdfs:isDefinedBy spex: .

0 comments on commit 68ad978

Please sign in to comment.