Skip to content

JSON-LD context

TextRefs records are plain JSON that becomes linked data through a published JSON-LD context. The context maps TextRefs terms onto a small TextRefs ontology namespace (tr:) plus established vocabularies — SKOS for labels, schemes, and mapping relations, Dublin Core Terms for dates and provenance, schema.org for URLs and providers, and XSD for date typing.

The v1 context is served at:

https://textrefs.org/contexts/v1.jsonld
PrefixNamespaceUsed for
trhttps://textrefs.org/ontology#TextRefs object types, keys, and TextRefs-specific metadata
skoshttp://www.w3.org/2004/02/skos/core#Labels, schemes (inScheme), and mapping relations
dctermshttp://purl.org/dc/terms/created, modified, source, language, license
schemahttps://schema.org/url, provider, edition
xsdhttp://www.w3.org/2001/XMLSchema#xsd:date typing for created / modified

The MVP mapping relations map directly onto SKOS:

  • exactMatchskos:exactMatch
  • closeMatchskos:closeMatch

Use exactMatch only when the mapped object identifies the same reference with sufficient precision. If there is uncertainty about segmentation, edition, translation, coverage, or locator alignment, use closeMatch. See Specification §10.

{
"@context": {
"tr": "https://textrefs.org/ontology#",
"skos": "http://www.w3.org/2004/02/skos/core#",
"dcterms": "http://purl.org/dc/terms/",
"schema": "https://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"id": "@id",
"type": "@type",
"Work": "tr:Work",
"CitationSystem": "tr:CitationSystem",
"CanonicalReference": "tr:CanonicalReference",
"MappingAssertion": "tr:MappingAssertion",
"key": "tr:key",
"preferred_label": "skos:prefLabel",
"inScheme": { "@id": "skos:inScheme", "@type": "@id" },
"work_key": "tr:workKey",
"citation_system_key": "tr:citationSystemKey",
"locator": "tr:locator",
"normalization_version": "tr:normalizationVersion",
"status": "tr:status",
"source": "dcterms:source",
"created": { "@id": "dcterms:created", "@type": "xsd:date" },
"modified": { "@id": "dcterms:modified", "@type": "xsd:date" },
"relation": "tr:relation",
"exactMatch": { "@id": "skos:exactMatch", "@type": "@id" },
"closeMatch": { "@id": "skos:closeMatch", "@type": "@id" },
"target": "tr:target",
"target_kind": "tr:targetKind",
"identifier": { "@id": "tr:identifier", "@type": "@id" },
"provider": "schema:provider",
"url": { "@id": "schema:url", "@type": "@id" },
"language": "dcterms:language",
"edition": "schema:bookEdition",
"access": "tr:access",
"license": "dcterms:license",
"license_url": { "@id": "dcterms:license", "@type": "@id" }
}
}

key, work_key, and citation_system_key are plain strings in the core JSON format. Rich bibliographic and authority data belongs in external systems and is connected to TextRefs records through MappingAssertions. The license term carries an SPDX identifier string; license_url (optional fallback) carries an IRI. MappingAssertion.source is a plain string in v0.1 — a structured W3C PROV-O mapping (prov:wasDerivedFrom) is reserved for a later context version.