Rupert Westenthaler created STANBOL-1031:
--------------------------------------------

             Summary: Jena TDB LDPath implementation (part of JenaTDB Indexing 
Source) must return null as Locale for Literals without lanugage
                 Key: STANBOL-1031
                 URL: https://issues.apache.org/jira/browse/STANBOL-1031
             Project: Stanbol
          Issue Type: Bug
          Components: Entityhub
    Affects Versions: entityhub-0.11.0
            Reporter: Rupert Westenthaler
            Assignee: Rupert Westenthaler
            Priority: Minor


Jena TDB uses an empty language for literals without lanugage, while LDPath 
uses null Locale. At the moment the Jena TDB RDFBackend implementation (part of 
the Jena TDB Indexing Source - Entityhub Indexing Tool) does not implement this 
correctly, but returns a Locale instance with an empty language.

While this does not cause problems when indexing Literals it can cause problems 
for transformations (e.g. parsing numbers form the literal value), because the 
#toString method of the "entityhub:Text" class will generate "{value}@" instead 
of the expected '{value}'.

To fix this the AbstractTdbBackend#getLiteralLanguage(Node n) method needs to 
return null if the parsed Node#isLiteral() == true and 
"".equealsNode#getLiteralLanguage()

In addition the #toString method of entityhub Text implementations should not 
print the '@' symbol if the language of an literal is empty.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to