Skip to content

Instantly share code, notes, and snippets.

@hellbunnie
Last active June 4, 2020 10:32
Show Gist options
  • Save hellbunnie/043851a8d4da99f9739be2a643a620a3 to your computer and use it in GitHub Desktop.
Save hellbunnie/043851a8d4da99f9739be2a643a620a3 to your computer and use it in GitHub Desktop.
Open Refine export template for use with the DRI Batch Metadata Template
{{forNonBlank(cells["Filename"], v, "FILENAME "+v.value, "")}}
<qualifieddc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:marcrel="http://www.loc.gov/marc.relators/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/marc.relators/ http://imlsdcc2.grainger.illinois.edu/registry/marcrel.xsd" xsi:noNamespaceSchemaLocation="http://dublincore.org/schemas/xmls/qdc/2008/02/11/qualifieddc.xsd">
{{forNonBlank(cells["dc:Identifier"], v, "<dc:identifier>"+v.value+"</dc:identifier>", "")}}
{{forNonBlank(cells["dc:Title"], v, "<dc:title>"+v.value+"</dc:title>", "")}}
{{forNonBlank(cells["dcterms:Alternative"], v, "<dcterms:alternative>"+v.value+"</dcterms:alternative>", "")}}
{{forNonBlank(cells["dc:Creator"], v, "<dc:creator>"+v.value+"</dc:creator>", "")}}
{{forNonBlank(cells["dc:Date"], v, "<dc:date>"+v.value+"</dc:date>", "")}}
{{forNonBlank(cells["dcterms:Created"], v, "<dcterms:created>"+v.value+"</dcterms:created>", "")}}
{{forNonBlank(cells["dcterms:Issued"], v, "<dcterms:issued>"+v.value+"</dcterms:issued>", "")}}
{{forNonBlank(cells["dc:Description"], v, "<dc:description>"+v.value+"</dc:description>", "")}}
{{forNonBlank(cells["dc:Rights"], v, "<dc:rights>"+v.value+"</dc:rights>", "")}}
{{forNonBlank(cells["dc:Type"], v, "<dc:type>"+v.value+"</dc:type>", "")}}
{{forNonBlank(cells["dc:Language"], v, "<dc:language>"+v.value+"</dc:language>", "")}}
{{forNonBlank(cells["dc:Contributor"], v, "<dc:contributor>"+v.value+"</dc:contributor>", "")}}
{{forNonBlank(cells["dc:Source"], v, "<dc:source>"+v.value+"</dc:source>", "")}}
{{forNonBlank(cells["dc:Coverage"], v, "<dc:coverage>"+v.value+"</dc:coverage>", "")}}
{{forNonBlank(cells["dcterms:Spatial"], v, "<dcterms:spatial>"+v.value+"</dcterms:spatial>", "")}}
{{forNonBlank(cells["dcterms:Temporal"], v, "<dcterms:temporal>"+v.value+"</dcterms:temporal>", "")}}
{{forNonBlank(cells["dc:Subject"], v, "<dc:subject>"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["dcterms:Depicted"], v, "<dcterms:depicted>"+v.value+"</dcterms:depicted>", "")}}
{{forNonBlank(cells["marcrel:Aut"], v, "<dmarcrel:aut>"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["marcrel:Ivr"], v, "<dmarcrel:ivr>"+v.value+"</marcrel:ivr>", "")}}
{{forNonBlank(cells["dc:Relation"], v, "<dc:relation>"+v.value+"</dc:relation>", "")}}
{{forNonBlank(cells["determs:isVersionOf"], v, "<determs:isVersionOf>"+v.value+"</determs:isVersionOf>", "")}}
{{forNonBlank(cells["dcterms:hasVersion"], v, "<dcterms:hasVersion>"+v.value+"</dcterms:hasVersion>", "")}}
{{forNonBlank(cells["dcterms:isPartOf"], v, "<dcterms:isPartOf>"+v.value+"</dcterms:isPartOf>", "")}}
{{forNonBlank(cells["dcterms:hasPart"], v, "<dcterms:hasPart>"+v.value+"</dcterms:hasPart>", "")}}
{{forNonBlank(cells["dcterms:isReferencedBy"], v, "<dcterms:isReferencedBy>"+v.value+"</dcterms:isReferencedBy>", "")}}
{{forNonBlank(cells["dcterms:references"], v, "<dcterms:references>"+v.value+"</dcterms:references>", "")}}
{{forNonBlank(cells["dcterms:isFormatOf"], v, "<dcterms:isFormatOf>"+v.value+"</dcterms:isFormatOf>", "")}}
{{forNonBlank(cells["dcterms:hasFormat"], v, "<dcterms:hasFormat>"+v.value+"</dcterms:hasFormat>", "")}}
</qualifieddc>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment