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

Wrong turtle serialization of RDFList with itself inside

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Jena 3.9.0, Jena 3.10.0, Jena 3.11.0
    • None
    • Base, Jena, RIOT
    • None
    • jena-arq-3.11.0, java8

    Description

      Testcase:

      Model m = ModelFactory.createDefaultModel();

      Resource b0 = m.createResource();
      Resource b1 = m.createResource();

      // add 4 statements:

      b0.addProperty(OWL.unionOf, b1).addProperty(RDF.type, OWL.Class);
      b1.addProperty(RDF.first, b0).addProperty(RDF.rest, RDF.nil);

      m.write(System.out, "ttl");

      m.write(System.out, "nt");

      Output:

      _:b0    <http://www.w3.org/1999/02/22-rdf-syntax-ns#first>
                      _:b1 ;
              <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest>
                      () .
      _:B40396d1bX2D68d6X2D40b4X2DbbcdX2Dbe185973bfc1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
      _:B40396d1bX2D68d6X2D40b4X2DbbcdX2Dbe185973bfc1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:B4da6d814X2Ddb64X2D4ff1X2Da5d4X2D4f71d5718fd9 .
      _:B4da6d814X2Ddb64X2D4ff1X2Da5d4X2D4f71d5718fd9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
      _:B4da6d814X2Ddb64X2D4ff1X2Da5d4X2D4f71d5718fd9 <http://www.w3.org/2002/07/owl#unionOf> _:B40396d1bX2D68d6X2D40b4X2DbbcdX2Dbe185973bfc1 .

       

      So in turtle there are only 2 triples, while expected 4.

      Attachments

        Activity

          People

            Unassigned Unassigned
            szz ssz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: