diff --git a/examples/Wikidata - CiTO/001.ttl b/examples/Wikidata - CiTO/001.ttl new file mode 100644 index 000000000..7894c4804 --- /dev/null +++ b/examples/Wikidata - CiTO/001.ttl @@ -0,0 +1,32 @@ +@prefix ex: . +@prefix rdf: . +@prefix rdfs: . +@prefix schema: . +@prefix sh: . + +ex:001 a sh:SPARQLExecutable, + sh:SPARQLSelectExecutable ; + rdfs:comment "Lists journals that have CiTO citation intentions defined and returns the number of citation statements as well as the number of citing articles."@en ; + sh:prefixes _:sparql_examples_prefixes ; + sh:select """PREFIX wd: +PREFIX wdt: +PREFIX wikibase: +PREFIX bd: +PREFIX rdfs: +PREFIX p: +PREFIX ps: +PREFIX pq: + +SELECT ?journal ?journalLabel (CONCAT("/venue/", SUBSTR(STR(?journal), 32), "#cito") AS ?journalUrl) +(COUNT(DISTINCT ?citationStatement) AS ?citations) +(COUNT(DISTINCT ?citingArticle) AS ?articles) WHERE { + ?citingArticle p:P2860 ?citationStatement ; + wdt:P1433 ?journal . + ?citationStatement pq:P3712 ?intention ; + ps:P2860 ?citedArticle . + ?intention wdt:P31 wd:Q96471816 . + SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". } +} GROUP BY ?journal ?journalLabel + ORDER BY DESC(?citations)""" ; + schema:target ; + schema:keywords "journal", "CiTO", "citation" . diff --git a/examples/Wikidata - CiTO/prefixes.ttl b/examples/Wikidata - CiTO/prefixes.ttl new file mode 100644 index 000000000..006e19845 --- /dev/null +++ b/examples/Wikidata - CiTO/prefixes.ttl @@ -0,0 +1,13 @@ +@prefix sh: . +@prefix xsd: . +@prefix owl: . +@prefix rdfs: . + +_:vhp4safety_sparql_examples_prefixes a owl:Ontology ; + rdfs:comment """This is a collection of Wikidata SPARQL prefixes that are needed for the examples for use on different websites.""" ; + owl:imports sh: ; + sh:declare [ sh:prefix "wd" ; sh:namespace "http://wikidata.org/entity/"^^xsd:anyURI ] ; + sh:declare [ sh:prefix "wdt" ; sh:namespace "http://wikidata.org/prop/direct/"^^xsd:anyURI ] ; + sh:declare [ sh:prefix "wikibase" ; sh:namespace "http://wikiba.se/ontology#"^^xsd:anyURI ] ; + sh:declare [ sh:prefix "bd" ; sh:namespace "http://www.bigdata.com/rdf#"^^xsd:anyURI ] ; + sh:declare [ sh:prefix "rdfs" ; sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ] .