Skip to content

Instantly share code, notes, and snippets.

@schuyberg
Last active December 13, 2017 11:35
Show Gist options
  • Save schuyberg/7ce949ab92ee4ce43d6f to your computer and use it in GitHub Desktop.
Save schuyberg/7ce949ab92ee4ce43d6f to your computer and use it in GitHub Desktop.
Digital Library JSON-LD metadata model development
{
"@context" : "dl-json-ld-context-0.3.json",
"@id": "http://example.id/1234",
"@type": "dctypes:collection",
"_dl-id": "DL UID",
"_dl-type" : "collection",
"_created" : "COLLECTION CREATION TIMESTAMP",
"_updated" : "COLLECTINO UPDATED TIMESTAMP",
"_theme" : "THEME",
"_aggregate" : "TRUE/FALSE",
"_aggregates-collections" : [
"dl-id",
"dl-id",
"dl-id"
],
"title" : "COLLECTION TITLE",
"description" : "COLLECTION DESCRIPTION",
"_thumb" : "Thumbnail item URL",
"_featured-items" : [
"URL",
"URL"
],
"_canned-searches" : [
{
"_alias" : "SEARCH ALIAS",
"_query" : "QUERY (URL?)"
},
{
"_alias" : "SEARCH ALIAS",
"_query" : "QUERY (URL?)"
}
],
"topic" : [
"TOPIC LABEL",
"TOPIC LABEL",
"TOPIC LABEL",
"TOPIC LABEL",
"TOPIC LABEL"
]
}
{
"@context": {
"ore": "http://www.openarchives.org/ore/terms/",
"edm": "http://www.europeana.eu/schemas/edm/",
"dc": "http://purl.org/dc/elements/1.1/",
"dcterms": "http://purl.org/dc/terms/",
"dctypes": "http://purl.org/dc/dcmitype/",
"lcsh": "http://id.loc.gov/authorities/subjects/",
"foaf": "http://xmlns.com/foaf/0.1/",
"schema": "http://schema.org/",
"skos": "http://www.w3.org/2004/02/skos/core#",
"mime" : "http://www.iana.org/assignments/media-types/media-types.xhtml",
"name" : "skos:prefLabel",
"label": { "@id" : "skos:prefLabel", "@container" : "@language"},
"sourceResource" : "edm:aggregatedCHO",
"extraFields" : "edm:aggregatedCHO",
"edm:aggregatedCHO": {
"@type": "@id"
},
"webResource": "edm:hasView",
"pages" : { "@id" : "dcterms:hasPart"},
"collection": { "@id": "dcterms:isPartOf", "@type": "dctypes:collection", "@container" : "@language"},
"topic" : "dc:subject",
"title": { "@id" : "dc:title", "@container" : "@language" },
"alt_title" : { "@id": "dc:alternative", "@container" : "@language"},
"creator": "dcterms:creator",
"contributor": "dcterms:contributor",
"publisher": "dc:publisher",
"temporal": "dcterms:temporal",
"date": { "@id": "dc:date", "@container" : "@language"},
"created": "dcterms:created",
"issued": "dcterms:issued",
"sort": null,
"available" : "dcterms:available",
"time_span": "edm:timeSpan",
"begin": "edm:begin",
"end": "edm:end",
"description": { "@id": "dc:description", "@container" : "@language"},
"extent": "dcterms:extent",
"subject": {"@id" : "dc:subject", "@container" : "@language"},
"spatial": "dcterms:spatial",
"lat" : null,
"long" : null,
"place" : {"@id" : "dc:coverage", "@container" : "@language"},
"person" : "foaf:name",
"genre": {"@id" : "dc:type", "@container" : "@language" },
"type": { "@id": "dc:type", "@type": "dctypes" },
"format": { "@id": "dcterms:format", "@type" : "mime" },
"language": "dc:language",
"note" : {"@id" : "skos:note", "@container" : "@language" },
"ubc_call_no" : "dc:identifier",
"access_id" : "dc:identifer",
"dig_id" : "dc:identifier",
"source": "edm:provider",
"source": "dc:source",
"dig_publisher" : "dc:publisher",
"rights": {"@id" : "dc:rights", "@container" : "@language" },
"license" : "dc:rights",
"full_text" : {"@id" : "@id", "@container" : "@language" },
"catalogue" : "dcterms:isReferencedBy",
"project_site" : "dcterms:isReferencedBy",
"source_id": "dc:identifier",
"size" : "dcterms:extent",
"condition" : "dcterms:extent",
"physical_description" : "extent",
"dimensions" : "extent"
}
}
{
"@context" : "https://rawgit.com/schuyberg/7ce949ab92ee4ce43d6f/raw/1e2102031060b668947619a937174ac3cc323007/dl-json-ld-context-0.3.json",
"@id": "http://example.id/1234",
"@type": "ore:Aggregation",
"_dl-id": "DL UID",
"_dl-type" : "DL TYPE: ITEM",
"_created" : "DL INGEST TIMESTAMP",
"_updated" : "DL UPDATED TIMESTAMP",
"_thumb" : "THUMBNAIL URL",
"_theme" : "THEME",
"collection" : {
"@id" : "COLLECTION-LANDING URL",
"name" : "DL COLLECTION NAME"
},
"sourceResource": {
"@type": "edm:ProvidedCHO",
"source_id" : "UID FROM SOURCE",
"source": {
"@id": "URI?",
"name": "SOURCE NAME"
},
"collection": {"en" : "SOURCE COLLECTION (ENGLISH DEFAULT)"},
"title" : {
"en" : "ENGLISH TITLE (DEFAULT)",
"zh" : "CHINESE TITLE",
"ja" : "JAPANESE TITLE"
},
"alt_title" : {
"en" : ["ALTERNATIVE TITLE (ENGLISH: DEFAULT)", "ANOTHER ALT TITLE"],
"zh" : ["ALTERNATIVE TITLE (CHINESE)", "ANOTHER ALT TITLE"],
"ja" : ["ALTERNATIVE TITLE (JAPANESE)", "ANOTHER ALT TITLE"]
},
"creator": ["CREATOR", "ANOTHER CREATOR"],
"contributor": ["CONTRIBUTOR", "ANOTHER CONTRIBUTOR"],
"publisher": [{
"name" : "PUBLISHER NAME",
"place" :{"en" : "PLACE OF PUB"},
"date" : "PUB DATE"
},{
"name" : "ANOTHER PUBLISHER NAME",
"place" :{"en" : "ANOTHER PLACE OF PUB"},
"date" : "PUB DATE"
}],
"temporal": {
"date": {
"en" : "ENGLISH DATE",
"zh" : "CHINESE DATE",
"ja" : "JAPANESE DATE"
},
"date_created": "DATE CREATED",
"date_issued": "DATE ISSUED",
"sort_date": "SORT DATE",
"available" : "DATE AVAILABLE"
},
"description": {"en" :" DESCRIPTION (ENGLISH DEFAULT)"},
"description": {
"en" : "ENGLISH DESCRIPTION",
"zh" : "CHINESE DESCRIPTION",
"ja" : "JAPANESE DESCRIPTION"
},
"extent": ["EXTENT", "ANOTHER EXTENT"],
"subject": {"en" : [ "SUBJECT ENGLISH", "SUBJECT 2 ENGLISH" ]},
"spatial": {
"place": {"en" : "PLACE NAME"},
"lat" : "LATITUDE",
"long" : "LONGITUDE"
},
"person" : "PERSONAL NAME",
"genre": {"en" : ["GENRE", "ANOTHER GENRE"]},
"type": ["TYPE", "ANOTHER TYPE"],
"format": "FORMAT",
"language" : ["LANGUAGE", "ANOTHER LANUAGE"],
"notes" : {"en" : "NOTES"},
"ubc_call_no" : "UBC CALL NO",
"access_id" : "ACCESS IDENTIFIER",
"rights": {"en" : "SOURCE RIGHTS"}
},
"webResource": [{
"@type": "edm:WebResource",
"@id": "URI OF RESOURCE",
"_handler" : "HANDLER (VIEWER)",
"type": "DCMITYPE",
"format" : "FORMAT: MIME",
"rights": {"en" : "WEB OBJECT RIGHTS"},
"object" : [{
"_DL-ID" : "DL PART 1 (PAGE LVL) ID",
"_created" : "DL INGEST TIMESTAMP",
"_updated" : "DL UPDATED TIMESTAMP",
"_file" : "FILE",
"previous" : "PREVIOUS PART ID (URI?)",
"next" : "NEXT PART ID (URI?)",
"title" : {"en" : "PAGE TITLE"},
"full_text" : {"en" : "PAGE TEXT"},
"_positions" : [{
"word": "&",
"pos": [{
"x": 1014,
"y": 1871,
"w": 45,
"h": 49
}]
}, {
"word": "(2",
"pos": [{
"x": 901,
"y": 1870,
"w": 87,
"h": 48
}]
}, {
"word": "(i",
"pos": [{
"x": 1307,
"y": 2076,
"w": 48,
"h": 47
}]
}, {
"word": "-quee",
"pos": [{
"x": 929,
"y": 2662,
"w": 188,
"h": 10
}]
}]
}]
}],
"originalRecord": "ORIGINAL RECORD"
}
{
"@context": {
"ore": "http://www.openarchives.org/ore/terms/",
"edm": "http://www.europeana.eu/schemas/edm/",
"dc": "http://purl.org/dc/elements/1.1/",
"dcterms": "http://purl.org/dc/terms/",
"dctypes": "http://purl.org/dc/dcmitype/",
"lcsh": "http://id.loc.gov/authorities/subjects/",
"foaf": "http://xmlns.com/foaf/0.1/",
"schema": "http://schema.org/",
"skos": "http://www.w3.org/2004/02/skos/core#",
"name": "skos:prefLabel",
"sourceResource": "edm:aggregatedCHO",
"edm:aggregatedCHO": {
"@type": "@id"
},
"webResource": "edm:hasView",
"hasPart" : "dcterms:hasPart",
"collection": {
"@id": "dcterms:isPartOf",
"@type": "dctypes:collection"
},
"title": { "@id" : "dc:title" },
"title_en": { "@id" : "dc:title", "@language" : "en" },
"title_ja": { "@id" : "dc:title", "@language" : "ja" },
"alt_title" : "dc:alternative",
"alt_title_en": { "@id" : "dc:title", "@language" : "en" },
"alt_title_ja": { "@id" : "dc:title", "@language" : "ja" },
"creator": "dc:creator",
"format": "dc:format",
"contributor": "dc:contributor",
"publisher": "dc:publisher",
"description": "dc:description",
"subject": "dc:subject",
"extent": "dcterms:extent",
"coverage": "dc:coverage",
"language": "dc:language",
"source": "dc:source",
"rights": "dc:rights",
"sourceID": "dc:identifier",
"source": "edm:provider",
"type": {
"@id": "dc:type",
"@type": "dctypes"
},
"genre": "dc:type",
"temporal": "dcterms:temporal",
"date": "dc:date",
"sort": null,
"decade": null,
"timeSpan": "edm:timeSpan",
"begin": "edm:begin",
"end": "edm:end",
"geo": "edm:place",
"lat_long": "wgs85:lat_long",
"place_name" : "dc:coverage"
},
"@id": "http://example.id/1234",
"@type": "ore:Aggregation",
"_id": "DL UID",
"_type" : "DL TYPE: ITEM",
"_compound" : "IS COMPOUND OBJ? (t/f)",
"_created" : "DL INGEST TIMESTAMP",
"_updated" : "DL UPDATED TIMESTAMP",
"_thumb" : "THUMBNAIL URL",
"_theme" : "THEME",
"_mediaHandler" : "MEDIA HANDLER",
"sourceResource": {
"@type": "edm:ProvidedCHO",
"sourceID" : "ID (original)",
"title": "TITLE (NO LANG SPECIFIED)",
"title_en": "TITLE (ENGLISH)",
"title_ja": "TITLE (JAPANESE)",
"alt_title": "ALTERNATIVE TITLE (NO LANG SPECIFIED)",
"alt_title_en": "ALTERNATIVE TITLE (ENGLISH)",
"alt_title_ja": "ALTERNATIVE TITLE (JAPANESE)",
"creator": "CREATOR",
"contributor": "CONTRIBUTOR",
"publisher": "PUBLISHER",
"description": "DESCRIPTION",
"subject": [{
"name": "SUBJECT NAME"
}, {
"name": "SUBJECT NAME"
}],
"extent": "EXTENT",
"collection": "SOURCE COLLECTION",
"format": "FORMAT",
"type": "TYPE",
"genre": "GENRE",
"temporal": {
"date": "DATE",
"sort": "SORT",
"decade": "DECADE"
},
"source": {
"@id": "URI?",
"name": "SOURCE NAME"
},
"rights": "SOURCE RIGHTS",
"geo": {
"name": "GEO NAME",
"latLong": "LAT/LONG"
}
},
"webResource": {
"@type": "edm:WebResource",
"@id": "WEBRESOURCE ID",
"format": "FORMAT",
"rights": "WEB OBJECT RIGHTS",
"type": "DCMITYPE",
"collection" : "COLLECTION",
"hasPart" : [
"PAGE 1 URL",
"PAGE 2 URL",
"PAGE etc. URL"
]
},
"originalRecord": "ORIGINAL RECORD"
}
@schuyberg
Copy link
Author

need @type for "hasPart" to describe pages of a compound object.

@schuyberg
Copy link
Author

see "TITLE" for example of proposed multilingual support

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