How can you implement concise bounded description using SPARQL
The basic query for symmetric CBD would simply look like this:
However, since the CBD is trying to describe not only a resource but an entity, its boundaries are broader. To define boundaries of entity CBD "abuses" the semantics of blank-nodes and reified
However, since SPARQL can't express recursion it is probably necessary to write down graph patterns for nested blank nodes/
My question is then what do you think is the best way to implemented CBD in SPARQL using
Just CONSTRUCT isn't enough (it needs arbitrary depth of the pattern).
Either, using OPTIONALs, limit yourself to a fixed maximum depth of a chain of blank nodes, or use a DESCRIBE query. The normal Jena DESCRIBE handler is not sufficient - you will have to implement your own.
answered 11 Jan '13, 11:24
I've managed to come up with a particularly ugly solution that uses Virtuoso's transitive subqueries. It includes both outbound and inbound triples and expands on blank nodes and instances of
Can you think of a way how it could be written in a better way?
answered 13 Jan '13, 15:01