FlaLD_QDC - mrmiguez/citrus GitHub Wiki
Transformation service to convert dcterms metadata into DPLA MAPv4 JSON-LD.
Transformation map
| MAPv4 field | Element | pymods method call | Notes |
|---|---|---|---|
| sourceResource.alternative | dcterms:alternative |
`DCRecord.get_element('.//{0}alternative'.format(dcterms)) | |
| sourceResource.collection | none | none | |
| sourceResource.contributor | dc:contributor |
DCRecord.get_element('.//{0}contributor'.format(dc)) |
Split on ; delimiter |
| sourceResource.creator | dc:creator |
DCRecord.get_element('.//{0}creator'.format(dc)) |
Split on ; delimiter |
| sourceResource.date | dcterms:created |
DCRecord.get_element('.//{0}created'.format(dcterms)) |
Copied to both begin and end attributes of sR.date |
| sourceResource.description | dc:description and dcterms:abstract |
DCRecord.get_element('.//{0}description'.format(dc)) and DCRecord.get_element('.//{0}abstract'.format(dcterms)) |
Split on ; delimiter |
| sourceResource.extent | dcterms:extent |
DCRecord.get_element('.//{0}extent'.format(dcterms)) |
Split on ; delimiter |
| sourceResource.format | none | none | |
| sourceResource.genre | dc:format |
DCRecord.get_element('.//{0}format'.format(dc)) |
Split on ; delimiter. If format value matches a value in IANA_type_list, the text is passed to a file_format variable |
| sourceResource.identifier | dc:identifier |
DCRecord.get_element('.//{0}identifier'.format(dc)) |
|
| sourceResource.language | dc:language |
DCRecord.get_element('.//{0}language'.format(dc)) |
Element text length used to determine whether to use name or iso_639_3 attribute |
| sourceResource.place | dcterms:spacial |
DCRecord.get_element('.//{0}spatial'.format(dcterms)) |
Split on ; delimiter |
| sourceResource.publisher | dc:publisher |
DCRecord.get_element('.//{0}publisher'.format(dc)) |
|
| sourceResource.relation | none | none | |
| sourceResource.isReplacedBy | none | none | |
| sourceResource.replaces | none | none | |
| sourceResource.rights | dc:rights |
DCRecord.get_element('.//{0}rights'.format(dc)) |
Regular expression to catch rightsstatement.org URIs. Parsed into @id and text attributes as appropriate |
| sourceResource.subject | dc:subject |
DCRecord.get_element('.//{0}subject'.format(dc)) |
Split on ; delimiter |
| sourceResource.title | dc:title |
DCRecord.get_element('.//{0}title'.format(dc)) |
|
| sourceResource.type | dc:type |
DCRecord.get_element('.//{0}type'.format(dc)) |
Split on ; delimiter |
| webResource.fileFormat | none | none | |
| aggregation.dataProvider | none | none | Imported variable defined in citrus_config.CONFIG_DICT |
| aggregation.intermediateProvider | none | none | |
| aggregation.isShownAt | none | none | Value of is_shown_at captured from parsing dc:identifiers |
| aggregation.preview | none | none | Returned value of citrus.assets.thumbnail_service |
| aggregation.provider | none | none | Imported variable defined in citrus_config.PROVIDER |