Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-1798

TDB1 converts small xsd:long literals into xsd:integer

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Information Provided
    • None
    • None
    • TDB
    • None

    Description

      TDB1 converts small xsd:long literals, e.g. "1"^<xsd:long> to xsd:integer. This behavior is specific to TDB1. Even though that might be acceptable in most cases, it breaks validation of SHACL {{ sh:dataType xsd:long ;}} constraints. The following test demonstrates the issue:

          @Test public void longLiterals() {
              DatasetGraph dsg = TDBFactory.createDatasetGraph();
              Quad quad1 = SSE.parseQuad("(quad <g> <s> <p> \"1\"^^<http://www.w3.org/2001/XMLSchema#long>)");
              assertEquals(XSDDatatype.XSDlong, quad1.getObject().getLiteralDatatype());
              dsg.add(quad1);
      
              Quad quad2 = dsg.find().next();
              assertEquals(XSDDatatype.XSDlong, quad2.getObject().getLiteralDatatype());
          }
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            strangepleasures Pavel Mikhailovskii
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment