- From: Anthony Durity <a.durity@umail.ucc.ie>
- Date: Thu, 23 Nov 2017 22:13:24 +0000
- To: Gregg Kellogg <gregg@greggkellogg.com>
- Cc: W3C Ruby RDF mailing list <public-rdf-ruby@w3.org>
- Message-ID: <CALp_+5TVG+LbLtr5vhne_FkjkAWM-LKGtZOB1C7836089cyJyw@mail.gmail.com>
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 :/ On 23 November 2017 at 22:06, Gregg Kellogg <gregg@greggkellogg.com> wrote: > Blank nodes, even with the same ID are not the resource, parsers go to > length to manage this. BNode identifiers only have local scope. You can > work around this by instantiating nodes with “intern” rather than “new”. > > Another technique is to find the node from the repo via query using > surrounding context, such as properties and values of URI or Literals. > > Gregg Kellogg > Sent from my iPhone > > > On Nov 23, 2017, at 4:48 PM, Anthony Durity <a.durity@umail.ucc.ie> > wrote: > > > > Hello all, > > > > If I do > > > > @terms = repo.terms > > uri = RDF::URI.new(iri) # some iri that exists in the triplestore > > > > then > > > > @terms.include?(uri) > > > > works nicely. > > > > But > > > > anon = RDF::Node.new(id) # some anon id that exists in the triplestore > > > > @terms.include?(anon) > > > > returns false :( > > > > So tell me, am I holding it wrong? > > > > Thanks! >
Received on Thursday, 23 November 2017 22:13:55 UTC