[ 
https://issues.apache.org/jira/browse/JENA-1303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15925839#comment-15925839
 ] 

Andy Seaborne commented on JENA-1303:
-------------------------------------

> in Virtuoso the triples are stored individually and the leading zero 
> disappears.

This is a matter for Virtuoso. Have you raised this with OpenLink? Is there an 
option to switch this off?

If it is not preserving the lexical form of the RDF term, then it is storing 
different RDF.  Changing the lexical form changes the RDF term. (TDB does the 
same as do many RDF stores that work at larger scale).

The isomorphism code was changed because it did not deal with values 
consistently. It used term-equality in one place and value-equality in another. 
It is now consistent and aligned to RDF 1.1 ([3.6 Graph 
Comparison|https://www.w3.org/TR/rdf11-concepts/]). 

The old behaviour of the isomorphism code was buggy. If you create your own 
version with the change reversed, beware of this other bug ([noted in this 
comment|https://issues.apache.org/jira/browse/JENA-805?focusedCommentId=14183189&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14183189]).

The current Jena behaviour overall is a balance between the long-term legacy 
behaviour for memory models, and all the application code on top of that, and 
correct isomorphism. Isomorphism is a structural test (RDF term equality + 
blank node isomorphism) and is defined in the standards . Some 
value-understanding has always been part of the Jena general memory models (and 
not others).

The javadoc for isomorphism says "Statements which are identical match."

To get uniform behaviour across all systems, the best approach is to 
canonicalize the RDF data, for example, on parsing.

If your application wishes to round trip RDF terms through Virtuoso, then your 
application will need to do this if Virtuoso has the effect of applying this 
transformation anyway.

Or the application can use the new transactional memory dataset which works 
with term equality.

> we retrieve the RDF from Fedora and the triples from Virtuoso

Does this mean you are storing the data in two places?


> Starting 0 in XSDnonNegativeInteger is badly interpreted
> --------------------------------------------------------
>
>                 Key: JENA-1303
>                 URL: https://issues.apache.org/jira/browse/JENA-1303
>             Project: Apache Jena
>          Issue Type: Bug
>    Affects Versions: Jena 3.1.0, Jena 3.1.1, Jena 3.2.0
>            Reporter: Gilles Habran
>            Assignee: Andy Seaborne
>
> Hello,
> we are currently using Jena 2.7.2 and we need to upgrade to Jena 3.1.0. We 
> cannot use 3.1.1+ because Oracle Jena Adapter does not support other version 
> than 3.1.0.
> Here is a test to show the problem.
> Jena 2.7.2 returns true and Jena 3.1.0 returns false
> {code}        Model model1 = ModelFactory.createDefaultModel();
>         model1.add(model1.createResource("http://jena.apache.org/test";), 
> model1.createProperty("http://jena.apache.org/size";), 
> model1.createTypedLiteral("05", XSDDatatype.XSDnonNegativeInteger));
>         Model model2 = ModelFactory.createDefaultModel();
>         model2.add(model2.createResource("http://jena.apache.org/test";), 
> model2.createProperty("http://jena.apache.org/size";), 
> model2.createTypedLiteral("5", XSDDatatype.XSDnonNegativeInteger));
>         Assert.assertTrue(model1.isIsomorphicWith(model2));{code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to