FlaLD_MODS - mrmiguez/citrus GitHub Wiki

Transformation service to convert MODSXML metadata into DPLA MAPv4 JSON-LD.

pymods has the capability to return various linked data URI values along with text values. When available, this information is parsed into @id or other appropriate attributes.

Transformation map

MAPv4 field Element pymods method call Notes
sourceResource.alternative mods:titleInfo/* MODSRecord.titles All titles after the first in document order
sourceResource.collection mods:relatedItem[@type="host"]/* MODSRecord.collection Parsed into name, host, and _:id attributes as appropriate.
sourceResource.contributor mods:name/* MODSRecord.names Only if not of 'Creator' or 'cre' role
sourceResource.creator mods:name/* MODSRecord.get_creators
sourceResource.date any pymods date type MODSRecord.dates
sourceResource.description mods:abstract MODSRecord.abstract
sourceResource.extent mods:extent MODSRecord.extent
sourceResource.format mods:form MODSRecord.form
sourceResource.genre mods:genre MODSRecord.genre
sourceResource.identifier mods:url[@type="purl"] and mods:identifier MODSRecord.purl and MODSRecord.iid
sourceResource.language mods:language MODSRecord.language
sourceResource.pace mods:geographicCode MODSRecord.geographic_code Reconciliation is performed against the Getty TGN API to retrieve lat, long, and label information using citrus.assets.tgn_cache
sourceResource.publisher mods:publisher MODSRecord.publisher
sourceResource.relation none none
sourceResource.isReplacedBy none none
sourceResource.replaces none none
sourceResource.rights mods:accessCondition MODSRecord.rights rightsstatement.org URIs are parsed into @id attributes when available
sourceResource.subject mods:subject/* MODSRecord.subjects
sourceResource.title mods:titleInfo MODSRecord.titles Only first title in document order
sourceResource.type mods:typeOfResoruce MODSRecord.type_of_resource
webResource.fileFormat none none
aggregation.dataProvider none none Imported variable defined in citrus_config.CONFIG_DICT
aggregation.intermediateProvider none none
aggregation.isShownAt mods:location/url[@type="purl"] MODSRecord.purl
aggregation.preview none none Returned value of citrus.assets.thumbnail_service
aggregation.provider none none Imported variable defined in citrus_config.PROVIDER