If I run this query:
SELECT ?subject
WHERE { <http://dbpedia.org/resource/Oslo> dcterms:subject ?subject. }
I get this:
Which is correct. But I want all values in dbprop. So this part:
So a pseudo code that doesn't work would be:
SELECT ?properties
WHERE { <http://dbpedia.org/resource/Oslo> dbprop:* ?properties. }
Expected result would be then each property (like dbpprop:aprRecordHighC
) and it's value (like 25.400000
).
Is that possible?
Yes, it is possible. If you want all the properties and values given the "Oslo" resource, you should issue the following query:
SELECT ?property ?value
WHERE { <http://dbpedia.org/resource/Oslo> ?property ?value. }
If you only want the dbprop properties, you can add a filter:
SELECT ?property ?value
WHERE { <http://dbpedia.org/resource/Oslo> ?property ?value
FILTER regex(str(?property), "http://dbpedia\\.org/property/")}
I have tried both of these queries in the dbpedia endpoint and they worked.
You can find more information in the SPARQL specification: http://www.w3.org/TR/rdf-sparql-query/#func-str
Edit: apparently, from the comments I see that this question has been answered previously here