Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SPARQL Query for Retrieving Classes with Properties
PREFIX dc:<http://purl.org/dc/elements/1.1/>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX time:<http://www.w3.org/2006/time#>
PREFIX geo:<http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX foaf:<http://xmlns.com/foaf/0.1/>
PREFIX event:<http://purl.org/NET/c4dm/event.owl#>
PREFIX owl:<http://www.w3.org/2002/07/owl#>
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX vs:<http://www.w3.org/2003/06/sw-vocab-status/ns#>
select distinct ?class ?property ?label
where {
?class a owl:Class .
?property a owl:ObjectProperty ;
rdfs:domain ?class .
optional {
?property rdfs:label ?label .
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.