- From: Niels Vandekeybus <niels@vandekeybus.eu>
- Date: Fri, 24 Nov 2017 16:45:51 +0100
- To: Anthony Durity <a.durity@umail.ucc.ie>
- Cc: Ian Dickinson <i.j.dickinson@gmail.com>, Gregg Kellogg <gregg@greggkellogg.com>, W3C Ruby RDF mailing list <public-rdf-ruby@w3.org>
- Message-ID: <CAFrYh6S+OS=A21yYNWpTzOMmKV1RwmfkaQPB9Xt0vjKcoFYZ3g@mail.gmail.com>
Hey Anthony, As others have mentioned bNodes only have a local scope. If you wish to address/match them the typical thing to do is to create a query pattern for them via a known resource (with a URI). If you need to be able to match a bNode without the surrounding context/graph, it really should be a resource with a URI instead of a bNode. Kr, Niels On Fri, Nov 24, 2017 at 1:21 PM, Anthony Durity <a.durity@umail.ucc.ie> wrote: > One last mail from me for now. > > The alternative is that I avoid Array#include? and use something like > terms.any?{|t| t == n } > > Does anyone have any thoughts on the matter? > > On 24 November 2017 at 12:05, Anthony Durity <a.durity@umail.ucc.ie> > wrote: > >> Ok, having looked at the code for RDF::Node I guess my question is. Why >> is #eql? different to #== for RDF::Node ? That gives me the situation where >> terms.last == n is true but terms.include?(n) gives me false. >> >> On 24 November 2017 at 09:14, Ian Dickinson <i.j.dickinson@gmail.com> >> wrote: >> >>> Hi Anthony, >>> On Thu, Nov 23, 2017 at 10:13 PM, Anthony Durity <a.durity@umail.ucc.ie> >>> wrote: >>> > I was working under the impression that 'local scope' meant local to >>> the >>> > repo. >>> > >>> > Given that I have: >>> > [ >>> > #<RDF::URI:0x2ac3bff25014 URI:https://dh.ucc.ie/entity/α54>, >>> > #<RDF::URI:0x2ac3be8bc444 URI:http://www.wikidata.org/prop/direct/P31 >>> >, >>> > #<RDF::URI:0x2ac3bff2c5d0 URI:http://www.wikidata.org/entity/Q187685>, >>> > #<RDF::URI:0x2ac3bff32b60 URI:https://dh.ucc.ie/entity/α55>, >>> > #<RDF::URI:0x2ac3bff3f9f0 URI:https://dh.ucc.ie/entity/α56>, >>> > #<RDF::URI:0x2ac3be892504 URI:https://dh.ucc.ie/entity/α57>, >>> > #<RDF::Node:0x2ac3c025570c(_:g47253167721100)>, >>> > #<RDF::Node:0x2ac3bf67d7b8(_:59)>, >>> > #<RDF::Node:0x2ac3c0265d50(_:α60)> >>> > ] >>> > what's the best way to match the blank node 'α60' ? I tried “intern” >>> just >>> > there and it didn't work :/ >>> >>> I think it would be easier to offer advice if you could back up a bit >>> and say what you're >>> trying to achieve? As Gregg said, bNodes can be funny things, so the >>> 'best >>> way' to handle them tends to be a bit "well, it depends ..."! >>> >>> Ian >>> >> >> >
Received on Friday, 24 November 2017 17:52:30 UTC