You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Gregory Cox (JIRA)" <ji...@apache.org> on 2013/10/30 19:57:25 UTC

[jira] [Created] (JENA-578) Statement method changeLiteralObject(int o) sets incorrect XMLSchema type

Gregory Cox created JENA-578:
--------------------------------

             Summary: Statement method changeLiteralObject(int o) sets incorrect XMLSchema type
                 Key: JENA-578
                 URL: https://issues.apache.org/jira/browse/JENA-578
             Project: Apache Jena
          Issue Type: Bug
          Components: RDF API
         Environment: JDK 1.7.0_45 / Windows 8
            Reporter: Gregory Cox


Please forgive me for any errors in this report.  I certainly am a newbie:

I'm using Jena from the download file "jena-2.6.4.zip" downloaded in the last couple of weeks, presumably that's version 2.6.4.

Using com.hp.hpl.jena.rdf.model Interface Statement, 
changeLiteralObject(int o) method, then writing the OntModel as "RDF/XML", I noticed that the resulting object specified an XMLSchema type of "int" instead of the appropriate type "integer", causing Protege to not recognize the object as an integer.  This also caused Jena to fail to recognize the object literal in subsequent calls to the changeLiteralObject method, causing an accumulation of malformed coexisting "int" literals rather than changes to a literal.

In the RDF/XML file I see the following modified by changeLiteralObject(int o)

 <consecutiveEmptyScanCount rdf:datatype="http://www.w3.org/2001/XMLSchema#int">22</consecutiveEmptyScanCount>

an unmodified version of this data property in the same RDF/XML dump looks like:

<consecutiveEmptyScanCount rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">5</consecutiveEmptyScanCount>

Shouldn't the #int in the changeLiteralObject(int o) modified version be #integer?

BTW, using the other types for changeLiteralObject(), like float and boolean, works fine thus far.

Thanks!





--
This message was sent by Atlassian JIRA
(v6.1#6144)