Question

The following query (preceded by relevant prefixes of course)

posed on an ontology (.owl file) gives the object properties or data properties?

SELECT DISTINCT ?predicate
    WHERE { ?subject ?predicate ?object }

Thank you,

Was it helpful?

Solution

It wholly depends on what the data in the triple store or file contains. Variable ?predicate will match the predicate of the triple, and that predicate might be a datatype property or an object property in OWL, or neither of those if you're not querying an OWL ontology. Likewise, ?object will match an RDF resource or a literal, again depending on what the data says.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top