Your query,
PREFIX my: <http://www.semanticweb.org/li/ontologies/159702/fcd#>
SELECT ?x
WHERE { my:W21 rdf:type ?x}
asks for the values of the rdf:type
property. In the data that you've shown, there's only one of those, and that's owl:NamedIndividual
. If you want the values of all properties, you'd use something like
PREFIX my: <http://www.semanticweb.org/li/ontologies/159702/fcd#>
SELECT ?p ?o
WHERE { my:W21 ?p ?o }
Now, in the question title, you've asked about data properties, but I'm not sure whether you're asking for the "data that is the object of a property", or if you're actually asking about OWL DatatypeProperties which have literals, but not resources, as values. If that's what you want, you could use:
PREFIX my: <http://www.semanticweb.org/li/ontologies/159702/fcd#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT ?p ?o
WHERE { my:W21 ?p ?o . ?p a owl:DatatypeProperty }
to get all the values of properties that are actually declared as datatype properties. If you don't have the property declarations, though, you might just want to ask for objects that are literals:
PREFIX my: <http://www.semanticweb.org/li/ontologies/159702/fcd#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT ?p ?o
WHERE { my:W21 ?p ?o . filter isLiteral(?o) }