[Mulgara-general] walking bnodes?
gearon at ieee.org
Tue Apr 29 14:38:46 UTC 2008
On Tue, Apr 29, 2008 at 8:38 AM, Alex Hall <alexhall at revelytix.com> wrote:
> On Tue, Apr 29, 2008 at 5:28 AM, tl <thomas at stray.net> wrote:
> > the question now is: is it possible to query for all predicates/
> > objects of a given subject and let the query automagically follow any
> > _bnodes it encounters on the way? that's essentially the sparql
> > DESCRIBE command  returning a Concise Bounded Description  i
> > guess.
Errrr, no. Have a look at DESCRIBE. It doesn't prescribe anything at
all. It *might* do what you want here, but it really comes down to
whatever the implementor felt like giving you when he wrote it.
Note that the language says, "This data is not prescribed by a SPARQL
query....", and, "The description is determined by the query service."
The examples also use words like "may include", etc, etc.
Personally, I wouldn't be comfortable relying on an interface like this.
> Fortunately, a SPARQL implementation has just been merged to the main
> branch of Mulgara in SVN. This should provide the DESCRIBE feature that
> you're looking for. I would recommend getting a checkout of the latest
> version from SVN and playing around with it some. To the best of my
> knowledge the SPARQL interpreter is not documented, but other people on
> this list can probably help you out with that.
Actually, there's a reason it hasn't been announced yet!
Most of it DOES work (and I'll be detailing that in a later email),
but I haven't done anything beyond SELECT. This hasn't concerned me
too much, as each of the other query types are degenerate forms of
SELECT (CONSTRUCT needs a little type checking, but that's not too
> > does TQL even provide the capability to identify a bnode and do
> > something different in that case)?
> TQL does provide a mechanism for discovering the type of nodes in a
> graph using the nodetyping resolver . Unfortunately, it does not
> provide direct support for blank nodes; I believe this is a restriction
> imposed by the internal architecture.
It's not really imposed. I was just creating a way of identifying the
"node type", and blank nodes don't really have a type. Since you can
remove types with minus, I figured it was OK.
It may be more convenient to check if something is a blank node
explicitly, in which case I can probably add that. However, I don't
have the time for it right now.
More information about the Mulgara-general