I am using the following SPARQL query from PHP where $title
is the same for all five query triples:
SELECT * WHERE {
{ <http://dbpedia.org/resource/$title> rdfs:label ?pageTitle . }
UNION
{ <http://dbpedia.org/resource/$title> owl:sameAs ?sameAs . }
UNION
{ <http://dbpedia.org/resource/$title> dbpedia-owl:abstract ?abstract . }
UNION
{ <http://dbpedia.org/resource/$title> dbpedia-owl:thumbnail ?thumbnail . }
UNION
{ <http://dbpedia.org/resource/$title> dbpedia-owl:wikiPageID ?wikiID . }
}
Is there a way to simplify this so that $title
is only specified once in the query? I am thinking an anonymous node might be involved, somewhere? perhaps? :-)