Skip to content

Metadata Fields for mapping

Don Richards edited this page Jun 2, 2020 · 6 revisions

Source Authorities as part of the default configuration.

Machine Name Full Name
aat Art & Architecture Thesaurus
cash Canadian Subject Headings
fast FAST (Faceted Application of Subject Terminology)
gmgpc TGM II, Genre and physical characteristic terms
lcsh Library of Congress Subject Headings
lcshac Library of Congress Children's Subject Headings
mesh Medical Subject Headings
nal National Agricultural Library subject headings
rbgenr Genre Terms: A Thesaurus for Use in Rare Book and Special Collections Cataloguing
rvm Répertoire de vedettes-matière
tgn Getty Thesaurus of Geographic Names
tgm Thesaurus for Graphic Materials
lcgft Library of Congress Genre/Form Terms
other Other

Each of these are categories of metadata. There are several; Objects, subjects, person, geolocations, subjects, etc. Here's a breakdown of each (roughly) and how to modify using the GUI (NO TERMINAL). API options below.

Object

field_alternative_title:
  'dcterms:alternative'

field_edtf_date:
  'dcterms:date' # EDTF Converted to dateIso8601

field_edtf_date_created:
  'dcterms:created' # EDTF Converted to dateIso8601

field_edtf_date_issued:
  'dcterms:issued' # EDTF Converted to dateIso8601

field_description:
  'dcterms:description'

field_extent:
  'dcterms:extent'

field_identifier:
  'dcterms:identifier'

field_member_of:
  'pcdm:memberOf'
  mapping_type: rel

field_resource_type:
  'dcterms:type'
  mapping_type: rel

field_rights:
  'dcterms:rights'

field_subject:
  'dcterms:subject'
  mapping_type: rel

field_language:
  'dcterms:language'

field_genre:
  'dcterms:type'

field_physical_form:
  'dcterms:format'

field_edition:
  'rdau:P60329'

field_place_published:
  'relators:pup'

field_table_of_contents:
  'dcterms:tableOfContents'

field_dewey_classification:
  'dcterms:subject'

field_lcc_classification:
  'dcterms:subject'

field_subjects_name:
  'dcterms:subject'

field_temporal_subject:
  'dcterms:temporal'

field_geographic_subject:
  'dcterms:spatial'

field_isbn:
  'dbpedia:isbn'

field_oclc_number:
  'dbpedia:oclc'

field_local_identifier:
  'dcterms:identifier'

field_note:
  'skos:note'

field_weight:
  'co:index'

title:
  'dcterms:title'

Person

name:
'schema:name'

description:
'schema:description'

field_person_alternate_names:
'schema:alternateName'

field_person_preferred_name/title
'Not sure' # Mrs.

field_person_preferred_name/given
'Not sure' # Virginia

field_person_preferred_name/middle
'Not sure' # Pearl

field_person_preferred_name/family
'Not sure' # Moore

field_person_preferred_name/generational
'Not sure' # Jr/Sr.

field_person_preferred_name/Credentials
'Not sure' # 

field_authority_link:
'schema:sameAs'

field_cat_date_begin:
'schema:birthDate'

field_cat_date_end:
'schema:deathDate'

Subject

name:
  'schema:name'

description:
  'schema:description'

field_authority_link:
  'schema:sameAs'

Extended Subject to include Source Authorities

name:
  'schema:name'

description:
  'schema:description'

field_authority_link:
  'schema:sameAs'

field_authority_link/title:
  'subject'

field_authority_link/source:
  'subject_authority'

field_authority_link/uri:
  'subject_uri'

CSV needed

subject subject_authority subject_uri
"Gardens, American" lcsh http://id.loc.gov/authorities/subjects/sh85053123

Editing

Export a single configuration /admin/config/development/configuration/single/export

Select:

  • Configuration type: REF mapping
  • Configuration Name: node.islandora_object Select which ever Configuration Name you want for modifying the mapping.

Copying the contents below Here is your configuration:

Keep a note of the Configuration Name (ie. node.islandora_object). You'll need it in the next step.

Screen Shot 2020-06-01 at 3 20 08 PM

Import a single configuration /admin/config/development/configuration/single/export by pasting the previously copied contents into the Paste your configuration here text area. You can change the content between "fieldMappings" and "title". Note that "created" and "changed" is generated by Drupal. Passing these values could result in an error.

Screen Shot 2020-06-01 at 3 56 24 PM

For this example I added fields_ARK under the fieldMappings. After making all of the changes I set the Custom Entity ID to the same as the one I want to override (the name previously noted ie. node.islandora_object)

fields_ARK:
  properties:
    - 'dcterms:identifier'

Click Import > Confirm

Now verify it saved the configuration by going back to the "Export a single configuration" page and the appropriate drop downs. /admin/config/development/configuration/single/export

Next, ingest an Islandora repository object and add ?_format=jsonld to the end of the node's URL (ie. http://localhost:8000/node/10664?_format=jsonld)

Screen Shot 2020-06-01 at 4 13 13 PM

REST API

The pattern of using ?_format= to get a different representation of content is provided by the RESTful Web Services (rest) module. It allows other services to interact with Drupal entities through HTTP requests (GET, POST, PATCH, and DELETE). Which operations are allowed, and with what formats (such as xml, json, and jsonld) is configured at admin/config/services/rest/. Note that only jsonld uses RDF mappings; the json and xml formats expose a structured object based on how Drupal sees the entity. Access to these alternate formats throught the REST API corresponds to permissions on the entity, so anyone with access content permission can view the JSON-LD version of that content. This is new as of [Drupal 8.2]](https://www.drupal.org/docs/8/api/restful-web-services-api/restful-web-services-api-overview#practical).

For more information on interacting with Drupal entities via REST requests, see An Introduction to RESTful Web Services in Drupal 8. To get a full length breakdown of this go to Islandora documentation on RDF Generation