label.rqg 620 Bytes
Newer Older
Maxime Lefrançois's avatar
Maxime Lefrançois committed
1
2
3
4
5
6
7
8
9
10
11
12
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX fun: <http://w3id.org/sparql-generate/fn/>

BASE <https://saref.etsi.org/documentation/>

TEMPLATE <term/label.rqg>( ?s ) {
  TEMPLATE { ?label } WHERE { ?s skos:prefLabel ?label } LIMIT 1 .
  TEMPLATE { ?label ; separator = ", aka " } WHERE { ?s rdfs:label ?label FILTER NOT EXISTS{ ?s skos:prefLabel ?label } } .
  TEMPLATE { COALESCE( fun:prefixedIRI(?s) , "!! no label !!" ) } WHERE { FILTER NOT EXISTS{ ?s skos:prefLabel|rdfs:label ?label } } .
}