farhana-haque / cumulusrdf

Automatically exported from code.google.com/p/cumulusrdf
0 stars 0 forks source link

NodeDictionaryBase fails to create (datatyped) literals #29

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
NodeDictionaryBase:136 creates literals assuming the n3 string has only the 
value (no language no datatype). 
In case of (example) 

n3 = "2012-02-01T09:53:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>

the Literal instance creation 

Literal l = ValueFactory.createLiteral(n3)

leads to a wrong value because datatype (and language) part is seen has part of 
the value. I mean, a new Literal is created with the following value:

""2012-02-01T09:53:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>"

What is the expected output? What do you see instead?
I would expect a Literal correctly created, with value, language and datatype.

This blocks a lot of unit test because system index triples but is not able to 
correctly return them as part of SELECT or DESCRIBE command  

Original issue reported on code.google.com by a.gazzarini@gmail.com on 2 Feb 2014 at 9:36

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r809.

Original comment by a.gazzarini@gmail.com on 2 Feb 2014 at 9:41

GoogleCodeExporter commented 8 years ago
Issue has been fixed by replacing (in NodeDictionaryBase.getNode():132)

return valueFactory.createLiteral(n3);

with:

return NTriplesUtil.parseLiteral(n3, valueFactory);

Original comment by a.gazzarini@gmail.com on 2 Feb 2014 at 9:42