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

Andy Seaborne commented on JENA-1359:
-------------------------------------

Proposal: close "won't fix" or "not a bug".

In an ideal world, we could add a {{Literal.getValueByType}} which has a 
built-in mapping from xsd type to Java (based on 
[java.xml|https://docs.oracle.com/javase/7/docs/api/javax/xml/datatype/package-summary.html]).

Even then, it is not clear that adding to {{Literal}} is the best way forward. 
{{NodeValue}} is the way in to XSD operation, {{getValue()}} is for java 
integration.

> Literal.getValue() does not respect the datatype 
> -------------------------------------------------
>
>                 Key: JENA-1359
>                 URL: https://issues.apache.org/jira/browse/JENA-1359
>             Project: Apache Jena
>          Issue Type: Bug
>            Reporter: Panagiotis Papadakos
>
> I was expecting that the getValue would return a Java object based on the
> datatype of typed literals. This is not the case, since jena will coerce a 
> decimal literal with value 12.0 to an Integer with value 12. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to