From 68ad978f443b4e399174176390c7efdc4cdce058 Mon Sep 17 00:00:00 2001 From: Jerven Bolleman Date: Wed, 25 Sep 2024 12:53:10 +0200 Subject: [PATCH] Add ontology file and use it to replace the non existing describe --- .github/workflows/check.yml | 2 +- .github/workflows/publish_github_pages.yaml | 2 +- examples/HAMAP/2.ttl | 3 +- examples/UniProt/15_describe_an_EMBL_cds.ttl | 3 +- ..._about_species_human_in_taxonomy_graph.ttl | 3 +- examples/sparql-examples-ontology.ttl | 35 +++++++++++++++++++ 6 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 examples/sparql-examples-ontology.ttl diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 88a94d34f..a98e1ebad 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -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/ diff --git a/.github/workflows/publish_github_pages.yaml b/.github/workflows/publish_github_pages.yaml index 5fd923197..201588f23 100644 --- a/.github/workflows/publish_github_pages.yaml +++ b/.github/workflows/publish_github_pages.yaml @@ -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 diff --git a/examples/HAMAP/2.ttl b/examples/HAMAP/2.ttl index 0660d7899..244b8ef58 100644 --- a/examples/HAMAP/2.ttl +++ b/examples/HAMAP/2.ttl @@ -3,10 +3,11 @@ @prefix rdfs: . @prefix schema: . @prefix sh: . +@prefix spex: . ex:2 a sh:SPARQLExecutable ; rdfs:comment "Show the triples about MF_00001"^^rdf:HTML ; - sh:describe "DESCRIBE " ; + spex:describe "DESCRIBE " ; sh:prefixes _:sparql_examples_prefixes ; schema:target . diff --git a/examples/UniProt/15_describe_an_EMBL_cds.ttl b/examples/UniProt/15_describe_an_EMBL_cds.ttl index ed60512f0..372008514 100644 --- a/examples/UniProt/15_describe_an_EMBL_cds.ttl +++ b/examples/UniProt/15_describe_an_EMBL_cds.ttl @@ -2,9 +2,10 @@ @prefix rdfs: . @prefix schema: . @prefix sh: . +@prefix spex: . ex:15 a sh:SPARQLExecutable ; rdfs:comment "Select all triples that relate to the EMBL CDS entry AA089367.1: "@en ; - sh:describe "DESCRIBE " ; + spex:describe "DESCRIBE " ; schema:target . diff --git a/examples/UniProt/16_triples_about_species_human_in_taxonomy_graph.ttl b/examples/UniProt/16_triples_about_species_human_in_taxonomy_graph.ttl index 760c13242..04a062c74 100644 --- a/examples/UniProt/16_triples_about_species_human_in_taxonomy_graph.ttl +++ b/examples/UniProt/16_triples_about_species_human_in_taxonomy_graph.ttl @@ -3,11 +3,12 @@ @prefix rdfs: . @prefix schema: . @prefix sh: . +@prefix spex: . ex:16 a sh:SPARQLExecutable, sh:SPARQLSelectExecutable ; rdfs:comment "Select all triples that relate to the taxon that describes Homo sapiens in the named graph for taxonomy"^^rdf:HTML ; - sh:describe """PREFIX taxon: + spex:describe """PREFIX taxon: DESCRIBE taxon:9606 FROM """ ; diff --git a/examples/sparql-examples-ontology.ttl b/examples/sparql-examples-ontology.ttl new file mode 100644 index 000000000..2da22dc1f --- /dev/null +++ b/examples/sparql-examples-ontology.ttl @@ -0,0 +1,35 @@ +# baseURI: https://purl.expasy.org/sparql-examples/ontology# + +@prefix spex: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix xsd: . + + a owl:Ontology ; + + ; + 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: .