Re: ElementPathBlock comparison

2019-12-03 Thread Andy Seaborne
aborne Sent: maandag 2 december 2019 14:32 To: users@jena.apache.org Subject: Re: ElementPathBlock comparison Hi Barry, How easy is it to use JGraphT with Jena? I'd be very interested in hearing about your experiences. Andy On 02/12/2019 10:43, Nouwt, B. (Barry) wrote: Hey Andy,

RE: ElementPathBlock comparison

2019-12-02 Thread Nouwt, B. (Barry)
his Java class: >>> >>> https://github.com/barrynl/jena-example/blob/master/src/main/java/nl >>> / tno/ict/ds/cb/jena/JenaIsomorphTest.java >>> >>> >>> it will show how converting variable nodes to blank nodes and using >>> the Iso

Re: ElementPathBlock comparison

2019-12-02 Thread Andy Seaborne
nd it works as expected. See: https://jgrapht.org/guide/UserOverview#graph-comparisons I might retry IsoMatcher/IsoAlg in the future. Regards, Barry -Original Message- From: Andy Seaborne Sent: zondag 1 december 2019 10:58 To: users@jena.apache.org Subject: Re: ElementPathBlock compariso

RE: ElementPathBlock comparison

2019-12-02 Thread Nouwt, B. (Barry)
- From: Andy Seaborne Sent: zondag 1 december 2019 10:58 To: users@jena.apache.org Subject: Re: ElementPathBlock comparison Barry, Pull request #642 should fix this. Either do the variable -> blank node replacement and call IsoMatcher.isomorphic(graph,graph) Or call the isomorphism a

Re: ElementPathBlock comparison

2019-12-01 Thread Andy Seaborne
to blank nodes and using the IsoMatcher yields true, while it should be false. Maybe you can find what I'm doing wrong. Thanks in advance! Barry -Original Message- From: Andy Seaborne Sent: donderdag 28 november 2019 11:22 To: users@jena.apache.org Subject: Re: ElementPathBloc

Re: ElementPathBlock comparison

2019-11-29 Thread Andy Seaborne
8 november 2019 11:22 To: users@jena.apache.org Subject: Re: ElementPathBlock comparison On 25/11/2019 13:52, Nouwt, B. (Barry) wrote: Hey Andy, I have another question about comparing ElementPathBlock's the way you suggest below using IsoMatcher. The following two graph patterns shoul

RE: ElementPathBlock comparison

2019-11-28 Thread Nouwt, B. (Barry)
22 To: users@jena.apache.org Subject: Re: ElementPathBlock comparison On 25/11/2019 13:52, Nouwt, B. (Barry) wrote: > Hey Andy, > > I have another question about comparing ElementPathBlock's the way you > suggest below using IsoMatcher. > > The following two graph patterns s

Re: ElementPathBlock comparison

2019-11-28 Thread Andy Seaborne
example I can copy-and-paste and run? If uou put it on a gist/pastebin I might find time to try it. Andy Regards, Barry -Original Message- From: Nouwt, B. (Barry) Sent: donderdag 21 november 2019 13:03 To: users@jena.apache.org Subject: RE: ElementPathBlock comparison Hey A

RE: ElementPathBlock comparison

2019-11-25 Thread Nouwt, B. (Barry)
graph patterns are judged the same while they shouldn't. Any idea what I'm doing wrong? Regards, Barry -Original Message- From: Nouwt, B. (Barry) Sent: donderdag 21 november 2019 13:03 To: users@jena.apache.org Subject: RE: ElementPathBlock comparison Hey Andy, thanks. I'

RE: ElementPathBlock comparison

2019-11-21 Thread Nouwt, B. (Barry)
--Original Message- From: Andy Seaborne Sent: woensdag 20 november 2019 10:41 To: users@jena.apache.org Subject: Re: ElementPathBlock comparison On 19/11/2019 15:52, Nouwt, B. (Barry) wrote: > Hi Andy, I have an additional question regarding your tip about turning > variables into

Re: ElementPathBlock comparison

2019-11-20 Thread Andy Seaborne
return mapping.makeIsomorphic(n1, n2) ; (not tested) Andy Regards, Barry -Original Message- From: Nouwt, B. (Barry) Sent: dinsdag 19 november 2019 16:49 To: users@jena.apache.org Subject: RE: ElementPathBlock comparison Thanks for the quick replies. @Andy Exactly, I do car

Re: ElementPathBlock comparison

2019-11-20 Thread Andy Seaborne
ePattern, but then I still a way to match them. For my problem this RDF encoding is not necessary and encoding it using the Google Guava Graph lib seems sufficient. Regards, Barry -Original Message- From: Andy Seaborne Sent: dinsdag 19 november 2019 15:49 To: users@jena.apache.org Subje

RE: ElementPathBlock comparison

2019-11-19 Thread Nouwt, B. (Barry)
t that location. Regards, Barry -Original Message- From: Nouwt, B. (Barry) Sent: dinsdag 19 november 2019 16:49 To: users@jena.apache.org Subject: RE: ElementPathBlock comparison Thanks for the quick replies. @Andy Exactly, I do care about the shape, but not about exact variable names.

RE: ElementPathBlock comparison

2019-11-19 Thread Nouwt, B. (Barry)
roblem this RDF encoding is not necessary and encoding it using the Google Guava Graph lib seems sufficient. Regards, Barry -Original Message- From: Andy Seaborne Sent: dinsdag 19 november 2019 15:49 To: users@jena.apache.org Subject: Re: ElementPathBlock comparison > Hi all, &

Re: ElementPathBlock comparison

2019-11-19 Thread Andy Seaborne
Hi all, I have two ARQ ElementPathBlocks (or Basic Graph Pattern, see SPARQL spec https://www.w3.org/TR/sparql11-query/#GraphPattern) and would like to know whether they are equal ignoring variable names and ordering of the triples. What is the best/easiest way to do that with the Apache Je

Re: ElementPathBlock comparison

2019-11-19 Thread Martynas Jusevičius
SPIN can convert SPARQL to RDF. See sp:TriplePattern: https://spinrdf.org/sp.html#sp-TriplePattern On Tue, Nov 19, 2019 at 3:04 PM Nouwt, B. (Barry) wrote: > > I found the following possible solution on stack overflow: > https://stackoverflow.com/questions/21755157/sparql-graph-pattern-compariso

RE: ElementPathBlock comparison

2019-11-19 Thread Nouwt, B. (Barry)
I found the following possible solution on stack overflow: https://stackoverflow.com/questions/21755157/sparql-graph-pattern-comparison They suggest to turn both graph patterns into actual graphs and using regular graph isomorphism algorithms to judge their equality. Does Apache Jena already ha