Ostrzyciel opened a new issue, #1710:
URL: https://github.com/apache/jena/issues/1710

   ### Version
   
   4.7.0
   
   ### What happened?
   
   When checking for isomorphism between two `Graph`s, Jena is supposed not to 
check for exact equality between blank nodes, but rather use a fancier 
isomorphism algorithm. This, however, seems not to be not true for quoted 
triples.
   
   File `data/source.nt`:
   ```
   _:b0 <http://example/p> <http://example/o> .
   << _:b0 <http://example/p> <http://example/o> >> <http://example/q> "ABC" .
   ```
   
   Code:
   ```java
   package org.example;
   
   import org.apache.jena.riot.Lang;
   import org.apache.jena.riot.RDFDataMgr;
   
   public class Main {
       public static void main(String[] args) {
           var g1 = RDFDataMgr.loadGraph("data/source.nt", Lang.NT);
           var g2 = RDFDataMgr.loadGraph("data/source.nt", Lang.NT);
           System.out.println(g1.isIsomorphicWith(g2));
       }
   }
   ```
   
   This prints "false" instead of "true".
   
   I encountered this problem when writing a test suite where I wanted to 
ensure that the input and output graphs are isomorphic. Quoted blank nodes seem 
to be the only case where this fails (all other RDF-star works fine).
   
   I also tried to circumvent this by first converting both graphs into their 
reified forms (with `org.apache.jena.system.RDFStar`), but this failed too.
   
   I have no idea how to even attempt fixing this, so I'll probably be of not 
much more help. But at least I can say that the issue is not critical to me :)
   
   ### Relevant output and stacktrace
   
   _No response_
   
   ### Are you interested in making a pull request?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to