Currently, mapping SPARQL query result to an entity requires the query to explicitly project a ?types variable containing the instance's ontology type. However, the result loader should be able to assume the type from the target entity type and not require the variable value.
That is, a query such as:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?d ?name ?comment ?homepage ?employeeCount ?types WHERE {
?d a <http://dbpedia.org/class/yago/WikicatVideoGameDevelopmentCompanies> ;
foaf:name ?name ;
a ?types .
OPTIONAL { ?d rdfs:comment ?comment . }
OPTIONAL { ?d foaf:homepage ?homepage . }
OPTIONAL { ?d dbo:numberOfEmployees ?employeeCount . }
} ORDER BY ?name
could be simplified to:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?d ?name ?comment ?homepage ?employeeCount WHERE {
?d a <http://dbpedia.org/class/yago/WikicatVideoGameDevelopmentCompanies> ;
foaf:name ?name .
OPTIONAL { ?d rdfs:comment ?comment . }
OPTIONAL { ?d foaf:homepage ?homepage . }
OPTIONAL { ?d dbo:numberOfEmployees ?employeeCount . }
} ORDER BY ?name
Currently, mapping SPARQL query result to an entity requires the query to explicitly project a
?typesvariable containing the instance's ontology type. However, the result loader should be able to assume the type from the target entity type and not require the variable value.That is, a query such as:
could be simplified to: