Islandora / documentation

Contains islandora's documentation and main issue queue.
MIT License
103 stars 71 forks source link

dcterms prefixed used but not defined #1412

Closed bseeger closed 4 years ago

bseeger commented 4 years ago

The dcterms prefix is used in the islandora_defaults for the rdf mapping, but the prefix name itself is never explicitly defined. This results in fedora thinking that things like "dcterms:spacial" is a full URL:

@prefix fedora:  <http://fedora.info/definitions/v4/repository#> .
@prefix ldp:  <http://www.w3.org/ns/ldp#> .
@prefix dcterms:  <http://purl.org/dc/terms/> .

<http://127.0.0.1:8080/fcrepo/rest/31/40/3c/9f/31403c9f-e64c-4e3e-823c-ec4b80f4db1f>
        rdf:type                    fedora:Container ;
        rdf:type                    <http://purl.org/coar/resource_type/c_c513> ;
        rdf:type                    fedora:Resource ;
        rdf:type                    ldp:BasicContainer ;
        rdf:type                    <http://pcdm.org/models#Object> ;
        fedora:lastModifiedBy       "bypassAdmin" ;
        <http://schema.org/dateModified>  "2020-01-29T17:20:24+00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
        <dcterms:format>            <http://localhost:8000/taxonomy/term/44> ;
        <http://schema.org/author>  <http://localhost:8000/user/1> ;
        <dcterms:tableOfContents>   "<p>test</p>\r\n"@en ;
        <http://schema.org/sameAs>  <http://localhost:8000/node/7> ;
        <http://schema.org/dateCreated>  "2020-01-28T19:10:31+00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
        <dcterms:spatial>           <http://localhost:8000/taxonomy/term/32> ;
        dcterms:extent              "1 item" ;
        dcterms:identifier          "AS11-44-6665A" ;
        dcterms:identifier          "Another ID" ;
        fedora:createdBy            "bypassAdmin" ;
        <dcterms:temporal>          <http://localhost:8000/taxonomy/term/43> ;
        fedora:lastModified         "2020-01-29T17:20:25.316Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
        fedora:created              "2020-01-28T19:10:54.475Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
        <dcterms:type>              <http://localhost:8000/taxonomy/term/41> ;
        dcterms:subject             <http://localhost:8000/taxonomy/term/37> ;
        <http://id.loc.gov/vocabulary/relators/abr>  <http://localhost:8000/taxonomy/term/45?_format=jsonld> ;
        dcterms:title               "Apollo 11 Hasselblad image from film magazine 44/V - LM inspection, rendezvous"@en ;
        <dcterms:language>          <http://localhost:8000/taxonomy/term/42> ;
        rdf:type                    ldp:RDFSource ;
        rdf:type                    ldp:Container .

Notice the < and > around some of the dcterms predicates - they should not be there. Fedora thinks that <dcterms:temporal> is a full URL versus a prefix.

When I add dcterms to the islandora.module namespace declaration section, things are fixed.

I know dc is defined by drupal to be the dcterms namespace. So one of two things needs to happen -- all the dcterms references in the rdf mapping files need to change to dc - or - the dcterms prefix should be added to the islandora.module. I'd prefer the later solution, because dc pointing to dcterms may seem a bit confusing to users who regularly use both http://purl.org/dc/terms/ and http://purl.org/dc/elements/1.1/.

seth-shaw-unlv commented 4 years ago

Admittedly, I should have caught those particular "dcterms" mappings when reviewing the PR that added them before merging it. That stated, I think the idea of explicitly adding the "dcterms" namespace (along with updating our existing mappings to use "dcterms" instead of "dc") is appropriate.

seth-shaw-unlv commented 4 years ago

Tagging MIG folks: @mbolam,@rtilla1, and @rosiel... Would there be any objections to us explicitly adding the 'dcterms' namespace and using them in our RDF Mappings? (Drupal core uses 'dc' to represent Dublin Core Terms and we've simply followed along.) We would keep 'dc11' for Elements.

whikloj commented 4 years ago

I think the path of least resistance is to duplicate the existing URL with the new or more correct "dcterms". So I am 👍 on this

bseeger commented 4 years ago

I'll add another PR for the islandora_defaults changing the dc prefixes to dcterms for consistency.

bseeger commented 4 years ago

PR changing dc to dcterms in config files: https://github.com/Islandora/islandora_defaults/pull/22

rosiel commented 4 years ago

Great catch @bseeger, this sounds awesome. So to be clear, we will in practice use dc11 as the prefix for dc elements, and dcterms for, well, dcterms. Disambiguation ftw.

seth-shaw-unlv commented 4 years ago

Fixed with https://github.com/Islandora/islandora/commit/82097d5307156e599334bd28b5dc51a06a816e90 and https://github.com/Islandora/islandora_defaults/commit/589bf5043bbcbcb7caea3f011b8bee753040b627.

seth-shaw-unlv commented 4 years ago

I neglected to check OAI-PMH before merging.... 🤦‍♂️. It assumes we are using the old DC namespace.