I need to retrieve a single image for each resource in a target set, testing multiple non-exclusive predicates with a priority order.
I'm currently using a standard OPTIONAL fallback pattern along the lines of
select ?r ?i where {
?r a dbo:Automobile .
optional { ?r <http://dbpedia.org/ontology/thumbnail> ?i }
optional { ?r <http://xmlns.com/foaf/0.1/depiction> ?i }
optional { ?r <http://xmlns.com/foaf/0.1/logo> ?i }
optional { ?r <http://schema.org/image> ?i }
}
but this approach is turning out to be troublesome on some backends: is anyone aware of any simple/efficient alternative?