[
https://issues.apache.org/jira/browse/JENA-1303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15925972#comment-15925972
]
Gilles Habran edited comment on JENA-1303 at 3/15/17 11:54 AM:
---------------------------------------------------------------
And regarding this problem ?
{quote}For this, we use Model.contains(Statement) and we now have inconsistency
in the results.
Model.isIsomorphicWith(other model) will return false.
But each statement of both model is found in the other model.
This is because of the class XSDBaseNumericType.java in the method
isEqual(LiteralLabel, LiteralLabel).
When we arrive in this method, the two arguments are as follows :
value1 = "241^^http://www.w3.org/2001/XMLSchema#positiveInteger"
value2 = "0241^^http://www.w3.org/2001/XMLSchema#positiveInteger"
when we store those values in Number, the leading zero is lost.
n1 = 241
n2 = 241{quote}
It seems to me that this check is not valid because two different methods are
used to check if two models are identical and these methods give different
results.
Thank you.
was (Author: gillesh):
And regarding this problem ?
{quote}For this, we use Model.contains(Statement) and we now have inconsistency
in the results.
Model.isIsomorphicWith(other model) will return false.
But each statement of both model is found in the other model.
This is because of the class XSDBaseNumericType.java in the method
isEqual(LiteralLabel, LiteralLabel).
When we arrive in this method, the two arguments are as follows :
value1 = "241^^http://www.w3.org/2001/XMLSchema#positiveInteger"
value2 = "0241^^http://www.w3.org/2001/XMLSchema#positiveInteger"
when we store those values in Number, the leading zero is lost.
n1 = 241
n2 = 241{quote}
It seems to me that this check is not valid because two different methods are
used to check if two models are identical and these methods give different
results.
> 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)