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

Inconsistent Turtle serializers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Jena 3.14.0
    • Jena 3.15.0
    • None
    • None
    • My Configuration:

      OS: Ubuntu 18.04

      java version "1.8.0_111"

      javac 1.8.0_242

      Jena Version: 3.14.0

    Description

      The turtle serializers provided for default model in Jena don't work as expected. Moreover, the docs lack on which methods to use in which case.

      I found the following methods that seem to work:

      1. model.write()  (A.ttl)
      2. RDFWriter   (B.ttl)
      3. RDFDataMgr  (C.ttl)

      I'm providing a minimum working example along with the outputs using a sample turtle file from Turtle specifications (ggoblin.ttl – Example 1 from https://www.w3.org/TR/turtle/) in a gist: https://gist.github.com/virresh/5a28dc3adb1f40bf9070e2cb4ecfa90d

       

      The issue:

      1. "@base" directive is not printed when writing with the TURTLE_BLOCK and TURTLE_FLAT format in RDFWriter
      2.  There is no way to provide "@base" inside the RDFDataMgr. Expected output was something like <#spiderman>
      3. RDFDataMgr doesn't respect the prefix supplied, e.g I manually added prefix "@base", however, the output (C.ttl) still converts the relative entities into their absolute form, whereas I expected it to do something like base:#spiderman at the very least

       

      I'll be happy to help with the issue if it doesn't fall into the "wont-fix" category.

      Attachments

        Issue Links

          Activity

            People

              andy Andy Seaborne
              virresh Viresh Gupta
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m