Uploaded image for project: 'Fedora Repository Project'
  1. Fedora Repository Project
  2. FCREPO-2515

import/export tool should produce consistent Turtle (1.0 or 1.1 conforming)

    Details

      Description

      While troubleshooting some failures of the import-export verification tool to verify RDF graphs produced with and without binaries exported, differences were discovered in the syntax of the turtle that the import-export tool writes to disk.

      When binaries are included, the turtle appears to conform to RDF 1.0 rules, where all the literals (including strings) are explicitly typed. Presumably this is coming more or less directly from Fedora. When binaries are not included, however, the tool is filtering some triples out of the graph, and appears to write turtle that conforms to the more relaxed RDF 1.1 rules, where untyped literals can be assumed to be of type xsd:string and "true" and "false" are assumed to be Booleans when untyped, among other differences.

      While these differences might be semantically insignificant (at least to RDF 1.1 parsers -- but not to RDF 1.0), and could in theory be something that the verification tool were expected to handle, it seems like a good practice for the import/export tool to produce syntactically consistent turtle no matter which options are chosen.

      Here are examples of the turtle written to disk by import/export with binaries:

      {code}
      <http://localhost:8080/rest/pcdm/00/38/ba/b1/0038bab1-b6e3-44e9-9580-8046440f7d84>
              rdf:type bibo:Article ;
              rdf:type fedora:Container ;
              rdf:type fedora:Resource ;
              rdf:type pcdm:Object ;
              pcdm:memberOf <http://localhost:8080/rest/pcdm/de/41/c4/51/de41c451-a1bb-46ac-ac86-e30a65254275> ;
              fedora:lastModifiedBy "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
              fedora:createdBy "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
              fedora:created "2017-06-05T20:12:24.161Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
              fedora:lastModified "2017-06-05T20:12:24.161Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
              bibo:pageEnd 2 ;
              bibo:pageStart 2 ;
              dcterms:title "NO GATE CRASHING."^^<http://www.w3.org/2001/XMLSchema#string> ;
              rdf:type ldp:RDFSource ;
              rdf:type ldp:Container ;
              fedora:writable "true"^^<http://www.w3.org/2001/XMLSchema#boolean> ;
              fedora:hasParent <http://localhost:8080/rest/pcdm> .
      {code}

      and with no binaries:

      {code}
      <http://localhost:8080/rest/pcdm/00/38/ba/b1/0038bab1-b6e3-44e9-9580-8046440f7d84>
              a ldp:Container , fedora:Resource , pcdm:Object , ldp:RDFSource , bibo:Article , fedora:Container ;
              fedora:created "2017-06-05T20:12:24.161Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
              fedora:createdBy "bypassAdmin" ;
              fedora:hasParent <http://localhost:8080/rest/pcdm> ;
              fedora:lastModified "2017-06-05T20:12:24.161Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
              fedora:lastModifiedBy "bypassAdmin" ;
              fedora:writable true ;
              pcdm:memberOf <http://localhost:8080/rest/pcdm/de/41/c4/51/de41c451-a1bb-46ac-ac86-e30a65254275> ;
              dcterms:title "NO GATE CRASHING." ;
              bibo:pageEnd 2 ;
              bibo:pageStart 2 .
      {code}


      See also: https://www.w3.org/TR/rdf11-new/

        Attachments

          Activity

            People

            • Assignee:
              awoods Andrew Woods
              Reporter:
              westgard Joshua Westgard
              Reviewer:
              Esmé Cowles
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: