Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
OpenRefine Nomisma RDF template with IIIF services (Getty example)
<nmo:NumismaticObject rdf:about="{{cells['URI'].value}}">
<dcterms:title xml:lang="en">{{cells["name"].value}}</dcterms:title>
<dcterms:identifier>{{cells["accession"].value}}</dcterms:identifier>
<nmo:hasCollection rdf:resource="http://nomisma.org/id/getty_museum"/>
<nmo:hasTypeSeriesItem rdf:resource="{{cells["Type URI"].value}}"/>
{{forNonBlank(cells["weight"], c, '<nmo:hasWeight rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">' + c.value + '</nmo:hasWeight>', "")}}
{{forNonBlank(cells["Obverse IIIF Service"], c, '<nmo:hasObverse>\n\t\t<rdf:Description>\n\t\t\t<foaf:thumbnail rdf:resource="' + c.value + '/full/,120/0/native.jpg"/>\n\t\t\t<foaf:depiction rdf:resource="' + c.value + '/full/600,/0/native.jpg"/>\n\t\t</rdf:Description>\n\t</nmo:hasObverse>', "")}}
{{forNonBlank(cells["Reverse IIIF Service"], c, '<nmo:hasReverse>\n\t\t<rdf:Description>\n\t\t\t<foaf:thumbnail rdf:resource="' + c.value + '/full/,120/0/native.jpg"/>\n\t\t\t<foaf:depiction rdf:resource="' + c.value + '/full/600,/0/native.jpg"/>\n\t\t</rdf:Description>\n\t</nmo:hasReverse>', "")}}
<void:inDataset rdf:resource="http://www.getty.edu/museum/"/>
</nmo:NumismaticObject>
{{forNonBlank(cells["Obverse IIIF Service"], c, '<edm:WebResource rdf:about="' + c.value + '/full/600,/0/native.jpg">\n\t\t<svcs:has_service rdf:resource="' + c.value + '"/>\n\t\t<dcterms:isReferencedBy rdf:resource="' + c.value + '/info.json"/>\n\t</edm:WebResource>', "")}}
{{forNonBlank(cells["Obverse IIIF Service"], c, '<svcs:Service rdf:about="' + c.value + '">\n\t\t<dcterms:conformsTo rdf:resource="http://iiif.io/api/image"/>\n\t\t<doap:implements rdf:resource="http://iiif.io/api/image/2/level1.json"/>\n\t</svcs:Service>', "")}}
{{forNonBlank(cells["Reverse IIIF Service"], c, '<edm:WebResource rdf:about="' + c.value + '/full/600,/0/native.jpg">\n\t\t<svcs:has_service rdf:resource="' + c.value + '"/>\n\t\t<dcterms:isReferencedBy rdf:resource="' + c.value + '/info.json"/>\n\t</edm:WebResource>', "")}}
{{forNonBlank(cells["Reverse IIIF Service"], c, '<svcs:Service rdf:about="' + c.value + '">\n\t\t<dcterms:conformsTo rdf:resource="http://iiif.io/api/image"/>\n\t\t<doap:implements rdf:resource="http://iiif.io/api/image/2/level1.json"/>\n\t</svcs:Service>', "")}}
@ewg118

This comment has been minimized.

Copy link
Owner Author

@ewg118 ewg118 commented Apr 2, 2021

Prefix:

<rdf:RDF xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:nm="http://nomisma.org/id/" xmlns:nmo="http://nomisma.org/ontology#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:void="http://rdfs.org/ns/void#" xmlns:edm="http://www.europeana.eu/schemas/edm/" xmlns:svcs="http://rdfs.org/sioc/services#" xmlns:doap="http://usefulinc.com/ns/doap#">

Suffix:

</rdf:RDF>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment