sparql-examples

A set of SPARQL examples that are used in different TGX resources

View the Project on GitHub BiGCAT-UM/sparql-examples

002

rq turtle/ttl

Lists all linksets defined in this database with their titles, licenses, and creation dates.

Use at

PREFIX void: <http://rdfs.org/ns/void#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX pav: <http://purl.org/pav/>

SELECT DISTINCT ?dataset (str(?titleLit) as ?title) ?date ?license
WHERE {
   ?dataset a void:Linkset ;
   dcterms:title ?titleLit .
   OPTIONAL {
     ?dataset dcterms:license ?license ;
       pav:createdOn ?date .
   }
}

graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?dataset"):::projected 
  v4("?date"):::projected 
  v3("?license"):::projected 
  v5("?title")
  v2("?titleLit"):::projected 
  c2(["void:Linkset"]):::iri 
  v1 --"a"-->  c2
  v1 --"dcterms:title"-->  v2
  subgraph optional0["(optional)"]
  style optional0 fill:#bbf,stroke-dasharray: 5 5;
    v1 -."dcterms:license".->  v3
    v1 --"pav:createdOn"-->  v4
  end
  bind0[/"str(?titleLit)"/]
  v2 --o bind0
  bind0 --as--o v5