Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Done
-
None
Description
It is possible to create typed literal from the Node class by calling Node createLiteral(String lex, String lang, RDFDatatype dtype). However, as stated in the documentation (c.f. http://openjena.org/how-to/typedLiterals.html#lang) "Thus for almost all typed literals there is no xml:Lang tag". It would be nice to provide a Node createLiteral(String lex, RDFDatatype dtype) method that delegates the call to Node createLiteral(String lex, String lang, RDFDatatype dtype) with the right value for the lang parameter. Indeed, when I use the existing method to create typed literal without lang tag, I put null for the lang parameter and it works but I don't know if it is the right value (in the jena source code it seems that an empty String is used) and whether it can break something (the documentation give no information). Moreover it is really annoying to have to specify the useless lang parameter when we don't need it.