Skip to content

Instantly share code, notes, and snippets.

@ewg118
Last active August 21, 2024 14:11
Show Gist options
  • Save ewg118/3ae246ce69268618934da9c7143a6cd4 to your computer and use it in GitHub Desktop.
Save ewg118/3ae246ce69268618934da9c7143a6cd4 to your computer and use it in GitHub Desktop.
ANS CSV RDF export
<nmo:NumismaticObject rdf:about="{{cells['URI'].value}}">
<dcterms:title xml:lang="en">{{cells["Title"].value}}</dcterms:title>
<dcterms:identifier>{{cells["IDN"].value}}</dcterms:identifier>
<nmo:hasCollection rdf:resource="http://nomisma.org/id/ans"/>
<nmo:hasTypeSeriesItem rdf:resource="{{cells["Coin Type URI"].value}}"/>
{{forNonBlank(cells["Weight (in g)"], c, '<nmo:hasWeight rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">' + c.value + '</nmo:hasWeight>', "")}}
{{forNonBlank(cells["Diameter (in mm)"], c, '<nmo:hasDiameter rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">' + c.value + '</nmo:hasDiameter>', "")}}
{{forNonBlank(cells["Axis"], c, '<nmo:hasAxis rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">' + c.value + '</nmo:hasAxis>', "")}}
<nmo:hasObverse>
<rdf:Description>
<foaf:depiction rdf:resource="{{cells["Thumbnail_obv"].value}}"/>
</rdf:Description>
</nmo:hasObverse>
<nmo:hasReverse>
<rdf:Description>
<foaf:depiction rdf:resource="{{cells["Thumbnail_rev"].value}}"/>
</rdf:Description>
</nmo:hasReverse>
<void:inDataset rdf:resource="http://numismatics.org/search/"/>
</nmo:NumismaticObject>
@ewg118
Copy link
Author

ewg118 commented Aug 21, 2024

Prefix: <?xml version="1.0" encoding="UTF-8"?><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