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

Namespaces not created correctly via PUT and POST

    Details

    • Type: Bug
    • Status: Received
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: Fedora 4.7.4
    • Fix Version/s: None
    • Component/s: f4-core
    • Labels:
      None

      Description

      -----
      This issue was noticed by Graham Hukill in a post to the fedora community list: https://groups.google.com/forum/#!msg/fedora-community/Q38vsSiyyu8/VYmz0CLpCAAJ
      -----

      When one creates a resource via a PUT or POST and includes RDF, any new namespaces are not created correctly - they are given the standard 'ns0XX' prefix.

      To reproduce this you can send this RDF via a POST to Fedora:

      @prefix pcdm: <http://pcdm.org/models#> .
      @prefix xs: <http://www.w3.org/2001/XMLSchema> .
      @prefix foo1: <http://www.example.org/foo1#> .
      <> pcdm:hasMember "tree"^^xs:string ;
         foo1:foo "Fooo" .


      Like so:
      $ curl -X POST --data-binary "@body.rdf" -H "Content-Type: text/turtle" http://localhost:8080/fcrepo/rest

      Then:

      curl http://localhost:8080/fcrepo/rest/new/object/path

      Returns:

      @prefix premis: <http://www.loc.gov/premis/rdf/v1#> .
      @prefix owl: <http://www.w3.org/2002/07/owl#> .
      @prefix pcdm: <http://pcdm.org/models#> .
      @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
      @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
      @prefix acl: <http://www.w3.org/ns/auth/acl#> .
      @prefix ns003: <http://www.example.org/foo1#> .
      @prefix test1: <http://www.example.org/test#> .
      @prefix ns002: <http://www.example.org/foo#> .
      @prefix ns001: <http://www.example.org/test3#> .
      @prefix xsi: <http://www.w3.org/2001/XMLSchema-instance> .
      @prefix xmlns: <http://www.w3.org/2000/xmlns/> .
      @prefix xml: <http://www.w3.org/XML/1998/namespace> .
      @prefix dcterms: <http://purl.org/dc/terms/> .
      @prefix fedoraconfig: <http://fedora.info/definitions/v4/config#> .
      @prefix event: <http://fedora.info/definitions/v4/event#> .
      @prefix prov: <http://www.w3.org/ns/prov#> .
      @prefix foaf: <http://xmlns.com/foaf/0.1/> .
      @prefix test: <info:fedora/test/> .
      @prefix test2: <http://example.com/test2#> .
      @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
      @prefix fedora: <http://fedora.info/definitions/v4/repository#> .
      @prefix ebucore: <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#> .
      @prefix ldp: <http://www.w3.org/ns/ldp#> .
      @prefix iana: <http://www.iana.org/assignments/relation/> .
      @prefix xs: <http://www.w3.org/2001/XMLSchema> .
      @prefix config: <info:fedoraconfig/> .
      @prefix dc: <http://purl.org/dc/elements/1.1/> .

      <http://localhost:8080/fcrepo/rest/52/d5/e5/b7/52d5e5b7-6f98-4dbf-b80f-962ae2b9d21e>
              rdf:type fedora:Container ;
              rdf:type fedora:Resource ;
              fedora:lastModifiedBy "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
              fedora:createdBy "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
              fedora:created "2017-08-28T20:32:35.883Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
              fedora:lastModified "2017-08-28T20:32:35.883Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
              pcdm:hasMember "tree"^^xs:string ;
              ns003:foo "Fooo"^^<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/fcrepo/rest/> .

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bseeger Bethany Seeger
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: