Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rdf4j-dev] Query bnode

Hi Jeen,

That’s fairly viable. Thanks Jeen. 

And I also found out I can use the capabilities for traversing the parsed query to meet() at the VALUES expressions when using that and adding the blank nodes in there directly. 

Håvard

On 16 Feb 2019, at 00:34, Jeen Broekstra <jeen.broekstra@xxxxxxxxx> wrote:

We don't support this kind of thing directly in SPARQL. 

However, there is a workaround you can use, which is to add a binding to a BNode via the API instead:

    TupleQuery query = conn.prepareTupleQuery("select * where { ?a ?b ?c }");
    query.setBinding("a", bnode);


The usual caveats about the scope of bnode identifiers and over-reliance on them remaining stable apply :)

Jeen


On Sat, Feb 16, 2019 at 6:27 AM Håvard Ottestad <hmottestad@xxxxxxxxx> wrote:
Hi,

I’m wondering if there is a way of querying a bnode?

I’m used to the following working from working with Stardog:

select * where {<_:bnode1> ?b ?c}

Any way of doing something similar in rdf4j directly? I realised that the SHACL sail is fairly broken when working with bnodes because of its use of SPARQL.

Cheers,
Håvard
_______________________________________________
rdf4j-dev mailing list
rdf4j-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/rdf4j-dev
_______________________________________________
rdf4j-dev mailing list
rdf4j-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/rdf4j-dev

Back to the top