Reputation: 1
For the RDF labels I'm trying something really simple to show all the labels in my ontology , but even that its not working. Do you have any idea how I need to write any rdfs:label
SELECT ?subject ?label WHERE { ?subject rdfs:label ?label }
Upvotes: 0
Views: 685
Reputation: 1023
Try this:
SELECT ?subject ?label WHERE { ?subject <http://www.w3.org/2000/01/rdf-schema#label> ?label }
You could also maybe use a prefix like so:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?subject ?label WHERE { ?subject rdfs:label ?label }
You can try out the queries by using the DBPedia endpoint:
To use existing predicates from other graphs you first have to include the reference to the predicate. Otherwise the query cannot find the correct predicate.
Upvotes: 0