|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace Drupal\pcdora\Plugin\OaiMetadataMap; |
| 4 | + |
| 5 | +use Drupal\dgi_standard_oai\Plugin\OaiMetadataMap\DgiStandard; |
| 6 | + |
| 7 | +/** |
| 8 | + * OAI Dublin Core mapping for PC. |
| 9 | + * |
| 10 | + * @OaiMetadataMap( |
| 11 | + * id = "pc_dublin_core", |
| 12 | + * label = @Translation("OAI Dublin Core (PC)"), |
| 13 | + * metadata_format = "oai_dc", |
| 14 | + * template = { |
| 15 | + * "type" = "module", |
| 16 | + * "name" = "rest_oai_pmh", |
| 17 | + * "directory" = "templates", |
| 18 | + * "file" = "oai-default" |
| 19 | + * } |
| 20 | + * ) |
| 21 | + */ |
| 22 | +class DublinCore extends DgiStandard { |
| 23 | + |
| 24 | + |
| 25 | + /** |
| 26 | + * Mapping of paragraph fields to maps of subfields to element names. |
| 27 | + * |
| 28 | + * @var string[][] |
| 29 | + */ |
| 30 | + protected const PARAGRAPH_MAPPING = [ |
| 31 | + 'field_faceted_subject' => [ |
| 32 | + 'field_topic_general_subdivision_' => 'dcterms:subject', |
| 33 | + 'field_temporal_chronological_sub' => 'dcterms:temporal', |
| 34 | + 'field_geographic_geographic_subd' => 'dcterms:spatial', |
| 35 | + ], |
| 36 | + 'field_hierarchical_geographic_su' => [ |
| 37 | + 'field_continent' => 'dcterms:spatial', |
| 38 | + 'field_country' => 'dcterms:spatial', |
| 39 | + 'field_region' => 'dcterms:spatial', |
| 40 | + 'field_state' => 'dcterms:spatial', |
| 41 | + 'field_territory' => 'dcterms:spatial', |
| 42 | + 'field_county' => 'dcterms:spatial', |
| 43 | + 'field_city' => 'dcterms:spatial', |
| 44 | + 'field_city_section' => 'dcterms:spatial', |
| 45 | + 'field_island' => 'dcterms:spatial', |
| 46 | + 'field_area' => 'dcterms:spatial', |
| 47 | + 'field_extraterrestrial_area' => 'dcterms:spatial', |
| 48 | + ], |
| 49 | + 'field_origin_information' => [ |
| 50 | + 'field_date_created' => 'dcterms:created', |
| 51 | + 'field_date_issued' => 'dcterms:issued', |
| 52 | + 'field_date_note' => 'dcterms:date', |
| 53 | + 'field_date_captured' => 'dcterms:date', |
| 54 | + 'field_date_valid' => 'dcterms:date', |
| 55 | + 'field_date_modified' => 'dcterms:date', |
| 56 | + 'field_copyright_date' => 'dcterms:date', |
| 57 | + 'field_publisher' => 'dcterms:publisher', |
| 58 | + 'field_other_date' => 'dcterms:date', |
| 59 | + ], |
| 60 | + 'field_related_item' => [ |
| 61 | + 'field_title' => 'dcterms:relation', |
| 62 | + 'field_url' => 'dcterms:relation', |
| 63 | + ], |
| 64 | + ]; |
| 65 | + |
| 66 | +} |
0 commit comments