[
https://issues.apache.org/jira/browse/CLEREZZA-303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913611#action_12913611
]
Reto Bachmann-Gmür commented on CLEREZZA-303:
---------------------------------------------
One solution would be to change the equals and hashcode definition of
TypedLiteral (see
http://incubator.apache.org/clerezza/mvn-site/org.apache.clerezza.rdf.core/apidocs/org/apache/clerezza/rdf/core/TypedLiteral.html)
to something like "two literals are equals if they have the same lexical form
abnd datatype or are converted to equal objects by the LiteralFactory".
However:
- this is much less efficient than the current approach
- when using a store that doesn't store literal by values in a fashion
compatible with LiteralFactory some canonicalization of literals would be
needed.
Another approach might be, to serilaize dates the same way as TDB, cutting off
.000 fraction of seconds (mail on TDB list asking about this behaviour is
pending).
> Some triples with dates have another date after storage in tdb graph
> --------------------------------------------------------------------
>
> Key: CLEREZZA-303
> URL: https://issues.apache.org/jira/browse/CLEREZZA-303
> Project: Clerezza
> Issue Type: Bug
> Reporter: Manuel Innerhofer
> Assignee: Reto Bachmann-Gmür
>
> Steps to reproduce the problem:
> MGraph gaph // a graph in tdb
> Date date = new Date(0);
> LiteralFactory literalFactory = LiteralFactory.getInstance();
> TypedLiteral dateLiteral = literalFactory.createTypedLiteral(date);
> Triple triple = new TripleImpl(new BNode(), new
> UriRef("http://example.com/property"), dateLiteral);
> graph.add(triple)
> Assert.assertTrue(graph.contains(triple))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.