From 7dec7511bc5277724a85e9a5036821971bf860ac Mon Sep 17 00:00:00 2001 From: KoalaGeo Date: Mon, 16 Sep 2024 16:01:50 +0100 Subject: [PATCH] Create sparqlExamples.ts --- custom-vues/util/sparqlExamples.ts | 63 ++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 custom-vues/util/sparqlExamples.ts diff --git a/custom-vues/util/sparqlExamples.ts b/custom-vues/util/sparqlExamples.ts new file mode 100644 index 0000000..438ad15 --- /dev/null +++ b/custom-vues/util/sparqlExamples.ts @@ -0,0 +1,63 @@ +export default [ + { + title: "BGS Select Query", + shortTitle: "BGS Select", + description: "This is a BGS example of a select query, which lists the first 10 triples.", + query: `PREFIX rdf: +PREFIX rdfs: +SELECT * +WHERE { + ?s ?p ?o . +} LIMIT 10` + }, + { + title: "Example Select Query", + shortTitle: "Basic Select", + description: "This is a basic example of a select query, which lists the first 10 triples.", + query: `PREFIX rdf: +PREFIX rdfs: +SELECT * +WHERE { + ?s ?p ?o . +} LIMIT 10` + }, + { + title: "Example Construct Query", + shortTitle: "Basic Construct", + description: "This is a basic example of a construct query, which constructs a graph of the first 10 triples.", + query: `PREFIX rdf: +PREFIX rdfs: +CONSTRUCT { + ?s ?p ?o . +} +WHERE { + ?s ?p ?o . +} LIMIT 10` + }, + { + title: "Vocabularies - Counting Concepts", + shortTitle: "Concept Count", + description: "Here is an example query for VocPrez you can copy 'n paste into the Query UI text area above to test with. It counts the number of vocabulary Concepts in the all vocabularies in this system and will return an integer: ", + query: `PREFIX skos: + +SELECT (COUNT(?c) AS ?count) +WHERE { + ?c a skos:Concept . +}` + }, + { + title: "Spatial Data Catalog - Basic Feature Information", + shortTitle: "Feature Info", + description: "Here is an example query for SpacePrez for use in the Query UI above. It returns most two Features' URIs and their titles.", + query: `PREFIX dcterms: +PREFIX geo: +PREFIX rdfs: + +SELECT ?uri ?title +WHERE { + ?uri a geo:Feature ; + dcterms:title|rdfs:label ?title . +} +LIMIT 2` + }, +];