├── .github └── workflows │ ├── publish.yml │ └── test.yml ├── .gitignore ├── .gitmodules ├── Makefile ├── README.md ├── _quarto.yml ├── check-coverage.sh ├── context.json ├── examples ├── ddc-305.40941109033.concept.json ├── ddc-305.40941109033.concept.nt ├── ddc-612.112.concept.json ├── ddc-612.112.concept.nt ├── ddc-641.5.concept.json ├── ddc-641.5.concept.nt ├── ddc-641.50902.concept.json ├── ddc-gnd-1.mapping.json ├── ddc-gnd-2.mapping.json ├── example.concept.json ├── example.concept.nt ├── example.item.json ├── example1.annotation.json ├── geo.item.json ├── geo.item.nt ├── gnd-4130604-1.concept.json ├── gnd-4130604-1.concept.nt ├── gnd-7507432-1.concept.json ├── gnd-7507432-1.concept.nt ├── gnd.scheme.json ├── gnd.scheme.nt ├── gvk-co.occurrence.json ├── gvk-co.occurrence.nt ├── istanbul.event.json ├── item-types.scheme.json ├── jskos.distribution.json ├── mapping-ddc-gnd.json ├── marc.distribution.json ├── media.concept.json ├── media.concept.nt ├── memberRoles.concept.json ├── qualified-literal.concept.json ├── qualified-literal.concept.nt ├── qualified-relation-1.concept.json ├── qualified-relation-1.concept.nt ├── qualified-relation-2.concept.json ├── qualified.concept.json ├── qualified.concept.nt ├── rdfxml.distribution.json ├── resource.resource.json └── wikidata-occurrences.concept.json ├── jskos.qmd ├── package-lock.json ├── package.json ├── post-render ├── prefixes.json ├── schemas ├── README.md ├── annotation.schema.json ├── bundle.schema.json ├── concept.schema.json ├── concordance.schema.json ├── distribution.schema.json ├── item.schema.json ├── mapping.schema.json ├── occurrence.schema.json ├── registry.schema.json ├── resource.schema.json └── scheme.schema.json ├── style.css ├── test ├── examples-ld.js ├── examples-schema.js ├── frame.json └── lib │ └── test-examples.js └── version.yaml /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Quarto Publish 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: main 7 | 8 | jobs: 9 | build-deploy: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | contents: write 13 | steps: 14 | - name: Check out repository 15 | uses: actions/checkout@v4 16 | 17 | - name: Set up Quarto 18 | uses: quarto-dev/quarto-actions/setup@v2 19 | 20 | - name: Render and Publish 21 | uses: quarto-dev/quarto-actions/publish@v2 22 | with: 23 | target: gh-pages 24 | env: 25 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 26 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build: 7 | 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v4 12 | with: 13 | submodules: true 14 | - uses: actions/setup-node@v4 15 | with: 16 | node-version: 20.x 17 | - run: npm ci 18 | - run: npm test 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | *.html 3 | vendor/ 4 | node_modules/ 5 | 6 | .quarto/ 7 | docs/ 8 | 9 | /.quarto/ 10 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gbv/jskos/2f753e7c0d056c45b2a654532a13c4526269ff40/.gitmodules -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | default: 2 | quarto render 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This repository contains the specification of **JSKOS data format for knowledge organization systems** based on JSON and SKOS. See . 2 | 3 | Examples included in directory `examples` are checked against JSKOS JSON Schema and converted to RDF with JSON-LD. 4 | 5 | [![Test](https://github.com/gbv/jskos/actions/workflows/test.yml/badge.svg)](https://github.com/gbv/jskos/actions/workflows/test.yml) 6 | 7 | When releasing a new version of the spec, run `npm version patch` (or `minor`/`major`) to both add a Git tag for the version as well as update the version number in `package.json`. 8 | -------------------------------------------------------------------------------- /_quarto.yml: -------------------------------------------------------------------------------- 1 | project: 2 | type: manuscript 3 | output-dir: docs 4 | render: 5 | - "!*.md" 6 | post-render: 7 | - ./post-render 8 | 9 | resources: 10 | - context.json 11 | - prefixes.json 12 | 13 | repo-url: https://github.com/gbv/jskos 14 | 15 | manuscript: 16 | article: jskos.qmd 17 | code-links: 18 | - repo 19 | 20 | metadata-files: 21 | - version.yaml 22 | 23 | title: JSKOS data format for Knowledge Organization Systems 24 | authors: 25 | - name: Jakob Voß 26 | orcid: 0000-0002-7613-4123 27 | affiliations: 28 | - name: Verbundzentrale des GBV (VZG) 29 | # abstract: | 30 | # ... 31 | 32 | format: 33 | html: 34 | number-sections: true 35 | code-line-numbers: false 36 | highlight-style: kate 37 | theme: flatly 38 | css: style.css 39 | crossref: 40 | lst-prefix: "Example" 41 | lst-title: "Example" 42 | -------------------------------------------------------------------------------- /check-coverage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # check which fields ared defined in schema but not used in examples 4 | diff -u \ 5 | <(jq -r 'if type=="array" then .[] else . end|keys[]' examples/*.json | sort | uniq | egrep ^[a-z]) \ 6 | <(jq -r '.properties|keys[]' schemas/*.json | sort | uniq) \ 7 | | grep -E '^\+[a-z]' 8 | -------------------------------------------------------------------------------- /context.json: -------------------------------------------------------------------------------- 1 | { 2 | "@context": { 3 | "uri": "@id", 4 | "type": { 5 | "@id": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", 6 | "@type": "@id", 7 | "@container": "@set" 8 | }, 9 | "created": { 10 | "@id": "http://purl.org/dc/terms/created", 11 | "@type": "xsd:date" 12 | }, 13 | "issued": { 14 | "@id": "http://purl.org/dc/terms/issued", 15 | "@type": "xsd:date" 16 | }, 17 | "modified": { 18 | "@id": "http://purl.org/dc/terms/modified", 19 | "@type": "xsd:date" 20 | }, 21 | "creator": { 22 | "@id": "http://purl.org/dc/terms/creator", 23 | "@container": "@set" 24 | }, 25 | "contributor": { 26 | "@id": "http://purl.org/dc/terms/contributor", 27 | "@container": "@set" 28 | }, 29 | "publisher": { 30 | "@id": "http://purl.org/dc/terms/publisher", 31 | "@container": "@set" 32 | }, 33 | "partOf": { 34 | "@id": "http://purl.org/dc/terms/isPartOf", 35 | "@container": "@set" 36 | }, 37 | "url": { 38 | "@id": "http://xmlns.com/foaf/0.1/page", 39 | "@type": "@id" 40 | }, 41 | "identifier": { 42 | "@id": "http://purl.org/dc/terms/identifier", 43 | "@container": "@set" 44 | }, 45 | "notation": { 46 | "@id": "http://www.w3.org/2004/02/skos/core#notation", 47 | "@container": "@set" 48 | }, 49 | "prefLabel": { 50 | "@id": "http://www.w3.org/2004/02/skos/core#prefLabel", 51 | "@container": "@language" 52 | }, 53 | "altLabel": { 54 | "@id": "http://www.w3.org/2004/02/skos/core#altLabel", 55 | "@container": "@language" 56 | }, 57 | "hiddenLabel": { 58 | "@id": "http://www.w3.org/2004/02/skos/core#hiddenLabel", 59 | "@container": "@language" 60 | }, 61 | "note": { 62 | "@id": "http://www.w3.org/2004/02/skos/core#note", 63 | "@container": "@language" 64 | }, 65 | "scopeNote": { 66 | "@id": "http://www.w3.org/2004/02/skos/core#scopeNote", 67 | "@container": "@language" 68 | }, 69 | "definition": { 70 | "@id": "http://www.w3.org/2004/02/skos/core#definition", 71 | "@container": "@language" 72 | }, 73 | "example": { 74 | "@id": "http://www.w3.org/2004/02/skos/core#example", 75 | "@container": "@language" 76 | }, 77 | "historyNote": { 78 | "@id": "http://www.w3.org/2004/02/skos/core#historyNote", 79 | "@container": "@language" 80 | }, 81 | "editorialNote": { 82 | "@id": "http://www.w3.org/2004/02/skos/core#editorialNote", 83 | "@container": "@language" 84 | }, 85 | "changeNote": { 86 | "@id": "http://www.w3.org/2004/02/skos/core#changeNote", 87 | "@container": "@language" 88 | }, 89 | "subject": { 90 | "@id": "http://purl.org/dc/terms/subject", 91 | "@container": "@set" 92 | }, 93 | "subjectOf": { 94 | "@reverse": "http://purl.org/dc/terms/subject", 95 | "@container": "@set" 96 | }, 97 | "source": { 98 | "@id": "http://purl.org/dc/terms/source", 99 | "@container": "@set" 100 | }, 101 | "depiction": { 102 | "@id": "http://xmlns.com/foaf/0.1/depiction", 103 | "@type": "@id", 104 | "@container": "@set" 105 | }, 106 | "media": { 107 | "@id": "http://xmlns.com/foaf/0.1/depiction", 108 | "@context": "http://iiif.io/api/presentation/3/context.json" 109 | }, 110 | "place": { 111 | "@id": "http://schema.org/location", 112 | "@container": "@set" 113 | }, 114 | "startPlace": { 115 | "@id": "http://schema.org/fromLocation", 116 | "@container": "@set" 117 | }, 118 | "endPlace": { 119 | "@id": "http://schema.org/toLocation", 120 | "@container": "@set" 121 | }, 122 | "narrower": { 123 | "@id": "http://www.w3.org/2004/02/skos/core#narrower", 124 | "@container": "@set" 125 | }, 126 | "broader": { 127 | "@id": "http://www.w3.org/2004/02/skos/core#broader", 128 | "@container": "@set" 129 | }, 130 | "related": { 131 | "@id": "http://www.w3.org/2004/02/skos/core#related", 132 | "@container": "@set" 133 | }, 134 | "previous": { 135 | "@id": "http://rdf-vocabulary.ddialliance.org/xkos#previous", 136 | "@container": "@set" 137 | }, 138 | "next": { 139 | "@id": "http://rdf-vocabulary.ddialliance.org/xkos#next", 140 | "@container": "@set" 141 | }, 142 | "startDate": "http://schema.org/startDate", 143 | "endDate": "http://schema.org/endDate", 144 | "relatedDate": "http://www.w3.org/2000/01/rdf-schema#seeAlso", 145 | "relatedDates": "http://www.w3.org/2000/01/rdf-schema#seeAlso", 146 | "location": { 147 | "@id": "http://www.opengis.net/ont/geosparql#asGeoJSON", 148 | "@type": "@json" 149 | }, 150 | "address": "http://schema.org/address", 151 | "street": "http://schema.org/streetAddress", 152 | "ext": "http://schema.org/streetAddress", 153 | "pobox": "http://schema.org/postOfficeBoxNumber", 154 | "locality": "http://schema.org/addressLocality", 155 | "region": "http://schema.org/addressRegion", 156 | "code": "http://schema.org/postalCode", 157 | "country": "http://schema.org/addressCountry", 158 | "ancestors": { 159 | "@id": "http://www.w3.org/2004/02/skos/core#broaderTransitive", 160 | "@container": "@set" 161 | }, 162 | "inScheme": { 163 | "@id": "http://www.w3.org/2004/02/skos/core#inScheme", 164 | "@container": "@set" 165 | }, 166 | "topConceptOf": { 167 | "@id": "http://www.w3.org/2004/02/skos/core#topConceptOf", 168 | "@container": "@set" 169 | }, 170 | "topConcepts": { 171 | "@id": "http://www.w3.org/2004/02/skos/core#hasTopConcept", 172 | "@container": "@set" 173 | }, 174 | "versionOf": { 175 | "@id": "http://purl.org/dc/terms/isVersionOf", 176 | "@container": "@set" 177 | }, 178 | "extent": "http://purl.org/dc/terms/extent", 179 | "languages": { 180 | "@id": "http://purl.org/dc/terms/language", 181 | "@container": "@set" 182 | }, 183 | "license": { 184 | "@id": "http://purl.org/dc/terms/license", 185 | "@container": "@set" 186 | }, 187 | "deprecated": "http://www.w3.org/2002/07/owl#deprecated", 188 | "replacedBy": "http://purl.org/dc/terms/isReplacedBy", 189 | "namespace": "http://rdfs.org/ns/void#uriSpace", 190 | "uriPattern": "http://rdfs.org/ns/void#voidRegexPattern", 191 | "fromScheme": "http://rdfs.org/ns/void#subjectsTarget", 192 | "toScheme": "http://rdfs.org/ns/void#objectsTarget", 193 | "memberList": { 194 | "@id": "http://www.loc.gov/mads/rdf/v1#componentList", 195 | "@container": "@list" 196 | }, 197 | "memberSet": { 198 | "@id": "http://www.w3.org/2004/02/skos/core#member", 199 | "@container": "@set" 200 | }, 201 | "memberChoice": { 202 | "@id": "http://www.w3.org/2004/02/skos/core#member", 203 | "@container": "@set" 204 | }, 205 | "count": "http://rdfs.org/ns/void#entities", 206 | "distributions": { 207 | "@id": "http://www.w3.org/ns/dcat#distribution", 208 | "@container": "@set" 209 | }, 210 | "download": "http://www.w3.org/ns/dcat#downloadURL", 211 | "accessURL": "http://www.w3.org/ns/dcat#accessURL", 212 | "checksum": "http://spdx.org/rdf/terms#checksum", 213 | "mimetype": "http://www.w3.org/ns/dcat#mediaType", 214 | "packageFormat": "http://www.w3.org/ns/dcat#packageFormat", 215 | "compressFormat": "http://www.w3.org/ns/dcat#compressFormat", 216 | "format": "http://purl.org/dc/terms/format", 217 | "size": "http://www.w3.org/ns/dcat#byteSize", 218 | "value": "http://spdx.org/rdf/terms#checksumValue", 219 | "qualifiedRelations": "@nest", 220 | "qualifiedLiterals": "@nest", 221 | "qualifiedDates": "@nest", 222 | "resource": "http://www.w3.org/1999/02/22-rdf-syntax-ns#object", 223 | "date": "http://www.w3.org/1999/02/22-rdf-syntax-ns#object", 224 | "literal": { 225 | "@id": "http://www.w3.org/2008/05/skos-xl#literalForm", 226 | "@context": { 227 | "string": "@value", 228 | "language": "@language" 229 | } 230 | }, 231 | "rank": "http://wikiba.se/ontology#rank", 232 | "version": "http://www.w3.org/2002/07/owl#versionInfo", 233 | "justification": "https://w3id.org/sssom/mapping_justification" 234 | } 235 | } 236 | -------------------------------------------------------------------------------- /examples/ddc-305.40941109033.concept.json: -------------------------------------------------------------------------------- 1 | { 2 | "notation": [ "305.40941109033" ], 3 | "prefLabel": { "en": "Women — Scotland — 18th century" }, 4 | "memberList": [ 5 | { 6 | "uri": "http://dewey.info/class/305.4/e23/", 7 | "notation": ["305.4"], 8 | "prefLabel": { "en": "Women" } 9 | }, 10 | { 11 | "uri": "http://dewey.info/class/2--411/e23/", 12 | "notation": ["T2--411"], 13 | "prefLabel": { "en": "Scotland" } 14 | }, 15 | { 16 | "uri": "http://dewey.info/class/1--09033/e23/", 17 | "notation": ["T1--09033"], 18 | "prefLabel": { "en": "18th century, 1700-1799" } 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /examples/ddc-305.40941109033.concept.nt: -------------------------------------------------------------------------------- 1 | "T1--09033" . 2 | "18th century, 1700-1799"@en . 3 | "T2--411" . 4 | "Scotland"@en . 5 | "305.4" . 6 | "Women"@en . 7 | _:b0 _:b1 . 8 | _:b0 "305.40941109033" . 9 | _:b0 "Women — Scotland — 18th century"@en . 10 | _:b1 . 11 | _:b1 _:b2 . 12 | _:b2 . 13 | _:b2 _:b3 . 14 | _:b3 . 15 | _:b3 . 16 | -------------------------------------------------------------------------------- /examples/ddc-612.112.concept.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "http://dewey.info/class/612.112/e22/", 3 | "type": ["http://www.w3.org/2004/02/skos/core#Concept"], 4 | "notation": ["612.112"], 5 | "prefLabel": { "de": "Leukozyten (Weiße Blutkörperchen)" }, 6 | "broader": [ { 7 | "notation": ["612.11"], 8 | "prefLabel": { "de": "Blut" }, 9 | "uri": "http://dewey.info/class/612.11/e22/" 10 | } ], 11 | "narrower": [ { 12 | "notation": ["612.1121"], 13 | "prefLabel": { "de": "Biochemie" }, 14 | "uri": "http://dewey.info/class/612.1121/e22/" 15 | },{ 16 | "notation": ["612.1127"], 17 | "prefLabel": { "de": "Anzahl und Auszählung" }, 18 | "uri": "http://dewey.info/class/612.1127/e22/" 19 | } ], 20 | "ancestors": [ { 21 | "notation": ["612.11"], 22 | "prefLabel": { "de": "Blut" }, 23 | "uri": "http://dewey.info/class/612.11/e22/" 24 | },{ 25 | "notation": ["612.1"], 26 | "prefLabel": { "de": "Blut und Kreislauf" }, 27 | "uri": "http://dewey.info/class/612.1/e22/" 28 | },{ 29 | "notation": ["612"], 30 | "prefLabel": { "de": "Humanphysiologie" }, 31 | "uri": "http://dewey.info/class/612/e22/" 32 | },{ 33 | "notation": ["61"], 34 | "prefLabel": { "de": "Medizin & Gesundheit" }, 35 | "uri": "http://dewey.info/class/61/e22/" 36 | },{ 37 | "notation": ["6"], 38 | "prefLabel": { "de": "Technik, Medizin, angewandte Wissenschaften" }, 39 | "uri": "http://dewey.info/class/6/e22/" 40 | } ], 41 | "inScheme": [ { 42 | "uri":"http://dewey.info/scheme/version/e22/" 43 | },{ 44 | "uri": "http://dewey.info/scheme/edition/e22/" 45 | },{ 46 | "uri": "http://dewey.info/scheme/ddc/" 47 | } ] 48 | } 49 | -------------------------------------------------------------------------------- /examples/ddc-612.112.concept.nt: -------------------------------------------------------------------------------- 1 | "6" . 2 | "Technik, Medizin, angewandte Wissenschaften"@de . 3 | "61" . 4 | "Medizin & Gesundheit"@de . 5 | "612.1" . 6 | "Blut und Kreislauf"@de . 7 | "612.11" . 8 | "Blut"@de . 9 | . 10 | . 11 | . 12 | . 13 | . 14 | . 15 | . 16 | . 17 | . 18 | . 19 | . 20 | . 21 | "612.112" . 22 | "Leukozyten (Weiße Blutkörperchen)"@de . 23 | "612.1121" . 24 | "Biochemie"@de . 25 | "612.1127" . 26 | "Anzahl und Auszählung"@de . 27 | "612" . 28 | "Humanphysiologie"@de . 29 | -------------------------------------------------------------------------------- /examples/ddc-641.5.concept.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "http://dewey.info/class/641.5/e23/", 3 | "type": ["http://www.w3.org/2004/02/skos/core#Concept"], 4 | "notation": ["641.5"], 5 | "inScheme": [{"uri":"http://dewey.info/edition/e23/"}], 6 | "prefLabel": { 7 | "en": "Cooking", 8 | "de": "Kochen", 9 | "it": "Cucina" 10 | }, 11 | "broader": [ 12 | { 13 | "uri": "http://dewey.info/class/641/e23/", 14 | "notation": ["641"], 15 | "prefLabel": { 16 | "en": "Food and drink", 17 | "de": "Essen und Trinken", 18 | "it": "Cibi e bevande" 19 | } 20 | } 21 | ], 22 | "narrower": [ 23 | { 24 | "uri": "http://dewey.info/class/641.502/e23/", 25 | "notation": ["641.502"], 26 | "prefLabel": { 27 | "en": "Miscellany", 28 | "de": "Verschiedenes", 29 | "it": "Miscellanea" 30 | } 31 | }, 32 | { 33 | "uri": "http://dewey.info/class/641.508/e23/", 34 | "notation": ["641.508"], 35 | "prefLabel": { 36 | "en": "Cooking with respect to kind of persons", 37 | "de": "Kochen im Hinblick auf Personengruppen", 38 | "it": "Cucina in riferimento a categorie di persone" 39 | } 40 | }, 41 | { 42 | "uri": "http://dewey.info/class/641.509/e23/", 43 | "notation": ["641.509"], 44 | "prefLabel": { 45 | "en": "Historical, geographic, persons treatment", 46 | "de": "Hostorische, geographische, personenbezogene Behandlung", 47 | "it": "Storia, geografia, persone" 48 | }, 49 | "narrower": [ 50 | { 51 | "uri": "http://dewey.info/class/641.5092/e23/", 52 | "notation": ["641.5092"], 53 | "prefLabel": { 54 | "en": "Cooks", 55 | "de": "Köche", 56 | "it": "Cuochi" 57 | } 58 | } 59 | ] 60 | }, 61 | { 62 | "uri": "http://dewey.info/class/641.59/e23/", 63 | "notation": ["641.59"], 64 | "prefLabel": { 65 | "en": "Cooking characteristic of specific geographic environments, ethnic cooking", 66 | "de": "Merkmale der Küche einzelner geografischer Umgebungen, ethnische Küche", 67 | "it": "Cucina tipica di specifici ambienti geografici, cucina etnica" 68 | } 69 | } 70 | ] 71 | } 72 | -------------------------------------------------------------------------------- /examples/ddc-641.5.concept.nt: -------------------------------------------------------------------------------- 1 | . 2 | . 3 | . 4 | . 5 | . 6 | . 7 | . 8 | "641.5" . 9 | "Cooking"@en . 10 | "Cucina"@it . 11 | "Kochen"@de . 12 | "641.502" . 13 | "Miscellanea"@it . 14 | "Miscellany"@en . 15 | "Verschiedenes"@de . 16 | "641.508" . 17 | "Cooking with respect to kind of persons"@en . 18 | "Cucina in riferimento a categorie di persone"@it . 19 | "Kochen im Hinblick auf Personengruppen"@de . 20 | . 21 | "641.509" . 22 | "Historical, geographic, persons treatment"@en . 23 | "Hostorische, geographische, personenbezogene Behandlung"@de . 24 | "Storia, geografia, persone"@it . 25 | "641.5092" . 26 | "Cooks"@en . 27 | "Cuochi"@it . 28 | "Köche"@de . 29 | "641.59" . 30 | "Cooking characteristic of specific geographic environments, ethnic cooking"@en . 31 | "Cucina tipica di specifici ambienti geografici, cucina etnica"@it . 32 | "Merkmale der Küche einzelner geografischer Umgebungen, ethnische Küche"@de . 33 | "641" . 34 | "Cibi e bevande"@it . 35 | "Essen und Trinken"@de . 36 | "Food and drink"@en . 37 | -------------------------------------------------------------------------------- /examples/ddc-641.50902.concept.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "http://dewey.info/class/641.50902/e23/", 3 | "type": ["http://www.w3.org/2004/02/skos/core#Concept"], 4 | "notation": ["641.50902"], 5 | "inScheme": [{"uri":"http://dewey.info/edition/e23/"}], 6 | "memberList": [ 7 | { 8 | "uri": "http://dewey.info/class/641.5/e23/", 9 | "notation": ["641.5"], 10 | "prefLabel": {"en": "Cooking"} 11 | }, 12 | { 13 | "uri": "http://dewey.info/class/1--0902/e23", 14 | "notation": ["T1--0902"], 15 | "prefLabel": {"en": "*6th-15th centuries, 500-1499"} 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /examples/ddc-gnd-1.mapping.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": ["http://www.w3.org/2004/02/skos/core#closeMatch"], 3 | "fromScheme": {"uri":"http://dewey.info/scheme/edition/e22/"}, 4 | "toScheme": {"uri":"http://d-nb.info/gnd/7749153-1"}, 5 | "from": { 6 | "memberSet": [ { 7 | "uri": "http://dewey.info/class/612.112/e22/", 8 | "notation": ["612.112"] 9 | } ] 10 | }, 11 | "to": { 12 | "memberSet": [ { 13 | "uri": "http://d-nb.info/gnd/4074195-3", 14 | "prefLabel": { "de": "Leukozyt" } 15 | } ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/ddc-gnd-2.mapping.json: -------------------------------------------------------------------------------- 1 | { 2 | "fromScheme": {"uri":"http://dewey.info/scheme/edition/e22/"}, 3 | "from": { 4 | "memberSet": [ { 5 | "uri": "http://dewey.info/class/612.112/e22/", 6 | "notation": ["612.112"] 7 | } ] 8 | }, 9 | "toScheme": {"uri":"http://d-nb.info/gnd/7749153-1"}, 10 | "to": { 11 | "memberChoice": [ { 12 | "uri": "http://d-nb.info/gnd/4074195-3", 13 | "prefLabel": { "de": "Leukozyt" } 14 | },{ 15 | "uri": "http://d-nb.info/gnd/4141893-1", 16 | "prefLabel": { "de": "Alkalische Leukozytenphosphatase" } 17 | },{ 18 | "uri": "http://d-nb.info/gnd/7606617-4", 19 | "prefLabel": { "de": "Blutlymphozyt" } 20 | },{ 21 | "uri": "http://d-nb.info/gnd/4158047-3", 22 | "prefLabel": { "de": "Granulozyt" } 23 | },{ 24 | "uri": "http://d-nb.info/gnd/4227943-4", 25 | "prefLabel": { "de": "Leukozytenadhäsion" } 26 | },{ 27 | "uri": "http://d-nb.info/gnd/4166696-3", 28 | "prefLabel": { "de": "Leukozytenphosphatase" } 29 | },{ 30 | "uri": "http://d-nb.info/gnd/4285013-7", 31 | "prefLabel": { "de": "Monozyt" } 32 | } ] 33 | }, 34 | "mappingRelevance": 0.5 35 | } 36 | -------------------------------------------------------------------------------- /examples/example.concept.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "http://example.org/terminology/P", 3 | "type": ["http://www.w3.org/2004/02/skos/core#Concept"], 4 | "scopeNote": { 5 | "en": ["state of harmony characterized by lack of violent conflict and freedom from fear of violence"], 6 | "de": ["Abwesenheit von Gewalt, Angst und anderen Störungen"] 7 | }, 8 | "prefLabel": { 9 | "en": "peace", 10 | "de": "Frieden" 11 | }, 12 | "altLabel": { 13 | "de": ["Friede"] 14 | }, 15 | "notation": ["P"], 16 | "narrower": [ 17 | { 18 | "prefLabel": { 19 | "en": "world peace", 20 | "de": "Weltfrieden" 21 | } 22 | } 23 | ], 24 | "related": [ 25 | { 26 | "prefLabel": { "en": "war", "de": "Krieg" } 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /examples/example.concept.nt: -------------------------------------------------------------------------------- 1 | . 2 | "Friede"@de . 3 | _:b0 . 4 | "P" . 5 | "Frieden"@de . 6 | "peace"@en . 7 | _:b1 . 8 | "Abwesenheit von Gewalt, Angst und anderen Störungen"@de . 9 | "state of harmony characterized by lack of violent conflict and freedom from fear of violence"@en . 10 | _:b0 "Weltfrieden"@de . 11 | _:b0 "world peace"@en . 12 | _:b1 "Krieg"@de . 13 | _:b1 "war"@en . 14 | -------------------------------------------------------------------------------- /examples/example.item.json: -------------------------------------------------------------------------------- 1 | { 2 | "startDate": "Y-12424", 3 | "endDate": "2016/2023", 4 | "relatedDate": "2012T12:07", 5 | "relatedDates": ["2007-03-01T13:00:00Z","-2012","-0043-05-22","2001-21"] 6 | } 7 | -------------------------------------------------------------------------------- /examples/example1.annotation.json: -------------------------------------------------------------------------------- 1 | { 2 | "target": "https://coli-conc.gbv.de/api/mappings/f0cc5f65-5712-4820-9638-e662c0c4314e", 3 | "motivation": "assessing", 4 | "bodyValue": "+1", 5 | "creator": { 6 | "id": "https://coli-conc.gbv.de/login/users/722cc9c5-2ce3-4ca0-b4fb-fef1f62236af", 7 | "name": "Jakob Voß" 8 | }, 9 | "created": "2019-03-11T09:11:10.665Z", 10 | "id": "https://coli-conc.gbv.de/api/annotations/5f23368f-a63b-4b69-acd6-b403110df97c", 11 | "@context": "http://www.w3.org/ns/anno.jsonld", 12 | "type": "Annotation" 13 | } 14 | -------------------------------------------------------------------------------- /examples/geo.item.json: -------------------------------------------------------------------------------- 1 | { 2 | "startPlace": [{ "uri": "https://sws.geonames.org/2655984/" }], 3 | "endPlace": [{ "uri": "https://sws.geonames.org/3411923/" }], 4 | "place": [{ "uri": "https://sws.geonames.org/5128581" }], 5 | "location": { 6 | "type": "Point", 7 | "coordinates": [-49.946944, 41.7325, -3803] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/geo.item.nt: -------------------------------------------------------------------------------- 1 | _:b0 . 2 | _:b0 . 3 | _:b0 . 4 | _:b0 "{\"coordinates\":[-49.946944,41.7325,-3803],\"type\":\"Point\"}"^^ . 5 | -------------------------------------------------------------------------------- /examples/gnd-4130604-1.concept.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "http://d-nb.info/gnd/4074195-3", 3 | "type": ["http://www.w3.org/2004/02/skos/core#Concept"], 4 | "prefLabel": { 5 | "de": "Leukozyt" 6 | }, 7 | "altLabel": { 8 | "de": [ "Leukocyt", "Weißes Blutkörperchen", "Leukozyten", "Leukocyten" ] 9 | }, 10 | "broader": [ { 11 | "uri": "http://d-nb.info/gnd/4130604-1", 12 | "prefLabel": { "de": "Blutzelle" } 13 | } ], 14 | "narrower": [ { 15 | "uri": "http://d-nb.info/gnd/4036762-9", 16 | "prefLabel": { "de": "Lymphozyt" } 17 | }, { 18 | "uri": "http://d-nb.info/gnd/4158047-3", 19 | "prefLabel": { "de": "Granulozyt" } 20 | }, { 21 | "uri": "http://d-nb.info/gnd/4285013-7", 22 | "prefLabel": { "de": "Monozyt" } 23 | } ] 24 | } 25 | -------------------------------------------------------------------------------- /examples/gnd-4130604-1.concept.nt: -------------------------------------------------------------------------------- 1 | "Lymphozyt"@de . 2 | . 3 | "Leukocyt"@de . 4 | "Leukocyten"@de . 5 | "Leukozyten"@de . 6 | "Weißes Blutkörperchen"@de . 7 | . 8 | . 9 | . 10 | . 11 | "Leukozyt"@de . 12 | "Blutzelle"@de . 13 | "Granulozyt"@de . 14 | "Monozyt"@de . 15 | -------------------------------------------------------------------------------- /examples/gnd-7507432-1.concept.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "http://d-nb.info/gnd/7507432-1", 3 | "prefLabel": { "de": "Drei-Sektoren-Hypothese" }, 4 | "memberSet": [ 5 | { 6 | "uri": "http://d-nb.info/gnd/4126823-4", 7 | "prefLabel": { "de": "Sektoraler Strukturwandel" } 8 | }, 9 | { 10 | "uri": "http://d-nb.info/gnd/4161152-4", 11 | "prefLabel": { "de": "Hypothese" } 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /examples/gnd-7507432-1.concept.nt: -------------------------------------------------------------------------------- 1 | "Sektoraler Strukturwandel"@de . 2 | "Hypothese"@de . 3 | . 4 | . 5 | "Drei-Sektoren-Hypothese"@de . 6 | -------------------------------------------------------------------------------- /examples/gnd.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "definition" : { 3 | "-" : ["…"], 4 | "de" : ["Von der DNB in Kooperation mit den Verbundpartnern geführte gemeinsame Normdatei"], 5 | "en" : ["international authority file for personal names, subject headings and corporate bodies"] 6 | }, 7 | "identifier" : [ 8 | "http://bartoc.org/en/node/430", 9 | "http://d-nb.info/gnd/7749153-1", 10 | "http://viaf.org/viaf/188136221", 11 | "http://www.wikidata.org/entity/Q36578", 12 | null 13 | ], 14 | "namespace" : "http://d-nb.info/gnd/", 15 | "notation" : [ 16 | "GND" 17 | ], 18 | "notationPattern" : "[0-9X-]+", 19 | "prefLabel" : { 20 | "-" : "…", 21 | "ar" : "ملف استنادي متكامل", 22 | "de" : "Gemeinsame Normdatei", 23 | "en" : "Integrated Authority File", 24 | "ko" : "게마인자메 노름다타이" 25 | }, 26 | "type" : [ 27 | "http://www.w3.org/2004/02/skos/core#ConceptScheme" 28 | ], 29 | "uri" : "http://d-nb.info/gnd/7749153-1", 30 | "uriPattern" : "^http://d-nb\\.info/gnd/([0-9X-]+)$" 31 | } 32 | -------------------------------------------------------------------------------- /examples/gnd.scheme.nt: -------------------------------------------------------------------------------- 1 | "http://bartoc.org/en/node/430" . 2 | "http://d-nb.info/gnd/7749153-1" . 3 | "http://viaf.org/viaf/188136221" . 4 | "http://www.wikidata.org/entity/Q36578" . 5 | "http://d-nb.info/gnd/" . 6 | "^http://d-nb\\.info/gnd/([0-9X-]+)$" . 7 | . 8 | "Von der DNB in Kooperation mit den Verbundpartnern geführte gemeinsame Normdatei"@de . 9 | "international authority file for personal names, subject headings and corporate bodies"@en . 10 | "GND" . 11 | "Gemeinsame Normdatei"@de . 12 | "Integrated Authority File"@en . 13 | "ملف استنادي متكامل"@ar . 14 | "게마인자메 노름다타이"@ko . 15 | -------------------------------------------------------------------------------- /examples/gvk-co.occurrence.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "database": { "uri": "http://uri.gbv.de/database/gvk" }, 4 | "memberSet": [ 5 | { 6 | "uri": "http://uri.gbv.de/terminology/bk/08.22", 7 | "prefLabel": { "de": "Mittelalterliche Philosophie" } 8 | } 9 | ], 10 | "count": 3657, 11 | "modified": "2017-11-22", 12 | "url": "https://gso.gbv.de/DB=2.1/CMD?ACT=SRCHA&IKT=1016&SRT=YOP&TRM=bkl+08.22" 13 | }, 14 | { 15 | "database": { "uri": "http://uri.gbv.de/database/gvk" }, 16 | "memberSet": [ 17 | { 18 | "uri": "http://dewey.info/class/610/e23/", 19 | "prefLabel": { "en": "Medicine & health" } 20 | } 21 | ], 22 | "count": 144611, 23 | "modified": "2017-11-22", 24 | "url": "https://gso.gbv.de/DB=2.1/CMD?ACT=SRCHA&IKT=1016&SRT=YOP&TRM=ddc+610" 25 | }, 26 | { 27 | "database": { "uri": "http://uri.gbv.de/database/gvk" }, 28 | "memberSet": [ 29 | { "uri": "http://uri.gbv.de/terminology/bk/08.22" }, 30 | { "uri": "http://dewey.info/class/610/e23/" } 31 | ], 32 | "count": 2, 33 | "modified": "2017-11-22", 34 | "url": "https://gso.gbv.de/DB=2.1/CMD?ACT=SRCHA&IKT=1016&SRT=YOP&TRM=bkl+08.22+ddc+610" 35 | } 36 | ] 37 | -------------------------------------------------------------------------------- /examples/gvk-co.occurrence.nt: -------------------------------------------------------------------------------- 1 | "Medicine & health"@en . 2 | "Mittelalterliche Philosophie"@de . 3 | _:b0 "2017-11-22"^^ . 4 | _:b0 "3657"^^ . 5 | _:b0 . 6 | _:b0 . 7 | _:b1 "2017-11-22"^^ . 8 | _:b1 "144611"^^ . 9 | _:b1 . 10 | _:b1 . 11 | _:b2 "2017-11-22"^^ . 12 | _:b2 "2"^^ . 13 | _:b2 . 14 | _:b2 . 15 | _:b2 . 16 | -------------------------------------------------------------------------------- /examples/istanbul.event.json: -------------------------------------------------------------------------------- 1 | { 2 | "date": "1453-04-06/1453-05-29", 3 | "place": [ { 4 | "uri": "http://www.wikidata.org/entity/Q16869", 5 | "prefLabel": { "en": "Constantinople" } 6 | } ] 7 | } 8 | -------------------------------------------------------------------------------- /examples/item-types.scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": ["http://www.w3.org/2004/02/skos/core#ConceptScheme"], 3 | "topConcepts": [ 4 | { "uri": "http://www.w3.org/2004/02/skos/core#Concept" }, 5 | { "uri": "http://www.w3.org/2004/02/skos/core#ConceptScheme" }, 6 | { "uri": "http://purl.org/cld/cdtype/CatalogueOrIndex" }, 7 | { "uri": "http://www.w3.org/ns/dcat#Distribution" }, 8 | { "uri": "http://rdfs.org/ns/void#Linkset" }, 9 | { "uri": "http://www.w3.org/2004/02/skos/core#mappingRelation" } 10 | ], 11 | "concepts": [ 12 | { 13 | "uri": "http://www.w3.org/2004/02/skos/core#Concept", 14 | "prefLabel": { "en": "concept" } 15 | }, 16 | { 17 | "uri": "http://www.w3.org/2004/02/skos/core#ConceptScheme", 18 | "prefLabel": { "en": "concept scheme" } 19 | }, 20 | { 21 | "uri": "http://purl.org/cld/cdtype/CatalogueOrIndex", 22 | "prefLabel": { "en": "registry" }, 23 | "altLabel": { "en": [ "catalog", "Catalogue or Index" ] } 24 | }, 25 | { 26 | "uri": "http://www.w3.org/ns/dcat#Distribution", 27 | "prefLabel": { "en": "distribution" } 28 | }, 29 | { 30 | "uri": "http://rdfs.org/ns/void#Linkset", 31 | "identifier": [ 32 | "http://purl.org/spar/fabio/VocabularyMapping", 33 | "http://rdf-vocabulary.ddialliance.org/xkos#Correspondence" 34 | ], 35 | "prefLabel": { "en": "concordance" }, 36 | "altLabel": { "en": [ "linkset" ] } 37 | }, 38 | { 39 | "uri": "http://www.w3.org/2004/02/skos/core#mappingRelation", 40 | "prefLabel": { "en": "is in mapping relation with" } 41 | }, 42 | { 43 | "uri": "http://www.w3.org/2004/02/skos/core#closeMatch", 44 | "prefLabel": { "en": "has close match" }, 45 | "broader": [ { "uri": "http://www.w3.org/2004/02/skos/core#mappingRelation" } ] 46 | }, 47 | { 48 | "uri": "http://www.w3.org/2004/02/skos/core#exactMatch", 49 | "prefLabel": { "en": "has exact match" }, 50 | "broader": [ { "uri": "http://www.w3.org/2004/02/skos/core#closeMatch" } ] 51 | }, 52 | { 53 | "uri": "http://www.w3.org/2004/02/skos/core#broadMatch", 54 | "prefLabel": { "en": "has broader match" }, 55 | "broader": [ { "uri": "http://www.w3.org/2004/02/skos/core#mappingRelation" } ], 56 | "related": [ { "uri": "http://www.w3.org/2004/02/skos/core#narrowMatch" } ] 57 | }, 58 | { 59 | "uri": "http://www.w3.org/2004/02/skos/core#narrowMatch", 60 | "prefLabel": { "en": "has narrower match" }, 61 | "broader": [ { "uri": "http://www.w3.org/2004/02/skos/core#mappingRelation" } ], 62 | "related": [ { "uri": "http://www.w3.org/2004/02/skos/core#broadMatch" } ] 63 | }, 64 | { 65 | "uri": "http://www.w3.org/2004/02/skos/core#relatedMatch", 66 | "prefLabel": { "en": "has related match" }, 67 | "broader": [ { "uri": "http://www.w3.org/2004/02/skos/core#mappingRelation" } ] 68 | } 69 | ] 70 | } 71 | -------------------------------------------------------------------------------- /examples/jskos.distribution.json: -------------------------------------------------------------------------------- 1 | { 2 | "download": "http://example.org/data/dump.ndjson", 3 | "mimetype": "application/x-ndjson", 4 | "format": "http://format.gbv.de/jskos" 5 | } 6 | -------------------------------------------------------------------------------- /examples/mapping-ddc-gnd.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "creator": [{ 4 | "prefLabel": { 5 | "de": "CrissCross" 6 | }, 7 | "url": "http://ixtrieve.fh-koeln.de/crisscross/index.html" 8 | }], 9 | "type": ["http://www.w3.org/2004/02/skos/core#exactMatch"], 10 | "fromScheme": {"notation":["DDC"]}, 11 | "from": { 12 | "memberSet": [ 13 | { 14 | "notation": ["612.112"], 15 | "prefLabel": { "de": "Leukozyten (Weiße Blutkörperchen)"} 16 | } 17 | 18 | ] 19 | }, 20 | "toScheme": {"notation":["GND"]}, 21 | "to": { 22 | "memberSet": [ { 23 | "uri": "http://d-nb.info/gnd/4074195-3", 24 | "prefLabel": { "de": "Leukozyt" }, 25 | "notation":["4074195-3"] 26 | } ] 27 | } 28 | }, 29 | { 30 | "creator": [{ 31 | "prefLabel": { 32 | "de": "CrissCross" 33 | }, 34 | "url": "http://ixtrieve.fh-koeln.de/crisscross/index.html" 35 | }], 36 | "mappingRelevance": 0.5, 37 | "fromScheme": {"notation":["DDC"]}, 38 | "from": { 39 | "memberSet": [ { 40 | "uri": "http://dewey.info/class/612.112/e22/", 41 | "notation": ["612.112"], 42 | "prefLabel": { "de": "Leukozyten (Weiße Blutkörperchen)"} 43 | } ] 44 | }, 45 | "toScheme": {"notation":["GND"]}, 46 | "to": { 47 | "memberChoice": [ { 48 | "uri": "http://d-nb.info/gnd/4074195-3", 49 | "prefLabel": { "de": "Leukozyt" }, 50 | "notation":["4074195-3"] 51 | },{ 52 | "uri": "http://d-nb.info/gnd/4141893-1", 53 | "prefLabel": { "de": "Alkalische Leukozytenphosphatase" }, 54 | "notation":["4141893-1"] 55 | },{ 56 | "uri": "http://d-nb.info/gnd/7606617-4", 57 | "prefLabel": { "de": "Blutlymphozyt" }, 58 | "notation":["7606617-4"] 59 | },{ 60 | "uri": "http://d-nb.info/gnd/4158047-3", 61 | "prefLabel": { "de": "Granulozyt" }, 62 | "notation":["4158047-3"] 63 | },{ 64 | "uri": "http://d-nb.info/gnd/4227943-4", 65 | "prefLabel": { "de": "Leukozytenadhäsion" }, 66 | "notation":["4227943-4"] 67 | },{ 68 | "uri": "http://d-nb.info/gnd/4166696-3", 69 | "prefLabel": { "de": "Leukozytenphosphatase" }, 70 | "notation":["4166696-3"] 71 | },{ 72 | "uri": "http://d-nb.info/gnd/4285013-7", 73 | "prefLabel": { "de": "Monozyt" }, 74 | "notation":["4285013-7"] 75 | } ] 76 | } 77 | }, 78 | { 79 | "creator": [{ 80 | "prefLabel": { 81 | "de": "CrissCross" 82 | }, 83 | "url": "http://ixtrieve.fh-koeln.de/crisscross/index.html" 84 | }], 85 | "mappingRelevance": 0.2, 86 | "fromScheme": {"notation":["DDC"]}, 87 | "from": { 88 | "memberChoice": [ { 89 | "uri": "http://dewey.info/class/612.112/e22/", 90 | "notation": ["612.112"], 91 | "prefLabel": { "de": "Leukozyten (Weiße Blutkörperchen)"} 92 | } ] 93 | }, 94 | "toScheme": {"notation":["GND"]}, 95 | "to": { 96 | "memberSet": [ { 97 | "uri": "http://d-nb.info/gnd/4499720-6", 98 | "prefLabel": { "de": "Leukozytenintegrine" }, 99 | "notation":["4499720-6"] 100 | } ] 101 | } 102 | } 103 | ] 104 | -------------------------------------------------------------------------------- /examples/marc.distribution.json: -------------------------------------------------------------------------------- 1 | { 2 | "download": "http://example.org/data/dump.xml.gz", 3 | "mimetype": "application/xml", 4 | "format": "http://format.gbv.de/marc/authority", 5 | "compressFormat": "http://www.iana.org/assignments/media-types/application/gzip" 6 | } 7 | -------------------------------------------------------------------------------- /examples/media.concept.json: -------------------------------------------------------------------------------- 1 | { 2 | "media": [ { 3 | "type": "Manifest", 4 | "items": [], 5 | "thumbnail": [ 6 | { 7 | "type": "Image", 8 | "id": "http://example.org/1/thumbnail.jpg", 9 | "format": "image/jpeg" 10 | } 11 | ] 12 | } ] 13 | } 14 | -------------------------------------------------------------------------------- /examples/media.concept.nt: -------------------------------------------------------------------------------- 1 | "image/jpeg" . 2 | . 3 | _:b0 _:b1 . 4 | _:b1 . 5 | _:b1 . 6 | _:b1 . 7 | -------------------------------------------------------------------------------- /examples/memberRoles.concept.json: -------------------------------------------------------------------------------- 1 | { 2 | "prefLabel": { "en": "knights armor"}, 3 | "memberRoles": { 4 | "http://example.org/personality": [ 5 | { "prefLabel": { "en": "knight" } } 6 | ], 7 | "http://example.org/matter": [ 8 | { "prefLabel": { "en": "workwear" } } 9 | ], 10 | "http://example.org/energy": [ 11 | { "prefLabel": { "en": "fight" } } 12 | ], 13 | "http://example.org/time": [ 14 | { "prefLabel": { "en": "Middle Ages" } } 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/qualified-literal.concept.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "http://www.wikidata.org/entity/Q406", 3 | "qualifiedLiterals": { 4 | "http://www.w3.org/2008/05/skos-xl#prefLabel": [ 5 | { 6 | "type": [ "http://www.w3.org/2008/05/skos-xl#Label" ], 7 | "literal": { "string": "İstanbul", "language": "tr" }, 8 | "rank": "preferred" 9 | }, { 10 | "type": [ "http://www.w3.org/2008/05/skos-xl#Label" ], 11 | "literal": { "string": "Constantinople", "language": "en" }, 12 | "endDate": "1930" 13 | } 14 | ], 15 | "https://www.wikidata.org/wiki/Property:P395": [ 16 | { 17 | "literal": { "string": "34" } 18 | } 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /examples/qualified-literal.concept.nt: -------------------------------------------------------------------------------- 1 | _:b0 . 2 | _:b1 . 3 | _:b2 . 4 | _:b0 "preferred" . 5 | _:b0 . 6 | _:b0 "İstanbul"@tr . 7 | _:b1 "1930" . 8 | _:b1 . 9 | _:b1 "Constantinople"@en . 10 | _:b2 "34" . 11 | -------------------------------------------------------------------------------- /examples/qualified-relation-1.concept.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "http://www.wikidata.org/entity/Q42", 3 | "prefLabel": { "en": "Douglas Adams" }, 4 | "qualifiedRelations": { 5 | "http://www.wikidata.org/entity/P69": [ 6 | { 7 | "resource": { "uri": "http://www.wikidata.org/entity/Q4961791" }, 8 | "startDate": "1959", 9 | "endDate": "1970", 10 | "source": [ { "url": "https://www.brentwoodschool.co.uk/about/our-history/" } ] 11 | } 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/qualified-relation-1.concept.nt: -------------------------------------------------------------------------------- 1 | "Douglas Adams"@en . 2 | _:b0 . 3 | _:b0 _:b1 . 4 | _:b0 "1970" . 5 | _:b0 "1959" . 6 | _:b0 . 7 | _:b1 . 8 | -------------------------------------------------------------------------------- /examples/qualified-relation-2.concept.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "http://www.wikidata.org/entity/Q3033", 3 | "prefLabel": { "en": "Göttingen" }, 4 | "qualifiedRelations": { 5 | "http://www.wikidata.org/entity/P17": [ 6 | { 7 | "resource": { 8 | "uri": "http://www.wikidata.org/entity/Q183", 9 | "prefLabel": { "en": "Germany" } 10 | }, 11 | "startDate": "1990-10-03", 12 | "rank": "preferred" 13 | },{ 14 | "resource": { 15 | "uri": "http://www.wikidata.org/entity/Q713750", 16 | "prefLabel": { "en": "West Germany" } 17 | }, 18 | "startDate": "1949-05-23", 19 | "endDate": "1990-10-02", 20 | "rank": "normal" 21 | } 22 | ] 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /examples/qualified.concept.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "http://www.wikidata.org/entity/Q3033", 3 | "prefLabel": { "en": "Göttingen" }, 4 | "qualifiedRelations": { 5 | "http://www.wikidata.org/entity/P17": [ 6 | { 7 | "resource": { 8 | "uri": "http://www.wikidata.org/entity/Q183", 9 | "prefLabel": { "en": "Germany" } 10 | }, 11 | "startDate": "1990-10-03" 12 | } 13 | ] 14 | }, 15 | "qualifiedLiterals": { 16 | "http://www.w3.org/2008/05/skos-xl#prefLabel": [ 17 | { 18 | "type": [ "http://www.w3.org/2008/05/skos-xl#Label" ], 19 | "literal": { "string": "Göttingen", "language": "de" }, 20 | "startDate": "1447", 21 | "_comment": "Davor andere Schreibweisen ohne Umlaut" 22 | } 23 | ] 24 | }, 25 | "qualifiedDates": { 26 | "https://www.wikidata.org/wiki/Property:P571": [ 27 | { 28 | "date": "0953" 29 | } 30 | ] 31 | }, 32 | "_comment": "Nicht exakt Gründungsdatum aber erste Erwähnung" 33 | } 34 | -------------------------------------------------------------------------------- /examples/qualified.concept.nt: -------------------------------------------------------------------------------- 1 | "Germany"@en . 2 | "Göttingen"@en . 3 | _:b0 . 4 | _:b1 . 5 | _:b2 . 6 | _:b0 "1447" . 7 | _:b0 . 8 | _:b0 "Göttingen"@de . 9 | _:b1 "1990-10-03" . 10 | _:b1 . 11 | _:b2 "0953" . 12 | -------------------------------------------------------------------------------- /examples/rdfxml.distribution.json: -------------------------------------------------------------------------------- 1 | { 2 | "prefLabel": { "en": "SKOS in RDF/XML" }, 3 | "download": "http://example.org/data/dump.rdf", 4 | "mimetype": "application/rdf+xml", 5 | "format": "http://www.w3.org/2004/02/skos/core" 6 | } 7 | -------------------------------------------------------------------------------- /examples/resource.resource.json: -------------------------------------------------------------------------------- 1 | { 2 | "created": "2012-12-12T12:12:00", 3 | "modified":"2018-11", 4 | "rank":"preferred" 5 | } 6 | -------------------------------------------------------------------------------- /examples/wikidata-occurrences.concept.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": ["http://www.w3.org/2004/02/skos/core#Concept"], 3 | "uri": "http://www.wikidata.org/entity/Q5", 4 | "prefLabel": { "en": "human" }, 5 | "occurrences": [ 6 | { 7 | "relation": "http://schema.org/about", 8 | "count": 206, 9 | "modified": "2017-11-15T14:00:58.796Z" 10 | }, 11 | { 12 | "relation": "http://www.wikidata.org/entity/P31", 13 | "count": 3706347, 14 | "modified": "2017-11-15T14:00:58.796Z" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /jskos.qmd: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | **JSKOS** (**JS**ON for **K**nowledge **O**rganization **S**ystems) defines 4 | a JavaScript Object Notation (JSON) structure to encode knowledge organization 5 | systems (KOS) and semantic artifacts, such as classifications, thesauri, 6 | authority files, and knowledge graphs. 7 | 8 | The core of JSKOS is an encoding of Simple Knowledge Organisation System 9 | (SKOS), an application of the Resource Description Framework (RDF), in 10 | JavaScript Object Notation for Linked Data (JSON-LD). JSKOS is compatible with 11 | these technologies but it does notrequire to be experienced with more than 12 | plain JSON ([RFC 8259]). Another influence of JSKOS is the data model of 13 | Wikibase, which can partly be encoded in JSKOS as well. 14 | 15 | ## Outline 16 | 17 | In addition to [concepts] and [concept schemes] JSKOS can express information about: 18 | 19 | - [mappings] and [concordances] for alignments between concepts 20 | - [occurrences] of concepts in databases 21 | - [registries] and [distributions] to package and provide data 22 | - general [resources] (any kind of entities) 23 | - [annotations] to review and comment on resources 24 | - qualified information with [qualified statements] 25 | - incomplete and deprecated information via [ranks](#rank) and [closed world statements] 26 | 27 | See [object types] for the class hierarchy of JSKOS data elements. 28 | 29 | ## Status of this document 30 | 31 | JSKOS is being specified since 2014 based on actual use cases and without a 32 | committee (see [changelog]). The specification is hosted at 33 | in the public GitHub repository 34 | . Feedback is appreciated! See 35 | for a list of open issues. 36 | 37 | ## Conformance requirements 38 | 39 | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", 40 | "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be 41 | interpreted as described in [RFC 2119]. 42 | 43 | Only @sec-data-types to @sec-additional-rules of this document and its 44 | [normative references] are normative. Examples and notes (such as the following) 45 | are neither part of conformance requirements. 46 | 47 | ::: {.callout-note} 48 | The appendix includes information how to [validate against this specification](#validation), 49 | for instance with JSON Schema, but these methods do not fully cover all aspects of JSKOS. 50 | ::: 51 | 52 | # Data types {#sec-data-types} 53 | 54 | [string]: #data-types 55 | [boolean]: #data-types 56 | 57 | JSKOS is based on JSON which consists of *objects* with pairs of *fields* and 58 | *values*, *arrays* with *members*, *strings*, *numbers*, and the special values 59 | `true`, `false`, and `null`. All strings and fields of a JSKOS document MUST 60 | be normalized to Unicode Normalization Form C (NFC). Applications processing 61 | JSON MAY accept JSON documents not normalized in NFC by performing NFC 62 | normalization. 63 | 64 | JSKOS further restricts JSON with reference to the following data types: 65 | 66 | ## URI 67 | 68 | An **URI** is a syntactically correct IRI ([RFC 3987]). 69 | 70 | ## URL 71 | 72 | An **URL** is a syntactically correct URL with scheme `https` (RECOMMENDED) or `http` ([RFC 3986]). 73 | 74 | ## non-negative integer 75 | 76 | A **non-negative integer** is a JSON number without preceding minus part, fractional part, and exponent. 77 | 78 | ## percentage 79 | 80 | A **percentage** is a JSON number with value between zero (`0.0` = 0%) and one (`1.0` = 100%). 81 | 82 | ## date 83 | 84 | A **date** is a date or date and time as defined with XML Schema datatype 85 | [datetime](https://www.w3.org/TR/xmlschema-2/#dateTime) 86 | (`-?YYYY-MM-DDThh:mm:ss(\.s+)?(Z|[+-]hh:mm)?`) 87 | [date](https://www.w3.org/TR/xmlschema-2/#date) (`-?YYYY-MM-DD(Z|[+-]hh:mm)?`), 88 | [gYearMonth](https://www.w3.org/TR/xmlschema-2/#gYearMonth) (`-?YYYY-MM`), 89 | or [gYear](https://www.w3.org/TR/xmlschema-2/#gYear) (`-?YYYY`). 90 | 91 | ## extended date 92 | 93 | An **extended date** is a date, date and time, or interval in [Extended Date/Time Format (EDTF)](https://www.loc.gov/standards/datetime/) Level 1. 94 | 95 | ::: {.callout-note} 96 | An extended date includes, in adition to [date]: 97 | 98 | - Intervals of dates (e.g. `1949-10/1990-10`, or `2021/..`) 99 | - Seasons (e.g. `2001-21`) 100 | - Years with more then four digits (e.g. `Y-50000`) 101 | - Qualifiers for uncertain (`?`), approximate (`~`) or both (`%`) 102 | - Unspecified digits marked with `X` 103 | ::: 104 | 105 | ## language tag 106 | 107 | A **language tag** is a non-empty string that conforms to the syntax of [RFC 3066] language tags, limited to lowercase. 108 | 109 | ## list 110 | 111 | [lists]: #list 112 | 113 | A **list** is a possibly empty array of strings and an optional last member 114 | `null`. Applications MAY ignore or disallow the value `null` in lists. If 115 | `null` is allowed, lists MUST be interpreted as following to support [closed 116 | world statements]: 117 | 118 | * the list `[]` denotes an empty list. 119 | * the list `[null]` denotes a non-empty list with unknown members. 120 | * a list `[..., null]` denotes a list with some known and additional unknown members. 121 | * any other list `[...]` denotes a list with all members known. 122 | 123 | A list MUST NOT contain the empty string except if part of a [language map]. 124 | 125 | ## set 126 | 127 | A **set** is a possibly empty array where all members 128 | 129 | * are JSON objects of JSKOS [resources], except the last member optionally being `null`, 130 | * have distinct values in field `uri`, if this field is given 131 | (members MUST NOT be the [same resource]), 132 | * and have at most one member with field [`rank`](#rank) being the string `preferred`. 133 | 134 | Member objects SHOULD have a field `uri`. Applications MAY restrict sets to 135 | require the field `uri` for all non-null members. Applications MAY ignore or 136 | disallow the value `null` in sets. If `null` is allowed, sets MUST be 137 | interpreted as following to support [closed world statements]: 138 | 139 | * the set `[]` denotes an empty set. 140 | * the set `[null]` denotes a non-empty set with unknown members. 141 | * a set `[..., null]` denotes a set with some known and additional unknown members. 142 | * any other set `[...]` denotes a set with all members known. 143 | 144 | :::{#lst-ex-sets} 145 | The following JSON values are JSKOS sets: 146 | 147 | * `[]`{.json} 148 | * `[null]`{.json} 149 | * `[{"uri":"http://example.org/123"}]`{.json} 150 | * `[{"uri":"http://example.org/123"},null]`{.json} 151 | * `[{"uri":"http://example.org/123"},{"uri":"http://example.org/456"}]`{.json} 152 | * `[{"uri":"http://example.org/123"},{"notation":["xyz"]}]`{.json} 153 | 154 | The following JSON values are not valid JSKOS sets: 155 | 156 | * `[null,{"uri":"http://example.org/123"}]`{.json}\ 157 | (`null` only allowed as last member) 158 | * `[{"uri":"http://example.org/123"},{"uri":"http://example.org/123"}]`{.json}\ 159 | (field `uri` must be unique) 160 | ::: 161 | 162 | ::: {.callout-note} 163 | It is not defined yet whether and when the order of elements is relevant or not. 164 | ::: 165 | 166 | ## rank 167 | 168 | A **rank** is one of the strings `preferred`, `normal`, and `deprecated`. 169 | Applications MAY ignore or limit ranks to selected use cases. 170 | 171 | Elements of a [set] and [qualified values] are expected to have a field `rank` 172 | with a rank value. If an element lacks a rank, its default rank is `normal`. 173 | 174 | The rank `deprecated` is used for elements that are known to include errors. 175 | Applications MAY filter out these elements. 176 | 177 | The rank `preferred` is used to allow selection of one most relevant element 178 | from its array. Applications MAY reduce arrays of multiple elements to an array 179 | with the single element of rank `preferred`. 180 | 181 | ::: {.callout-note} 182 | Wikibase data model includes ranks with same semantics, see 183 | [ranks in Wikidata](https://www.wikidata.org/wiki/Help:Ranking) for background. 184 | ::: 185 | 186 | ::: {#lst-ranks lst-cap="A resource with ranked publishers"} 187 | ~~~json 188 | { 189 | "publisher": [ 190 | { "prefLabel": { "en": "Acme Corporation" }, "rank": "preferred" }, 191 | { "prefLabel": { "en": "DIY Products" }, "rank": "normal" } 192 | ] 193 | } 194 | ~~~ 195 | ::: 196 | 197 | ## language range 198 | 199 | A **language range** is 200 | 201 | * either the character "`-`" 202 | * or a [language tag], followed by the character "`-`", 203 | 204 | A language range "`x-`", where `x` is a possibly empty string, refers to the 205 | set of [RFC 3066] language tags that start the string `x`. For instance language 206 | range `en-` includes language tag `en`, `en-US`, and `en-GB` among others. The 207 | language range `-` refers to all possible language tags. 208 | 209 | A language range MUST conform to the following ABNF grammar ([RFC 5234]): 210 | 211 | ```abnf 212 | language-range = [language-tag] "-" 213 | language-tag = 1*8alpha *("-" 1*8(alpha / DIGIT)) 214 | alpha = %x61-7A ; a-z 215 | ``` 216 | 217 | JSKOS language ranges can be mapped to and from basic language ranges as 218 | defined in [RFC 4647]. The main difference of JSKOS language ranges is they can 219 | be distinguished from [RFC 3066] based on their string value (always ending 220 | with "`-`"). For instance "`en`" could be an [RFC 3066] language tag or a 221 | [RFC 4647] language range but in JSKOS it is always a language tag only: 222 | 223 | JSKOS RFC 3066 RFC 4647 224 | --------------------------------------- ----- -------- -------- 225 | language tag for English `en` `en` 226 | languag range for all English variants `en-` `en` 227 | 228 | ## language map 229 | 230 | A **language map** is a JSON object in which every fields is 231 | 232 | * either a [language tag] that SHOULD also conform to [RFC 5646], 233 | * or a [language range], 234 | 235 | and 236 | 237 | * either all values are strings (**language map of strings**), 238 | * or all values are [lists] (**language map of lists**). 239 | 240 | and 241 | 242 | * string values or list member values mapped to from language tags MUST NOT be the empty string 243 | * string values or list member values mapped to from language ranges MUST BE the empty string 244 | 245 | Applications MAY ignore or disallow language ranges in language maps. JSKOS 246 | data providers SHOULD make clear whether their data can contain language ranges 247 | or not. 248 | 249 | If language ranges are allowed, language maps MUST be interpreted as following 250 | to support [closed world statements]: 251 | 252 | * Language maps without language range fields indicate that all values are given. 253 | In particular the language map `{}` denotes an empty language map. 254 | 255 | * A language range field indicates the existence of additional, unknown 256 | values of unknown number. 257 | 258 | ::: {#lst-language-maps} 259 | 260 | The following language maps make use of language ranges and placeholders: 261 | 262 | * ` {"-":""}`, ` {"-":""}`, ` {"-":[]}`, and ` {"-":[""]}` 263 | all denote non-empty language maps with unknown language tags and values. 264 | 265 | * ` {"en":"bird","-":""}` denotes a language map with an English value 266 | and additional values in other language tags. 267 | 268 | * ` {"en":"bird"}` denotes a language map with an English value only. 269 | 270 | * ` {"en-":""}` denotes a language map that only 271 | contains values with language tags starting with `en`. 272 | 273 | ::: 274 | 275 | ::: {.callout-note} 276 | JSON-LD disallows language map fields ending with `"-"` so all fields that are 277 | language ranges MUST be removed before reading [JSKOS as JSON-LD]. 278 | ::: 279 | 280 | ::: {.callout-note} 281 | The language tag `und` can be used to include strings of unknown or unspecified language. 282 | ::: 283 | 284 | ## checksum 285 | 286 | A **checksum** is a JSON object with two fields: 287 | 288 | field type description 289 | ----------- ------- ----------- 290 | algorithm [URI] checksum algorithm 291 | value string lower case hexidecimal encoded digest value 292 | 293 | The value of SHOULD be specified by a URI from SPDX vocabulary, e.g. for SHA-2 with 256 Bit (SHA-256). 294 | 295 | ## location 296 | 297 | [location]: #location 298 | 299 | A **location** is a JSON object conforming to the GeoJSON specification ([RFC 300 | 7946]) with GeoJSON type being one of `Point`, `MultiPoint`, `LineString`, 301 | `MultiLineString`, `Polygon`, `MultiPolygon`, or `GeometryCollection`. 302 | Applications MAY restrict the location data type to GeoJSON objects of GeoJSON 303 | type `Point`. 304 | 305 | 306 | ::: {#lst-titanic lst-cap="Position of the RMS Titanic as point"} 307 | ~~~json 308 | { 309 | "type": "Point", 310 | "coordinates": [-49.946944, 41.7325, -3803] 311 | } 312 | ~~~ 313 | ::: 314 | 315 | ## address 316 | 317 | An **address** is a JSON object with any of the following fields, each mapped to a string. 318 | 319 | ::: {.callout-note} 320 | The adress format is based on vCard ADR value components of same name ([RFC 6350, section 6.3.1](https://www.rfc-editor.org/rfc/rfc6350.html#section-6.3.1)) and on schema.org type [PostalAddress](https://schema.org/PostalAddress) but both of these standards are non-normative. 321 | ::: 322 | 323 | field description schema.org property 324 | -------- ---------------------------------------------------------- ------------------------------------------------------------ 325 | pobox the post office box [postOfficeBoxNumber](http://schema.org/postOfficeBoxNumber) 326 | ext the extended address (e.g., apartment or suite number) [streetAddress](http://schema.org/streetAddress) 327 | street the street address [streetAddress](http://schema.org/streetAddress) 328 | locality the locality (e.g., city) [addressLocality](http://schema.org/addressLocality) 329 | region the region (e.g., state or province) [addressRegion](http://schema.org/addressRegion) 330 | code the postal code [postalCode](http://schema.org/postalCode) 331 | country the country name [addressCountry](http://schema.org/addressCountry) 332 | 333 | ## media 334 | 335 | A **media** is a reference to digital content such as images or other 336 | audiovisual data. The data model of JSKOS media follows the *manifest* resource 337 | type of [IIIF Presentation API 3.0](https://iiif.io/api/presentation/3.0/). 338 | 339 | A **media** is a JSON object with at least the following fields: 340 | 341 | field type description 342 | ------- ------- --------------------------- 343 | type string the value "Manifest" 344 | items array list of IIIF Canvas objects 345 | 346 | Additional fields MUST follow the IIIF Presentation API specification. In 347 | contrast to IIIF, the fields `label` and `id` are not required but RECOMMENDED 348 | by JSKOS. JSKOS applications MAY limit the set of supported fields instead of 349 | fully implementing all IIIF capabilities. 350 | 351 | ::: {#lst-thubnail lst-cap="Thumbnail image specified as media"} 352 | ~~~json 353 | { 354 | "type": "Manifest", 355 | "items": [], 356 | "thumbnail": [ 357 | { 358 | "type": "Image", 359 | "id": "http://example.org/1/thumbnail.jpg", 360 | "format": "image/jpeg" 361 | } 362 | ] 363 | } 364 | ~~~ 365 | ::: 366 | 367 | # Resource and property types 368 | 369 | [resource type]: #resource-and-property-types 370 | [resource types]: #resource-and-property-types 371 | [property type]: #resource-and-property-types 372 | [property types]: #resource-and-property-types 373 | [item type]: #item-types 374 | 375 | Resource types and property types are [concepts] with MANDATORY field `uri`. 376 | Both can be referred to implicitly ba referencing their [URI] and they can be 377 | expressed explicitly, for instance in a [registry]. 378 | 379 | ::: {.callout-note} 380 | Ressource types and property types roughly map to RDF classes and RDF properties 381 | but JSKOS does not require or imply the RDF data model. 382 | ::: 383 | 384 | A **resource type** is a [concept] used to distinguish different kinds of 385 | concepts or other [resources]. Concept types are referred to by their [URI] in 386 | array field `type` of a [resource]. 387 | 388 | An **item type** is a resource type with one of the following [URI]s. Item 389 | types are used to identify the different kinds of JSKOS [items](#item) 390 | (see [object types]) and types of [mappings]: 391 | 392 | item item type 393 | ------------------- ----------------------------------------------------- 394 | [concept] 395 | [concept scheme] 396 | [registry] 397 | [distribution] 398 | [concordance] 399 | [mapping] 400 | 401 | 402 | 403 | 404 | 405 | ------------------- ----------------------------------------------------- 406 | 407 | ::: {.callout-note} 408 | See appendix [item types as concepts] for a partial explicit encoding of item types. 409 | ::: 410 | 411 | A **property type** is a [concept] used to specify the type of a [qualified 412 | statement]. Property types are referenced by their [URI] in the keys of 413 | a [qualified map]. 414 | 415 | 416 | # Object types 417 | 418 | JSKOS defines the following types of JSON objects: 419 | 420 | - [resources] for all kinds of entities 421 | - [items] for named entities 422 | - [concepts] for entities from a knowledge organization system 423 | - [concept schemes] for compiled collections of concepts (knowledge organization systems) 424 | - [mappings] for mappings between concepts of two concept schemes 425 | - [concordances] for curated collections of mappings 426 | - [registries] for collections of items (concepts, concept schemes...) 427 | - [distributions] for available forms to access the content of an item 428 | - [occurrences] for counts of concept uses 429 | - [annotations] to review and comment on individual resources 430 | 431 | Object types [concept], [mapping], and [occurrence] are also [concept bundles]. 432 | 433 | ## Resource 434 | 435 | [resource]: #resource 436 | [resources]: #resource 437 | 438 | An **resource** is a JSON object with the following optional fields: 439 | 440 | field type description 441 | ------------------- ---------------------------------------- ------------------------------------------------------------------ 442 | @context [URI] or list of URI reference to a JSON-LD context document (see [appendix](#json-ld)) 443 | uri [URI] primary globally unique identifier 444 | identifier [list] additional identifiers 445 | type [list] of [URI] URIs of types 446 | created [date] date of creation of the resource 447 | issued [date] date of publication of the resource 448 | modified [date] date of last modification of the resource 449 | creator [set] agent primarily responsible for creation of the resource 450 | contributor [set] agent responsible for making contributions to the resource 451 | source [set] sources from which the described resource is derived 452 | publisher [set] agent responsible for making the resource available 453 | partOf [set] [resources] which this resource is part of (if no other field applies) 454 | qualifiedRelations [qualified map] of [qualified relation] qualified relations to other resources 455 | qualifiedDates [qualified map] of [qualified date] qualified dates (related events or periods) 456 | qualifiedLiterals [qualified map] of [qualified literal] qualified literals 457 | rank [rank] a [rank] (only relevant if the resource is part of a [set]) 458 | 459 | It is RECOMMENDED to always include the fields `uri`, `type`, and `@context`. 460 | The value of field `@context` SHOULD be 461 | `https://gbv.github.io/jskos/context.json`. 462 | 463 | Resources can be [tested for sameness](#resource-sameness) based on field `uri`. 464 | 465 | The fields `created`, `issued`, `modified`, `creator`, `contributor`, `source`, 466 | and `publisher` do not refer to the entity referenced by the resource but to 467 | the resource object. For instance a resource about the city of Rome might have 468 | a recent date `created` while the founding date `-0753` would be stated in 469 | [item] field `startDate`. 470 | 471 | For use cases of field `partOf` see also [Concept Schemes]. 472 | 473 | ## Item 474 | 475 | [item]: #item 476 | [items]: #item 477 | 478 | An **item** is a [resource] with the following optional fields (in addition to 479 | the optional fields `@context`, `contributor`, `created`, `creator`, 480 | `identifier`, `issued`, `modified`, `partOf`, `publisher`, `rank`, `source`, 481 | `type`, and `uri`): 482 | 483 | field type description 484 | ------------- ------------------------- ---------------------------------------------- 485 | url [URL] URL of a page with information about the item 486 | notation [list] list of notations 487 | prefLabel [language map] of strings preferred labels, indexed by language 488 | altLabel [language map] of [list] alternative labels, indexed by language 489 | hiddenLabel [language map] of [list] hidden labels, indexed by language 490 | scopeNote [language map] of [list] see [SKOS Documentary Notes] 491 | definition [language map] of [list] see [SKOS Documentary Notes] 492 | example [language map] of [list] see [SKOS Documentary Notes] 493 | historyNote [language map] of [list] see [SKOS Documentary Notes] 494 | editorialNote [language map] of [list] see [SKOS Documentary Notes] 495 | changeNote [language map] of [list] see [SKOS Documentary Notes] 496 | note [language map] of [list] see [SKOS Documentary Notes] 497 | startDate [extended date] date of begin (birth, creation...) of the item 498 | endDate [extended date] date of end (death, resolution...) of the item 499 | relatedDate [extended date] other date somehow related to the item (deprecated) 500 | relatedDates array of [extended date] other dates somehow related to the item 501 | startPlace [set] where an item started (e.g. place of birth) 502 | endPlace [set] where an item ended (e.g. place of death) 503 | place [set] other relevant place(s) of the item 504 | location [location] geographic location of the item 505 | address [address] postal address of the item 506 | replacedBy [set] of [item] related items that supplant, displace, or supersede this item 507 | basedOn [set] of [item] related items that inspired or led to this item 508 | subject [set] what this item is about (e.g. topic) 509 | subjectOf [set] resources about this item (e.g. documentation) 510 | depiction [list] of [URL] list of image URLs depicting the item 511 | media [list] of [media] audiovisual or other digital content representing the item 512 | 513 | The first element of array `type`, if given, MUST be an [item type] URI. 514 | 515 | Applications MAY limit the fields `notation` and/or `depiction` to lists of a single 516 | element or ignore all preceding elements of these lists. 517 | 518 | If `startDate` is given, the value of `endDate` MUST NOT be an interval with open start. 519 | If `endDate` is given, the value of `startDate` MUST NOT be an interval with open end. 520 | 521 | To state one primary date of an item set `startDate` and `endDate` to the same value. 522 | 523 | ## Concept 524 | 525 | [concept]: #concept 526 | [concepts]: #concept 527 | 528 | A **concept** is an [item] and [concept bundle] with the following optional 529 | fields (in addition to the optional fields `@context`, `address`, `altLabel`, 530 | `changeNote`, `contributor`, `created`, `creator`, `definition`, `depiction`, 531 | `editorialNote`, `endDate`, `endPlace`, `example`, `hiddenLabel`, 532 | `historyNote`, `identifier`, `issued`, `location`, `modified`, `notation`, 533 | `note`, `partOf`, `place`, `prefLabel`, `publisher`, `rank`, `scopeNote`, 534 | `source`, `startDate`, `startPlace`, `subjectOf`, `subject`, `type`, `uri`, 535 | `url`, `memberSet`, `memberList`, `memberChoice`, and `memberRoles`): 536 | 537 | field type description 538 | ------------ -------------------------- ------------------------------------------------------------------------------- 539 | narrower [set] narrower concepts 540 | broader [set] broader concepts 541 | related [set] generally related concepts 542 | previous [set] related concepts ordered somehow before the concept 543 | next [set] related concepts ordered somehow after the concept 544 | ancestors [set] list of ancestors, possibly up to a top concept 545 | inScheme [set] of [concept schemes] concept schemes the concept belongs to 546 | topConceptOf [set] of [concept schemes] concept schemes the concept is a top concept of 547 | mappings [set] of [mappings] mappings from and/or to this concept 548 | occurrences [set] of [occurrences] occurrences with this concept 549 | deprecated [boolean] mark a concept as deprecated (false by default) 550 | 551 | The first element of field `type`, if given, MUST be the [item type] URI 552 | . The type URI 553 | should be used as second element 554 | for concepts not meant to be used for indexing. 555 | 556 | Applications MAY limit the `inScheme` and/or `topConceptOf` to sets of a single 557 | element or ignore all but one element of these sets. 558 | 559 | If both fields `broader` and `ancestors` are given, the set `broader` MUST 560 | include [the same] concept as the first element of `ancestors`. 561 | 562 | The [concept bundle] fields `memberSet`, `memberList`, `memberChoice`, and `memberRoles` can 563 | be used to express the parts of a **composed concept** (also known as combined 564 | or synthesized concepts) unsorted or sorted. The field `memberChoice` SHOULD 565 | NOT be used without proper documentation because its meaning in this context is 566 | unclear. A concept MUST NOT include more than one of concept bundle fields. A 567 | concept SHOULD NOT reference itself as part of its concept bundle. 568 | 569 | ::: {.callout-note} 570 | The "ancestors" field is useful in particular for monohierarchical classifications 571 | but it's not forbidden to choose just one arbitrary path of concepts that are 572 | connected by the broader relation. 573 | ::: 574 | 575 | ```{.json #lst-concept1 lst-cap="concept"} 576 | {{< include examples/example.concept.json >}} 577 | ``` 578 | 579 | ```{.json #lst-concept2 lst-cap="concept from GND"} 580 | {{< include examples/gnd-7507432-1.concept.json >}} 581 | ``` 582 | 583 | ```{.json #lst-concept3 lst-cap="concept from DDC"} 584 | {{< include examples/ddc-305.40941109033.concept.json >}} 585 | ``` 586 | 587 | 588 | ## Concept Schemes 589 | 590 | [concept scheme]: #concept-schemes 591 | [concept schemes]: #concept-schemes 592 | [scheme]: #schemes 593 | 594 | A **concept scheme** is an [item] with the following optional fields (in 595 | addition to the optional fields `@context`, `address`, `altLabel`, 596 | `changeNote`, `contributor`, `created`, `creator`, `definition`, `depiction`, 597 | `editorialNote`, `endDate`, `endPlace`, `example`, `hiddenLabel`, 598 | `historyNote`, `identifier`, `issued`, `location`, `modified`, `notation`, 599 | `note`, `partOf`, `place`, `prefLabel`, `publisher`, `rank`, `scopeNote`, 600 | `source`, `startDate`, `startPlace`, `subjectOf`, `subject`, `type`, `uri`, and 601 | `url`): 602 | 603 | field type definition 604 | ---------------- -------------------------- -------------------------------------------------------------------------------------- 605 | topConcepts [set] of [concepts] top [concepts] of the scheme 606 | versionOf [set] of [concept schemes] [concept scheme] which this scheme is a version or edition of 607 | namespace [URI] URI namespace that all concepts URIs are expected to start with 608 | uriPattern string regular expression that all concept URIs are expected to match 609 | notationPattern string regular expression that all primary notations should follow 610 | notationExamples [list] of string list of some valid notations as examples 611 | concepts [set] of [concepts] concepts in the scheme 612 | types [set] of [concepts] [resource type] URIs of concepts in this scheme 613 | distributions [set] of [distributions] [Distributions] to access the content of the concept scheme 614 | extent string Size of the concept scheme 615 | languages [list] of language tags Supported languages 616 | license [set] Licenses which the full scheme can be used under 617 | 618 | The first element of array field `type`, if given, MUST be the [item type] URI 619 | . 620 | 621 | The values of field `uriPattern` and `notationPattern` MUST conform to the 622 | regular expression syntax used by XML Schema ([Appendix F](https://www.w3.org/TR/xmlschema-2/#regexs)) 623 | and SHOULD be anchored with `^` as first and `$` as last character. Applications MAY automatically 624 | anchor unanchored regular expressions. 625 | 626 | If `concepts` is a set, all its member concepts SHOULD contain a field 627 | `inScheme` and all MUST contain [the same] concept scheme in field `inScheme` 628 | if this field is given. 629 | 630 | If `types` and `concepts` are sets, the `types` set SHOULD include all [resource type] URIs 631 | for each concept's `type` other than `http://www.w3.org/2004/02/skos/core#Concept`. 632 | 633 | Resource field `partOf` at a concept scheme MUST be interpreted as following: 634 | 635 | - if the linked resource is another [concept scheme], the concept scheme is *subset of* the other concept scheme 636 | - if the linked resource is a [registry], the concept scheme is *listed in* in the registry 637 | 638 | Item field `replacedBy` at a concept schemes SHOULD be used to connect successive editions or concept scheme that have been replaced or renamed. 639 | 640 | Item field `basedOn` at a concept schemes SHOULD be used to connect translations, abridged versions, or concept schemes that have been inspired by another concept scheme. 641 | 642 | ## Concept Occurrences 643 | 644 | [occurrences]: #concept-occurrences 645 | [occurrence]: #concept-occurrences 646 | [concept occurrence]: #concept-occurrence 647 | [concept occurrences]: #concept-occurrences 648 | 649 | An **occurrence** is a [resource] and [concept bundle] with the following 650 | optional fields (in addition to the optional fields `@context`, `contributor`, 651 | `created`, `creator`, `identifier`, `issued`, `modified`, `partOf`, 652 | `publisher`, `source`, `type`, `uri`, `memberSet`, `memberList`, `memberChoice`, and `memberRoles`): 653 | 654 | field type definition 655 | ------------ ---------------------- ---------------------------------------------- 656 | count [non-negative integer] number of times the concepts are used 657 | database [item] database in which the concepts are used 658 | frequency [percentage] count divided by total number of possible uses 659 | relation [URI] type of relation between concepts and entities 660 | url [URL] URL of a page with information about the occurrence 661 | 662 | An occurrence gives the number of a times a concept ("occurrence") or 663 | combination of concepts ("co-occurrence") is used in a specific relation to 664 | entities from a particular database. For instance the occurrence could give the 665 | number of documents indexed with some term in a catalog. The field `url` 666 | typically includes a deep link into the database. 667 | 668 | If both `count` and `frequency` are given, the total size of the database can 669 | derived by multiplication. In this case either both or none of the two fields 670 | MUST be zero. 671 | 672 | A timestamp, if given, should be stored in field `modified`. 673 | 674 | The actual concept or concepts MAY be given implictly, for instance if the 675 | occurrence is part of a [concept] in field `occurrences`. 676 | 677 | 678 | 679 | :::{#lst-ex2} 680 | Two occurrences and their combined co-occurrence from GBV Union Catalogue (GVK) as of November 22th, 2017: [3657 records](https://gso.gbv.de/DB=2.1/CMD?ACT=SRCHA&IKT=1016&SRT=YOP&TRM=bkl+08.22) are indexed with class `08.22` (medieval philosophy) from Basisklassifikation, [144611](https://gso.gbv.de/DB=2.1/CMD?ACT=SRCHA&IKT=1016&SRT=YOP&TRM=ddc+610) with DDC notation `610` (Medicine & health) and [2 records](https://gso.gbv.de/DB=2.1/CMD?ACT=SRCHA&IKT=1016&SRT=YOP&TRM=bkl+08.22+ddc+610) with both. 681 | 682 | ```{.json} 683 | {{< include examples/gvk-co.occurrence.json >}} 684 | ``` 685 | ::: 686 | 687 | :::{#lst-ex-wikidata} 688 | The Wikidata [concept of an individual human](http://www.wikidata.org/entity/Q5) is linked to 206 Wikimedia sites (mostly Wikipedia language editions) and more than 3.7 million people (instances of ) at November 15th, 2017. 689 | 690 | ```{.json} 691 | {{< include examples/wikidata-occurrences.concept.json >}} 692 | ``` 693 | ::: 694 | 695 | 696 | ## Registries 697 | 698 | [registries]: #registries 699 | [registry]: #registries 700 | 701 | A **registry** is an [item] with the following optional fields (in addition to 702 | the optional fields `@context`, `address`, `altLabel`, `changeNote`, 703 | `contributor`, `created`, `creator`, `definition`, `depiction`, 704 | `editorialNote`, `endDate`, `endPlace`, `example`, `hiddenLabel`, 705 | `historyNote`, `identifier`, `issued`, `location`, `modified`, `notation`, 706 | `note`, `partOf`, `place`, `prefLabel`, `publisher`, `rank`, `scopeNote`, 707 | `source`, `startDate`, `startPlace`, `subjectOf`, `subject`, `type`, `uri`, and 708 | `url`): 709 | 710 | field type definition 711 | ------------ -------------------------- -------------------------------------------------------------------------------------- 712 | concepts [set] of [concepts] [concepts] in this registry 713 | schemes [set] of [concept schemes] [concept schemes] in this registry 714 | types [set] of [concepts] [resource types] in this registry 715 | properties [set] of [concepts] [property types] in this registry 716 | mappings [set] of [mappings] [mappings] in this registry 717 | registries [set] of [registries] other registries in this registry 718 | concordances [set] of [concordances] [concordances] in this registry 719 | occurrences [set] of [occurrences] [occurrences] in this registry 720 | extent string Size of the registry 721 | languages [list] Supported languages 722 | license [set] Licenses which the full registry content can be used under 723 | 724 | The first element of array field `type`, if given, MUST be the [item type] URI 725 | . 726 | 727 | Registries are collection of [concepts], [concept schemes], [resource types], 728 | [property types], [concept mappings], and/or other registries. 729 | 730 | ::: {.callout-note} 731 | Registries are the top JSKOS entity, followed by 732 | [concordances], [mappings] [concept schemes], and on the lowest level 733 | [concepts] and [resource types]. See [Distributions] for an alternative. 734 | 735 | Additional integrity rules for registries will be defined (TODO). 736 | ::: 737 | 738 | 739 | ## Distributions 740 | 741 | [distribution]: #distributions 742 | [distributions]: #distributions 743 | 744 | A **distribution** is an [item] with the following fields (in addition to the 745 | optional fields `@context`, `address`, `altLabel`, `changeNote`, `contributor`, 746 | `created`, `creator`, `definition`, `depiction`, `editorialNote`, `endDate`, 747 | `endPlace`, `example`, `hiddenLabel`, `historyNote`, `identifier`, `issued`, 748 | `location`, `modified`, `notation`, `note`, `partOf`, `place`, `prefLabel`, 749 | `publisher`, `rank`, `scopeNote`, `source`, `startDate`, `startPlace`, 750 | `subjectOf`, `subject`, `type`, `uri`, and `url`): 751 | 752 | Distributions mostly cover the [class Distribution](https://www.w3.org/TR/vocab-dcat-3/#Class:Distribution) from [Data Catalog Vocabulary](https://www.w3.org/TR/vocab-dcat-3/). 753 | 754 | field type definition 755 | -------------- --------------- ------------------------------------------------------------------ 756 | download [URL] location of a file with distribution content in given format 757 | accessURL [URL] URL of an API or landing page to retrieve the distribution content 758 | format [URI] data format identifier of the distribution content 759 | mimetype [URI] or string Internet Media Type (also known as MIME type) 760 | compressFormat [URI] compression format of the distribution 761 | packageFormat [URI] packaging format when multiple files are grouped together 762 | license [set] license which the data can be used under 763 | size string Size of a distribution in bytes or literal such as "1.5 MB" 764 | checksum [checksum] Checksum of the download (algorithm and digest value) 765 | 766 | The `format` field SHOULD reference a content format rather than its 767 | serialization and possible wrapping. The URI of JSKOS is 768 | . 769 | 770 | Fields `mimetype`, `compressFormat`, and `packageFormat` SHOULD be IANA media type URIs, if available. Field `mimetype` MAY be a string for backwards-compatibility. 771 | 772 | The first element of array field `type`, if given, MUST be the [item type] URI 773 | . 774 | 775 | ::: {.callout-note} 776 | Access to [concept schemes] and [concordances] can also be specified with 777 | fields `concepts`, `types`, and `mappings`, respectively. Distributions provide 778 | an alternative and extensible method to express access methods. 779 | ::: 780 | 781 | ::: {#lst-ex} 782 | 783 | Distribution of a newline-delimited JSKOS file: 784 | 785 | ```{.json} 786 | {{< include examples/jskos.distribution.json >}} 787 | ``` 788 | 789 | Distribution of a RDF/XML with SKOS data: 790 | 791 | ```{.json} 792 | {{< include examples/rdfxml.distribution.json >}} 793 | ``` 794 | 795 | Distribution of a gzip-compressed MARC/XML file in [MARC 21 Format for 796 | Authority Data](https://www.loc.gov/marc/authority/): 797 | 798 | ```{.json} 799 | {{< include examples/marc.distribution.json >}} 800 | ``` 801 | 802 | ::: 803 | 804 | 805 | ## Concordances 806 | 807 | [concordances]: #concordances 808 | [concordance]: #concordances 809 | 810 | A **concordance** is an [item] with the following fields (in addition to the 811 | optional fields `@context`, `address`, `altLabel`, `changeNote`, `contributor`, 812 | `created`, `creator`, `definition`, `depiction`, `editorialNote`, `endDate`, 813 | `endPlace`, `example`, `hiddenLabel`, `historyNote`, `identifier`, `issued`, 814 | `location`, `modified`, `notation`, `note`, `partOf`, `prefLabel`, `publisher`, 815 | `rank`, `scopeNote`, `source`, `startDate`, `startPlace`, `subjectOf`, 816 | `subject`, `type`, `uri`, and `url`). All fields except `fromScheme` and 817 | `toScheme` are optional. 818 | 819 | field type definition 820 | ------------- ------------------------- ------------------------------------------------------ 821 | mappings [set] of [mappings] [mappings] in this concordance 822 | distributions [set] of [distributions] [distributions] to access the concordance 823 | fromScheme [concept scheme] Source concept scheme 824 | toScheme [concept scheme] Target concept scheme 825 | extent string Size of the concordance 826 | license [set] License which the full concordance can be used under 827 | 828 | The first element of array field `type`, if given, MUST be the [item type] URI 829 | . 830 | 831 | Concordances are collections of [mappings] from one [concept scheme] to 832 | another. If `mappings` is a set then 833 | 834 | * all its members with field `fromScheme` MUST have [the same] value 835 | like concordance field `fromScheme`. 836 | 837 | * all its members with field `toScheme` MUST have [the same] value 838 | like concordance field `toScheme`. 839 | 840 | ::: {.callout-note} 841 | There is an additional integrity constraint refering to field `inScheme` if concepts in mappings in concordances. 842 | ::: 843 | 844 | ## Concept Mappings 845 | 846 | [mappings]: #concept-mappings 847 | [mapping]: #concept-mappings 848 | [concept mapping]: #concept-mappings 849 | [concept mappings]: #concept-mappings 850 | 851 | A **mapping** is an [item] with the following fields (in addition to the 852 | optional fields `@context`, `address`, `altLabel`, `changeNote`, `contributor`, 853 | `created`, `creator`, `definition`, `depiction`, `editorialNote`, `endDate`, 854 | `endPlace`, `example`, `hiddenLabel`, `historyNote`, `identifier`, `issued`, 855 | `location`, `modified`, `notation`, `note`, `partOf`, `prefLabel`, `publisher`, 856 | `rank`, `scopeNote`, `source`, `startDate`, `startPlace`, `subjectOf`, 857 | `subject`, `type`, `uri`, and `url`). All fields except `from` and `to` are 858 | optional. 859 | 860 | field type definition 861 | ---------------- ---------------- ---------------------------------------------- 862 | from [concept bundle] concepts mapped from 863 | to [concept bundle] concepts mapped to 864 | fromScheme [concept scheme] source concept scheme 865 | toScheme [concept scheme] target concept scheme 866 | mappingRelevance number numerical confidence value between 0 and 1 867 | 868 | A **mapping** represents a mapping between [concepts] of two [concept schemes]. 869 | It consists two [concept bundles] with additional metadata not fully defined 870 | yet. 871 | 872 | The first element of array field `type`, if given, MUST be an [item type] for 873 | mappings from the [SKOS mapping properties](http://www.w3.org/TR/skos-reference/#mapping). 874 | The field `type` MAY contain additional values but MUST NOT contain multiple of these values. 875 | 876 | ::: {.callout-note} 877 | When mappings are dynamically created it can be useful to assign a non-HTTP URI 878 | such as `urn:uuid:687b973c-38ab-48fb-b4ea-2b77abf557b7`. 879 | ::: 880 | 881 | ::: {.callout-note} 882 | Applications MAY use concept mappings to derive simple statements with [SKOS Mapping Properties](https://www.w3.org/TR/skos-reference/#mapping) 883 | but SKOS integrity rules for mappings do not apply automatically. 884 | ::: 885 | 886 | ## Concept Bundles 887 | 888 | [concept bundles]: #concept-bundles 889 | [concept bundle]: #concept-bundles 890 | [collections]: #concept-bundles 891 | [concept collections]: #concept-bundles 892 | 893 | A **concept bundle** is a group of [concepts]. Concept bundles can be used for 894 | [mappings], composed concepts, and [occurrences]. 895 | 896 | A concept bundle is a JSON object with at most one of the following fields: 897 | 898 | field type definition 899 | ----------- --------------------------- ---------------------------------------------------------------------- 900 | memberSet [set] of [concepts] [concepts] in this bundle (unordered) 901 | memberList ordered [set] of [concepts] [concepts] in this bundle (ordered) 902 | memberChoice [set] of [concepts] [concepts] in this bundle to choose from 903 | memberRoles object Object mapping role URIs to [set]s of [concepts] 904 | 905 | Keys of a `memberRoles` object MUST be URIs and their values MUST be of type [set]. 906 | 907 | ```{.json #lst-member-roles lst-cap="..."} 908 | {{< include examples/memberRoles.concept.json >}} 909 | ``` 910 | 911 | ::: {.callout-note} 912 | 913 | * Concept bundles could also be used for 914 | [SKOS concept collections](http://www.w3.org/TR/skos-reference/#collections), 915 | see for discussion. 916 | 917 | * Concepts from a bundle may also come from different concept schemes! 918 | 919 | * A concept bundle may be empty, for instance to indicate that no appropriate 920 | concepts exists for a given concept scheme: 921 | 922 | ```json 923 | { 924 | ... 925 | "to": { "memberSet": [] }, 926 | "toScheme": {"uri": "http://dewey.info/scheme/ddc/"} 927 | } 928 | ``` 929 | 930 | Normalization rules may be added to prefer one kind of expressing an empty concept bundle. 931 | ::: 932 | 933 | ## Annotations 934 | 935 | [annotation]: #annotations 936 | 937 | An **annotation** links a JSKOS [resource] or another annotation with a review, 938 | comment or similar document. An annotation is a JSON object that conforms to 939 | the [Web Annotation Data Model] and further contains the following fields as 940 | defined: 941 | 942 | field type definition 943 | ----------- --------------------------------- ---------------------------------------------- 944 | @context [URL] the value `http://www.w3.org/ns/anno.jsonld` 945 | type string the value `Annotation` 946 | id [URI] globally unique identifier of the annotation 947 | target [URI], [Resource] or [Annotation] object being annotated, or its URI 948 | 949 | [Web Annotation Data Model]: https://www.w3.org/TR/annotation-model/ 950 | 951 | # Qualified statements 952 | 953 | [qualified map]: #qualified-statements 954 | [qualified statement]: #qualified-statements 955 | 956 | JSKOS defines a set of common fields (such as `prefLabel`, `startDate`, `place`, and `media`) to facilitate interoperability across diverse knowledge organization systems. Application of these fields comes with simplification and lack of context information. To allow for more details, qualified statements can express typed and qualified data at cost of interoperability. 957 | 958 | ::: {.callout-note} 959 | Qualified statements are similar but not identical to properties in a property graph and to referenced statements in Wikibase data model. 960 | ::: 961 | 962 | The term **qualified statement** refers to the combination of a [property type] and a [qualified value]. Qualified statements are grouped in *qualified maps* by the data type of their qualified values. 963 | 964 | A **qualified map** is a JSON object that maps [property types] to [qualified values]. 965 | 966 | ``` {.json #lst-qualified-map lst-cap="Qualified map with property types from schema.org"} 967 | { 968 | "https://schema.org/award": [ ... ], 969 | "https://schema.org/performerIn": [ ... ] 970 | } 971 | ``` 972 | 973 | ## Qualified value 974 | [qualified values]: #qualified-value 975 | 976 | A **qualified value** is a JSON object with the following optional fields: 977 | 978 | field type definition 979 | ----------- --------------- -------------------------------------------- 980 | startDate [extended date] date when the statement started to be valid 981 | endDate [extended date] date when the statementn ended to be valid 982 | source [set] sources as evidence for the statement 983 | rank [rank] [rank] of the statement 984 | 985 | If field `startDate` is given in a qualified value, the value of field `endDate` MUST NOT be an interval with open start. 986 | 987 | If field `endDate` is given in a qualified value, the value of `startDate` MUST NOT be an interval with open end. 988 | 989 | To state one primary date of a qualified value, set `startDate` and `endDate` to the same value. 990 | 991 | In addition there are fields depending on the data type of the qualified value. These data types are: 992 | 993 | - [Qualified relation] for links between resources 994 | - [Qualified date] to reference related events and periods 995 | - [Qualified literal] to reference names and labels 996 | 997 | ## Qualified relation 998 | 999 | [qualified relations]: #qualified-relations 1000 | 1001 | A **qualified relation** is a [qualified value] with the following fields (in addition to the optional fields `rank`, `source`, `startDate`, and `endDate`): 1002 | 1003 | field type definition 1004 | ----------- --------------------------- ----------------------------------------------------- 1005 | resource [resource] linked resource (RECOMMENDED) 1006 | 1007 | Application MAY disallow or ignore qualified relations without field `resource`. 1008 | 1009 | ```{.json #lst-qualified-relation lst-cap="Concept with qualified relations (from Wikidata)"} 1010 | {{< include examples/qualified-relation-2.concept.json >}} 1011 | ``` 1012 | 1013 | ## Qualified date 1014 | 1015 | A **qualified date** is a [qualified value] with the following fields (in addition to the optional fields `source` and `rank`) to express information about an event: 1016 | 1017 | field type definition 1018 | ----------- --------------------------- ----------------------------------------------------- 1019 | date [extended date] date value of the event (RECOMMENDED) 1020 | place [set] place(s) of the event (OPTIONAL) 1021 | 1022 | ```{.json #lst-qualified-date lst-cap="Qualified date (of the fall of Constantinople)"} 1023 | {{< include examples/istanbul.event.json >}} 1024 | ``` 1025 | 1026 | ::: {.callout-note} 1027 | Optional fields `startDate` and `endDate` of a qualified date do not refer to the actual date but to when the date was valid. For instance the date of historic events may change with a new discovery, so `date` would hold the new date measure and `startDate` would hold the date of the discovery. 1028 | ::: 1029 | 1030 | Applications MAY disallow or ignore qualified dates without field `date`. 1031 | 1032 | ## Qualified literal 1033 | 1034 | A **Qualified literal** is a [qualified value] with the following fields (in addition to the optional fields `rank`, `source`, `startDate`, and `endDate`): 1035 | 1036 | field type definition 1037 | ----------- --------------- ----------------------------------------------------------------------- 1038 | literal *see below* character string and optional language tag of the literal (RECOMMENDED) 1039 | uri [URI] Globally unique identifier of the literal (OPTIONAL) 1040 | type [list] of [URI] URIs of types (OPTIONAL) 1041 | 1042 | The value of field `literal` MUST be a JSON objects with REQUIRED field `string` for the character string, OPTIONAL field `language` for the language, given as a [language tag], and no other field. Application MAY disallow or ignore qualified literals without field `literal`. Applications MAY use `und` as default value when no language is specified. 1043 | 1044 | The first element of qualified literal array field `type`, if given, MUST be . 1045 | 1046 | ::: {.callout-note} 1047 | Qualified labels allow to express [SKOS eXtension for Labels (SKOS-XL)](https://www.w3.org/TR/skos-reference/#xl) in JSKOS. 1048 | ::: 1049 | 1050 | Qualified statements of data type qualified literal MUST NOT use the property types , , and but they MAY use the corresponding URIs , , and instead. 1051 | 1052 | ```{.json #lst-qualified-literal lst-cap="Concept with qualified literals"} 1053 | {{< include examples/qualified-literal.concept.json >}} 1054 | ``` 1055 | 1056 | # Additional rules {#sec-additional-rules} 1057 | 1058 | ## Resource sameness 1059 | 1060 | [same resource]: #resource-sameness 1061 | [the same]: #resource-sameness 1062 | 1063 | Two [resources] are *same* if and only if they both contain field `uri` with 1064 | the same value. A resource without field `uri` is not same to any other 1065 | resource. 1066 | 1067 | ```{.json #lst-sameness lst-cap="Two same resources"} 1068 | { "uri": "http://example.org/123", "created": "2007" } 1069 | { "uri": "http://example.org/123", "created": "2015" } 1070 | ``` 1071 | 1072 | ## Closed world statements 1073 | 1074 | [closed world statements]: #closed-world-statements 1075 | 1076 | By default, a JSKOS document should be interpreted as possibly incomplete: a 1077 | missing field does not imply that no value exists for this field: this 1078 | assumption is also known as open-world assumption. Applications SHOULD support 1079 | closed world statements to explicitly disable the open world assumption for 1080 | selected properties and explicitly state the known absence or existence of 1081 | unknown values: 1082 | 1083 | data type open world closed world explicit negation explicit existence 1084 | -------------- ---------- ------------ ----------------- ---------------------------- 1085 | [list] no field `[...]` `[]` `[null]` or `[..., null]` 1086 | [set] no field `[...]` `[]` `[null]` or `[..., null]` 1087 | [language map] no field ` {...}` no language tag ` {"-":""}` or ` {"-":[""]}` 1088 | [resource] no field ` {...}` - ` {}` 1089 | [URI]/[URL] no field `"..."` - - 1090 | [date] no field `"..."` - - 1091 | 1092 | ::: {#lst-closed-world} 1093 | The following concept has preferred labels and narrower concepts, but no 1094 | alternative labels nor notations. Nothing is known about broader concepts, 1095 | related concepts, and other possible concept properties: 1096 | 1097 | ```json 1098 | { 1099 | "type": ["http://www.w3.org/2004/02/skos/core#Concept"], 1100 | "prefLabel": { "-": "..." }, 1101 | "altLabel": { }, 1102 | "notation": [], 1103 | "narrower": [ null ] 1104 | } 1105 | ``` 1106 | ::: 1107 | 1108 | 1109 | ## Inference rules and integrity constraints 1110 | 1111 | ### Inference rules 1112 | 1113 | JSKOS records can automatically be expanded with the following inference rules: 1114 | 1115 | - Object types of set elements can be derived from fields the set is used in. For instance members of a set referenced by field `inScheme` can be assumed to be [concept schemes] (SKOS integritry rule S4) and members of a set referenced by field `topConcepts` can be assumed to be [concepts] (SKOS integritry rule S6). 1116 | - If a concept scheme *S* is in set `topConceptOf` of a concept *C* then *S* can be assumed to also be in the set `inScheme` of *C* (SKOS integrity rule S7) 1117 | - If a concept *C* is in set `topConcept` of a concept scheme *S* then *C* can be assumed to be in the set `topConceptOf` of *S* and vice versa (SKOS integrity rule S8) 1118 | 1119 | 1130 | 1131 | ### Integritry constraints 1132 | 1133 | Integrity constraints of SKOS SHOULD be respected. Applications MAY reject JSKOS data violating the constraints. 1134 | 1135 | - [concepts], [concept schemes], [registries], [distributions], [concordances], [concept mappings] are pairwise disjoint (SKOS integrity rule S9) 1136 | 1137 | *this list is not complete yet* 1138 | 1139 | 1140 | 1141 | 1154 | 1155 | [RDF/SKOS]: http://www.w3.org/2004/02/skos/ 1156 | [SKOS Concept Scheme]: http://www.w3.org/TR/skos-primer/#secscheme 1157 | [JSKOS-LD context]: #json-ld-context 1158 | [SKOS Documentary Notes]: http://www.w3.org/TR/skos-primer/#secdocumentation 1159 | 1160 | 1161 | ## Extension with custom fields 1162 | 1163 | A JSKOS record MAY contain additional fields for custom usage. These fields 1164 | MUST start with and underscore (`_`) or consist of uppercase letters and digits 1165 | only (A-Z, 0-1). The fields SHOULD be ignored by generic JSKOS applications. 1166 | 1167 | ::: {#lst-custom-fields} 1168 | The fields `PARTS` and `_id` in the following example can be ignored: 1169 | 1170 | ```json 1171 | { 1172 | "_id": "e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e", 1173 | "uri": "http://www.wikidata.org/entity/Q34095", 1174 | "prefLabel": { "en": "bronze" }, 1175 | "PARTS": ["copper", "tin"] 1176 | } 1177 | ``` 1178 | ::: 1179 | 1180 | 1181 | # References {.unnumbered} 1182 | 1183 | ## Normative references {.unnumbered} 1184 | 1185 | - M. Appleby et al: *IIIF Presentation API 3.0*. June 2020. 1186 | 1187 | 1188 | - T. Berners-Lee, R. Fielding, L. Masinter: *Uniform Resource Identifier (URI): Generic Syntax*. 1189 | RFC 3986, January 2005. 1190 | 1191 | - P. Biron, A. Malhotra: *XML Schema Part 2: Datatypes Second Edition*. 1192 | W3C Recommendation, October 2005. 1193 | 1194 | 1195 | - S. Bradner: *Key words for use in RFCs to Indicate Requirement Levels*. 1196 | RFC 2119, March 1997. 1197 | 1198 | - H. Butler, M. Daly, S. Gillies, S. Hagen, T. Schaub: *The GeoJSON Format*. 1199 | RFC 7946, August 2016. 1200 | 1201 | - T. Bray: *The JavaScript Object Notation (JSON) Data Interchange Format*. 1202 | RFC 8259, December 2017. 1203 | 1204 | - D. Crocker, P. Overell: *Augmented BNF for Syntax Specifications: ABNF*. 1205 | RFC 5234, January 2008. 1206 | 1207 | 1208 | - M. Davis, K. Whistler: *Unicode Normalization Forms*. 1209 | Unicode Standard Annex #15. 1210 | 1211 | 1212 | - M. Dürst, M. Suignard: *Internationalized Resource Identifiers (IRIs)*. 1213 | RFC 3987, January 2005. 1214 | 1215 | - IANA: *Media Types*. 1216 | 1217 | 1218 | - ISO: *Date and time — Representations for information interchangePart 2: Extensions*. 1219 | ISO 8601-2:2019. (summary available at ) 1220 | 1221 | - A. Phillips, M. Davis: *Tags for Identifying Languages*. 1222 | RFC 3066, September 2006. 1223 | 1224 | - R. Sanderson, P. Ciccarese, B. Young: *Web Annotation Data Model*. 1225 | W3C Recommendation, February 2017. 1226 | 1227 | - SPDX: *SPDX 2.3*. 1228 | 1229 | [RFC 2119]: https://tools.ietf.org/html/rfc2119 1230 | [RFC 8259]: https://tools.ietf.org/html/rfc8259 1231 | [RFC 3986]: https://tools.ietf.org/html/rfc3986 1232 | [RFC 3987]: https://tools.ietf.org/html/rfc3987 1233 | [RFC 3066]: https://tools.ietf.org/html/rfc3066 1234 | [RFC 7946]: https://tools.ietf.org/html/rfc7946 1235 | 1236 | ## Informative references {.unnumbered} 1237 | 1238 | * R. Albertoni, D. Browning, S. Cox, A. Gonzalez Beltran, A. Perego, P. Winstanley: 1239 | *Data Catalog Vocabulary (DCAT) - Version 3*. 1240 | August 2024. 1241 | 1242 | 1243 | * K. Alexander, R. Cyganiak, M. Hausenblas, Zhao, J.: 1244 | *Describing Linked Datasets with the VoID Vocabulary*. 1245 | March 2011. 1246 | 1247 | 1248 | * DCMI Usage Board: *DCMI Metadata Terms*. 1249 | June 2012. 1250 | 1251 | 1252 | * F. Cotton (editor): *XKOS: An SKOS extension for representing statistical classifications*. 1253 | DDI Alliance, May 2019. 1254 | 1255 | 1256 | * A. Miles, S. Bechhofer: *SKOS Reference*. 1257 | W3C Recommendation, 18 August 2009. 1258 | 1259 | 1260 | * S. Perreault: *vCard Format Specification*. 1261 | RFC 6350, August 2011 1262 | 1263 | 1264 | * A. Phillips, M. Davis: *Tags for Identifying Languages*. 1265 | RFC 5646, September 2009. 1266 | 1267 | 1268 | * A. Phillips, M. Davis: *Matching of Language Tags*. 1269 | RFC 4647, September 2006. 1270 | 1271 | 1272 | * M. Sporny, P.Champin, D. Longley: *JSON-LD 1.1*. 1273 | W3C Recommendation, July 2020. 1274 | 1275 | 1276 | * M. Zeng, M. Žumer: *NKOS Dublin Core Application Profile (NKOS AP)*. 1277 | Version 0.2, October 2015. 1278 | 1279 | 1280 | [RFC 5646]: http://tools.ietf.org/html/rfc5646 1281 | [RFC 4647]: http://tools.ietf.org/html/rfc4647 1282 | [RFC 5234]: http://tools.ietf.org/html/rfc5234 1283 | [ng-skos]: http://gbv.github.io/ng-skos/ 1284 | 1285 | # Appendices {.unnumbered} 1286 | 1287 | The following appendices are *non-normative*. 1288 | 1289 | ## JSON-LD {.unnumbered #json-ld} 1290 | 1291 | The following [JSON-LD 1.1 context document](http://www.w3.org/TR/json-ld/#the-context) 1292 | (available [from here](context.json)) can be used to map JSKOS without 1293 | [closed world statements] and without [language ranges](#language-range) to RDF.There is also a [list of namespace prefixes](prefixes.json). 1294 | 1295 | ```{.json} 1296 | {{< include context.json >}} 1297 | ``` 1298 | 1299 | JSKOS with closed world statements can be mapped to RDF by ignoring all boolean 1300 | values and/or by mapping selected boolean values to RDF triples with blank 1301 | nodes. 1302 | 1303 | Applications should further add implicit RDF triples, such as `$someConcept 1304 | rdf:type skos:Concept`, if such information can be derived from JSKOS by other 1305 | means. 1306 | 1307 | ## Validation {.unnumbered #validation} 1308 | 1309 | Experimental JSON Schemas exist but don't cover all aspects of JSKOS: 1310 | 1311 | * [Resource](resource.schema.json) 1312 | * [Item](item.schema.json) 1313 | * [Concept](concept.schema.json) 1314 | * [Scheme](scheme.schema.json) 1315 | * [Mapping](mapping.schema.json) 1316 | * [Bundle](bundle.schema.json) 1317 | * [Registry](bundle.schema.json) 1318 | * [Concordance](concordance.schema.json) 1319 | * [Distribution](distribution.schema.json) 1320 | * [Occurrence](occurrence.schema.json) 1321 | 1322 | See NodeJS library [jskos-validate] for an implementation. 1323 | 1324 | Public services to validate JSKOS data are included in instances of 1325 | [jskos-server] and at . 1326 | 1327 | [jskos-validate]: https://www.npmjs.com/package/jskos-validate 1328 | [jskos-server]: https://www.npmjs.com/package/jskos-server 1329 | 1330 | ## Item types as concepts {.unnumbered} 1331 | 1332 | [Item types](#item-type) can be expressed with [concepts] from the following [concept scheme]: 1333 | 1334 | ~~~json 1335 | {{< include examples/item-types.scheme.json >}} 1336 | ~~~ 1337 | 1338 | ## SKOS features not supported in JSKOS {.unnumbered} 1339 | 1340 | JSKOS is aligned with SKOS but all references to SKOS are informative only. 1341 | The following features of SKOS are not supported in JSKOS: 1342 | 1343 | * SKOS notations can have datatypes. JSKOS notations are plain strings. 1344 | 1345 | * SKOS notations, labels, and values of [documentation properties] can be 1346 | empty string. In JSKOS empty string values are disallowed. 1347 | 1348 | * SKOS labels and values of [documentation properties] do not need to 1349 | have a language tag. In JSKOS language tags are mandatory for label 1350 | and documentation properties. 1351 | 1352 | * JSKOS does not include the SKOS properties `skos:broaderTransitive`, 1353 | `skos:narrowerTransitive`, and `skos:semanticRelation`. 1354 | 1355 | 1356 | [documentation properties]: http://www.w3.org/TR/2009/REC-skos-reference-20090818/#notes 1357 | [mapping properties]: http://www.w3.org/TR/2009/REC-skos-reference-20090818/#mapping 1358 | 1359 | ## JSKOS features not supported in SKOS {.unnumbered} 1360 | 1361 | The following features of JSKOS have no corresponce in SKOS: 1362 | 1363 | * [concept occurrences], [registries], [concordances], [concept mappings] as first-class objects, 1364 | and composed [concepts] 1365 | * [closed world statements] 1366 | * order of broaderTransitive statements (can be derived) 1367 | * order of multiple notations 1368 | * order of multiple inScheme statements 1369 | 1370 | ## Additional examples {.unnumbered} 1371 | 1372 | :::{#lst-gnd-concept-scheme lst-cap="Integrated Authority File (GND)"} 1373 | 1374 | The Integrated Authority File (German: *Gemeinsame Normdatei*) is an authority 1375 | file managed by the German National Library. This example encodes GND as JSKOS 1376 | concept scheme with explicit knowledge about existence of more identifiers, 1377 | definitions, and preferred labels: 1378 | 1379 | ```{.json} 1380 | {{< include examples/gnd.scheme.json >}} 1381 | ``` 1382 | ::: 1383 | 1384 | :::{#lst-gnd-concept lst-cap="GND Concept"} 1385 | 1386 | ```{.json} 1387 | {{< include examples/gnd-4130604-1.concept.json >}} 1388 | ``` 1389 | ::: 1390 | 1391 | :::{#lst-ex-ddc-1 lst-cap="DDC Concept"} 1392 | 1393 | A concept from the Dewey Decimal Classification, German edition 22: 1394 | 1395 | ```{.json} 1396 | {{< include examples/ddc-612.112.concept.json >}} 1397 | ``` 1398 | ::: 1399 | 1400 | :::{#lst-ex-ddc-2 lst-cap="DDC Concept"} 1401 | 1402 | A concept from the abbridget Dewey Decimal Classification, edition 23, in three languages: 1403 | 1404 | ```{.json} 1405 | {{< include examples/ddc-641.5.concept.json >}} 1406 | ``` 1407 | ::: 1408 | 1409 | :::{#lst-ex-ddc-decomposed lst-cap="DDC Concept"} 1410 | A decomposed DDC number for medieval cooking: 1411 | 1412 | ```{.json} 1413 | {{< include examples/ddc-641.50902.concept.json >}} 1414 | ``` 1415 | ::: 1416 | 1417 | 1418 | :::{#lst-ex-mappings lst-cap="Mappings"} 1419 | Multiple mappings from one concept (612.112 in DDC) to GND. 1420 | 1421 | ```{.json} 1422 | {{< include examples/ddc-gnd-1.mapping.json >}} 1423 | ``` 1424 | 1425 | ```{.json} 1426 | {{< include examples/ddc-gnd-2.mapping.json >}} 1427 | ``` 1428 | ::: 1429 | 1430 | # Changelog {.unnumbered} 1431 | 1432 | JSKOS started in 2014 as as part of project [coli-conc](https://coli-conc.gbv.de/). 1433 | 1434 | ### 0.7.0 (draft) {-} 1435 | 1436 | - `mappingRelevance` is not experimental anymore 1437 | 1438 | ### 0.6.0 (2025-01-20) {.unnumbered} 1439 | 1440 | - Add [ranks](#rank) and [qualified statements] 1441 | - Add extended dates for `startDate`, `endDate`, and `relatedDate`. 1442 | - Add `relatedDates` to replace `relatedDate` 1443 | - Clarify semantics of resource fields 1444 | - Change item field `replacedBy` to be set (**breaking change**) 1445 | - Add item field `basedOn` 1446 | - Update references, layout and wording 1447 | 1448 | ### 0.5.4 (2024-09-27) {.unnumbered} 1449 | 1450 | - Change JSON-LD context for spatial fields (`location`, `place`, `startPlace`, `endPlace`) 1451 | - Add Concept field `deprecated` 1452 | - Add Item field `replacedBy` 1453 | - Clarify anchoring of regular expressions 1454 | - Mention non-indexing concepts 1455 | 1456 | ### 0.5.3 (2024-09-18) {.unnumbered} 1457 | 1458 | - Allow `@context` to hold an array 1459 | 1460 | ### 0.5.2 (2024-08-30) {.unnumbered} 1461 | 1462 | - Allow location of type `GeometryCollection` 1463 | - Fix schema.org namespace in JSON-LD context document 1464 | 1465 | ### 0.5.1 (2023-07-03) {.unnumbered} 1466 | 1467 | - More precise type of `inScheme`, `topConceptOf`, `mappings`, `occurrences` 1468 | - Add some inference rules and integrity constraints 1469 | - Fix JSON Schema files to allow negative dates and strict annotation dates 1470 | - Add item fields `place` and `media` 1471 | 1472 | ### 0.5.0 (2022-08-29) {.unnumbered} 1473 | 1474 | * Make clear concordance field name distributions (plural) 1475 | * Add license, compressFormat, packageFormat, size, checksum, accessURL to distribution 1476 | * Remove fields for undefined JSKOS-API URLs 1477 | 1478 | ### 0.4.9 (2022-01-18) {.unnumbered} 1479 | 1480 | * Change format of URI in JSON Schema from URI to IRI 1481 | * Change base format of URL in JSON Schema from URI to IRI 1482 | 1483 | ### 0.4.8 (2021-02-18) {.unnumbered} 1484 | 1485 | * Add concept scheme field notationExamples 1486 | 1487 | ### 0.4.7 (2021-02-10) {.unnumbered} 1488 | 1489 | * Add resource field source 1490 | * Add item field address 1491 | * Move startPlace/endPlace to Item and map them to schema:location 1492 | 1493 | ### 0.4.6 (2019-12-02) {.unnumbered} 1494 | 1495 | * Add memberRoles 1496 | 1497 | ### 0.4.5 (2019-04-08) {.unnumbered} 1498 | 1499 | * Add annotations (basic support) 1500 | 1501 | ### 0.4.4 (2018-11-02) {.unnumbered} 1502 | 1503 | * Add concept scheme fields notationPattern and uriPattern 1504 | * Add concept fields startPlace and endPlace 1505 | 1506 | ### 0.4.2 (2018-08-22) {.unnumbered} 1507 | 1508 | * Move identifier field from item to resource 1509 | * Add SKOS documentation field note to item 1510 | * Add optional JSON Schemas 1511 | 1512 | ### 0.4.1 (2018-06-26) {.unnumbered} 1513 | 1514 | * Rename distribution field to distributions 1515 | * Allow digits in custom fields 1516 | 1517 | ### 0.4.0 (2018-06-22) {.unnumbered} 1518 | 1519 | * Add Registry field occurrences 1520 | * Add Distribution object type 1521 | * Change rule for custom fields 1522 | 1523 | ### 0.3.2 (2018-05-29) {.unnumbered} 1524 | 1525 | * Add Concept Scheme field namespace 1526 | 1527 | ### 0.3.1 (2017-11-22) {.unnumbered} 1528 | 1529 | * Extend ocurrences to co-occurrences 1530 | 1531 | ### 0.3.0 (2017-11-15) {.unnumbered} 1532 | 1533 | * Add occurrences 1534 | 1535 | ### 0.2.2 (2017-11-06) {.unnumbered} 1536 | 1537 | * Add mappings field to Concept 1538 | 1539 | ### 0.2.1 (2017-09-27) {.unnumbered} 1540 | 1541 | * Disallow empty strings except as mandatory placeholder with language ranges 1542 | * Support composed concepts with `memberSet` and `memberList` 1543 | 1544 | ### 0.2.0 (2017-09-21) {.unnumbered} 1545 | 1546 | * Rename object to resource 1547 | * Move startDate, endDate, relatedDate, and location from Concept to Item 1548 | * Add item types 1549 | * Update JSON-LD context document 1550 | 1551 | ### 0.1.4 (2016-12-02) {.unnumbered} 1552 | 1553 | * Update JSON-LD context document 1554 | * Change definition of concept bundles to use fields memberSet/List/Choice 1555 | instead of members 1556 | 1557 | ### 0.1.3 (2016-10-03) {.unnumbered} 1558 | 1559 | * Change definition of "location" field to subset of GeoJSON (RFC 7946) 1560 | 1561 | ### 0.1.2 (2016-06-13) {.unnumbered} 1562 | 1563 | * Add "location" field for geographic coordinates 1564 | 1565 | ### 0.1.1 (2016-05-20) {.unnumbered} 1566 | 1567 | * Make field "license" a set instead of a single URI 1568 | * Add field "extent" 1569 | * Update reference to [RFC 5646] instead of obsoleted RFC 4646 1570 | 1571 | ### 0.0.1 (2014-09-11) {-} 1572 | 1573 | * first draft 1574 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jskos", 3 | "version": "0.5.4", 4 | "homepage": "https://gbv.github.io/jskos/", 5 | "type": "module", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/gbv/jskos.git" 9 | }, 10 | "bugs": { 11 | "url": "https://github.com/gbv/jskos/issues" 12 | }, 13 | "scripts": { 14 | "test": "mocha", 15 | "html": "make", 16 | "rdf": "jsonld2rdf -c context.json -p prefixes.json" 17 | }, 18 | "devDependencies": { 19 | "ajv": "^8.17.1", 20 | "ajv-formats": "^3.0.1", 21 | "ajv-formats-draft2019": "^1.6.1", 22 | "edtf": "^4.6.0", 23 | "glob": "^11.0.0", 24 | "jsonld": "^8.3.2", 25 | "jsonld2rdf": "^0.5.1", 26 | "mocha": "^10.7.3" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /post-render: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | cp -v schemas/*.json docs/ 4 | -------------------------------------------------------------------------------- /prefixes.json: -------------------------------------------------------------------------------- 1 | { 2 | "as": "http://www.w3.org/ns/activitystreams#", 3 | "dc": "http://purl.org/dc/elements/1.1/", 4 | "dcat": "http://www.w3.org/ns/dcat#", 5 | "dct": "http://purl.org/dc/terms/", 6 | "dctype": "http://purl.org/dc/dcmitype/", 7 | "ebu": "http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#", 8 | "exif": "http://www.w3.org/2003/12/exif/ns#", 9 | "foaf": "http://xmlns.com/foaf/0.1/", 10 | "geo": "http://www.opengis.net/ont/geosparql#", 11 | "iiifi": "http://iiif.io/api/image/3#", 12 | "iiifp": "http://iiif.io/api/presentation/3#", 13 | "mads": "http://www.loc.gov/mads/rdf/v1#", 14 | "oa": "http://www.w3.org/ns/oa#", 15 | "owl": "http://www.w3.org/2002/07/owl#", 16 | "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", 17 | "rdfs": "http://www.w3.org/2000/01/rdf-schema#", 18 | "schema": "http://schema.org/", 19 | "skos": "http://www.w3.org/2004/02/skos/core#", 20 | "skosxl": "http://www.w3.org/2008/05/skos-xl#", 21 | "spdx": "http://spdx.org/rdf/terms#", 22 | "void": "http://rdfs.org/ns/void#", 23 | "wikibase": "http://wikiba.se/ontology#", 24 | "xkos": "http://rdf-vocabulary.ddialliance.org/xkos#", 25 | "xsd": "http://www.w3.org/2001/XMLSchema#" 26 | } 27 | -------------------------------------------------------------------------------- /schemas/README.md: -------------------------------------------------------------------------------- 1 | This directory contains JSON Schema files for each JSKOS object type. 2 | 3 | The core parts of each schema can be extracted with jq like this: 4 | 5 | jq '[.title,.allOf?,.anyOf?,.properties]' *.json 6 | -------------------------------------------------------------------------------- /schemas/annotation.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "https://gbv.github.io/jskos/annotation.schema.json", 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", 4 | "title": "Annotation", 5 | "description": "Annotation adjusted from Web Annotation Data Model", 6 | "type": "object", 7 | "definitions": { 8 | "date": { 9 | "allOf": [ 10 | { 11 | "type": "string", 12 | "format": "date-time" 13 | }, 14 | { 15 | "type": "string", 16 | "pattern": "Z$" 17 | } 18 | ] 19 | } 20 | }, 21 | "properties": { 22 | "@context": { 23 | "description": "reference to a JSON-LD context document", 24 | "const": "http://www.w3.org/ns/anno.jsonld" 25 | }, 26 | "id": { 27 | "description": "globally unique identifier of the annotation", 28 | "$ref": "resource.schema.json#/definitions/uri" 29 | }, 30 | "type": { 31 | "const": "Annotation" 32 | }, 33 | "created": { 34 | "description": "date of creation", 35 | "$ref": "#/definitions/date" 36 | }, 37 | "modified": { 38 | "description": "date of last modification", 39 | "$ref": "#/definitions/date" 40 | }, 41 | "creator": { 42 | "description": "agent primarily responsible for creation of resource", 43 | "anyOf": [ 44 | { 45 | "type": "object", 46 | "required": [ 47 | "id" 48 | ] 49 | }, 50 | { 51 | "$ref": "resource.schema.json#/definitions/uri" 52 | } 53 | ] 54 | }, 55 | "target": { 56 | "description": "object being annotated, or its URI", 57 | "anyOf": [ 58 | { 59 | "$ref": "resource.schema.json#/definitions/uri" 60 | }, 61 | { 62 | "type": "object", 63 | "required": [ 64 | "id" 65 | ], 66 | "properties": { 67 | "id": { 68 | "$ref": "resource.schema.json#/definitions/uri" 69 | }, 70 | "state": { 71 | "type": "object" 72 | } 73 | } 74 | }, 75 | { 76 | "$ref": "concept.schema.json#" 77 | } 78 | ] 79 | }, 80 | "motivation": { 81 | "description": "motivation of the annotation", 82 | "type": "string" 83 | }, 84 | "bodyValue": { 85 | "description": "optional body value of the annotation", 86 | "type": "string" 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /schemas/bundle.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "https://gbv.github.io/jskos/bundle.schema.json", 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", 4 | "title": "JSKOS Concept Bundle", 5 | "description": "A concept bundle is a group of concepts. Concept bundles can be used for mappings, composed concepts, and occurrences.", 6 | "type": "object", 7 | "$comment": "TODO: adjust sets to more specific ones, currently requires exactly one of the three properties to exist (instead of at most one)", 8 | "properties": { 9 | "memberSet": { 10 | "description": "concepts in this bundle (unordered)", 11 | "$ref": "concept.schema.json#/definitions/conceptSet" 12 | }, 13 | "memberList": { 14 | "description": "concepts in this bundle (ordered)", 15 | "$ref": "concept.schema.json#/definitions/conceptSet" 16 | }, 17 | "memberChoice": { 18 | "description": "concepts in this bundle to choose from", 19 | "$ref": "concept.schema.json#/definitions/conceptSet" 20 | }, 21 | "memberRoles": { 22 | "description": "sets of concepts, specified with a role", 23 | "type": "object", 24 | "propertyNames": { 25 | "$ref": "resource.schema.json#/definitions/uri" 26 | }, 27 | "patternProperties": { 28 | ".*": { 29 | "$ref": "concept.schema.json#/definitions/conceptSet" 30 | } 31 | } 32 | } 33 | }, 34 | "anyOf": [ 35 | { 36 | "type": "object", 37 | "required": [ 38 | "memberSet" 39 | ] 40 | }, 41 | { 42 | "type": "object", 43 | "required": [ 44 | "memberList" 45 | ] 46 | }, 47 | { 48 | "type": "object", 49 | "required": [ 50 | "memberChoice" 51 | ] 52 | }, 53 | { 54 | "type": "object", 55 | "required": [ 56 | "memberRoles" 57 | ] 58 | } 59 | ] 60 | } 61 | -------------------------------------------------------------------------------- /schemas/concept.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "https://gbv.github.io/jskos/concept.schema.json", 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", 4 | "title": "JSKOS Concept", 5 | "description": "entities from a knowledge organization system", 6 | "type": "object", 7 | "definitions": { 8 | "conceptSet": { 9 | "type": "array", 10 | "items": { 11 | "anyOf": [ 12 | { 13 | "type": "null" 14 | }, 15 | { 16 | "$ref": "concept.schema.json#" 17 | } 18 | ] 19 | } 20 | } 21 | }, 22 | "anyOf": [ 23 | { 24 | "$ref": "item.schema.json" 25 | }, 26 | { 27 | "$ref": "bundle.schema.json" 28 | } 29 | ], 30 | "properties": { 31 | "narrower": { 32 | "description": "narrower concepts", 33 | "$ref": "#/definitions/conceptSet" 34 | }, 35 | "broader": { 36 | "description": "broader concepts", 37 | "$ref": "#/definitions/conceptSet" 38 | }, 39 | "related": { 40 | "description": "generally related concepts", 41 | "$ref": "#/definitions/conceptSet" 42 | }, 43 | "previous": { 44 | "description": "related concepts ordered somehow before the concept", 45 | "$ref": "#/definitions/conceptSet" 46 | }, 47 | "next": { 48 | "description": "related concepts ordered somehow after the concept", 49 | "$ref": "#/definitions/conceptSet" 50 | }, 51 | "ancestors": { 52 | "description": "list of ancestors, possibly up to a top concept", 53 | "$ref": "#/definitions/conceptSet" 54 | }, 55 | "inScheme": { 56 | "description": "concept schemes or URI of the concept schemes", 57 | "$ref": "scheme.schema.json#/definitions/schemeSet" 58 | }, 59 | "topConceptOf": { 60 | "description": "concept schemes or URI of the concept schemes", 61 | "$ref": "scheme.schema.json#/definitions/schemeSet" 62 | }, 63 | "mappings": { 64 | "description": "mappings from and/or to this concept", 65 | "$ref": "mapping.schema.json#/definitions/mappingSet" 66 | }, 67 | "occurrences": { 68 | "description": "occurrences with this concept", 69 | "$ref": "occurrence.schema.json#/definitions/occurrenceSet" 70 | }, 71 | "deprecated": { 72 | "description": "whether the concept has been marked as deprecated", 73 | "type": "boolean" 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /schemas/concordance.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "https://gbv.github.io/jskos/concordance.schema.json", 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", 4 | "title": "JSKOS Concordance", 5 | "description": "curated collections of mappings", 6 | "type": "object", 7 | "allOf": [ 8 | { 9 | "$ref": "item.schema.json" 10 | } 11 | ], 12 | "properties": { 13 | "mappings": { 14 | "description": "Mappings in this concordance", 15 | "$ref": "mapping.schema.json#/definitions/mappingSet" 16 | }, 17 | "distributions": { 18 | "description": "Distributions to access the concordance", 19 | "$ref": "distribution.schema.json#/definitions/distributionSet" 20 | }, 21 | "fromScheme": { 22 | "description": "Source concept scheme", 23 | "$ref": "scheme.schema.json" 24 | }, 25 | "toScheme": { 26 | "description": "Target concept scheme", 27 | "$ref": "scheme.schema.json" 28 | }, 29 | "extent": { 30 | "description": "Size of the concordance", 31 | "type": "string" 32 | }, 33 | "license": { 34 | "description": "License which the full concordance can be used under", 35 | "$ref": "concept.schema.json#/definitions/conceptSet" 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /schemas/distribution.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "https://gbv.github.io/jskos/distribution.schema.json", 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", 4 | "title": "JSKOS Distribution", 5 | "description": "available forms to access the content of an item", 6 | "type": "object", 7 | "definitions": { 8 | "distributionSet": { 9 | "type": "array", 10 | "items": { 11 | "anyOf": [ 12 | { 13 | "type": "null" 14 | }, 15 | { 16 | "$ref": "distribution.schema.json#" 17 | } 18 | ] 19 | } 20 | } 21 | }, 22 | "allOf": [ 23 | { 24 | "$ref": "item.schema.json" 25 | } 26 | ], 27 | "properties": { 28 | "download": { 29 | "description": "location of a file in given format", 30 | "$ref": "resource.schema.json#/definitions/url" 31 | }, 32 | "accessURL": { 33 | "description": "location of an API or landing page", 34 | "$ref": "resource.schema.json#/definitions/url" 35 | }, 36 | "size": { 37 | "description": "Size of the distribution in bytes", 38 | "type": "string" 39 | }, 40 | "mimetype": { 41 | "description": "Internet Media Type (also known as MIME type)", 42 | "type": "string" 43 | }, 44 | "compressFormat": { 45 | "description": "compression format of the distribution", 46 | "$ref": "resource.schema.json#/definitions/uri" 47 | }, 48 | "packageFormat": { 49 | "description": "packaging format when multiple files are grouped together", 50 | "$ref": "resource.schema.json#/definitions/uri" 51 | }, 52 | "format": { 53 | "description": "data format identifier of the file", 54 | "$ref": "resource.schema.json#/definitions/uri" 55 | }, 56 | "license": { 57 | "description": "Licenses which the data can be used under", 58 | "$ref": "concept.schema.json#/definitions/conceptSet" 59 | }, 60 | "checksum": { 61 | "description": "Checksum of the download (algorithm and digest value)", 62 | "type": "object", 63 | "properties": { 64 | "algorithm": { 65 | "$ref": "resource.schema.json#/definitions/uri" 66 | }, 67 | "value": { 68 | "type": "string", 69 | "pattern": "^[0-9a-f]+$" 70 | } 71 | }, 72 | "required": [ "algorithm", "value" ] 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /schemas/item.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "https://gbv.github.io/jskos/item.schema.json", 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", 4 | "title": "JSKOS Item", 5 | "description": "named entities", 6 | "type": "object", 7 | "definitions": { 8 | "itemSet": { 9 | "type": "array", 10 | "items": { 11 | "anyOf": [ 12 | { 13 | "type": "null" 14 | }, 15 | { 16 | "$ref": "#" 17 | } 18 | ] 19 | } 20 | }, 21 | "language-tag": { 22 | "type": "string", 23 | "pattern": "^([a-z]{1,8}(-[a-z0-9]{1,8})*-?|-)$" 24 | }, 25 | "language-map": { 26 | "type": "object", 27 | "patternProperties": { 28 | "^([a-z]{1,8}(-[a-z0-9]{1,8})*-?|-)$": { 29 | "type": "string", 30 | "minLength": 1 31 | } 32 | }, 33 | "additionalProperties": false 34 | }, 35 | "language-map-of-lists": { 36 | "type": "object", 37 | "patternProperties": { 38 | "^([a-z]{1,8}(-[a-z0-9]{1,8})*-?|-)$": { 39 | "type": "array", 40 | "items": { 41 | "type": "string", 42 | "minLength": 1 43 | } 44 | } 45 | }, 46 | "additionalProperties": false 47 | }, 48 | "location": { 49 | "type": "object", 50 | "properties": { 51 | "type": { 52 | "type": "string", 53 | "enum": [ 54 | "Point", 55 | "MultiPoint", 56 | "LineString", 57 | "MultiLineString", 58 | "Polygon", 59 | "MultiPolygon" 60 | ] 61 | } 62 | }, 63 | "required": [ 64 | "type" 65 | ], 66 | "additionalProperties": true 67 | }, 68 | "address": { 69 | "type": "object", 70 | "properties": { 71 | "street": { "type": "string" }, 72 | "ext": { "type": "string" }, 73 | "pobox": { "type": "string" }, 74 | "locality": { "type": "string" }, 75 | "region": { "type": "string" }, 76 | "code": { "type": "string" }, 77 | "country": { "type": "string" } 78 | }, 79 | "additionalProperties": false 80 | }, 81 | "media": { 82 | "description": "Media based on IIIF Manifest Data Model", 83 | "type": "object", 84 | "properties": { 85 | "type": { 86 | "const": "Manifest" 87 | }, 88 | "items": { 89 | "type": "array" 90 | } 91 | }, 92 | "additionalProperties": true, 93 | "required": [ 94 | "type", 95 | "items" 96 | ] 97 | } 98 | }, 99 | "allOf": [ 100 | { 101 | "$ref": "resource.schema.json" 102 | } 103 | ], 104 | "properties": { 105 | "url": { 106 | "description": "URL of a page with information about the item", 107 | "$ref": "resource.schema.json#/definitions/url" 108 | }, 109 | "notation": { 110 | "description": "list of notations", 111 | "$ref": "resource.schema.json#/definitions/list" 112 | }, 113 | "prefLabel": { 114 | "description": "preferred labels, index by language", 115 | "$ref": "#/definitions/language-map" 116 | }, 117 | "altLabel": { 118 | "description": "alternative labels, indexed by language", 119 | "$ref": "#/definitions/language-map-of-lists" 120 | }, 121 | "hiddenLabel": { 122 | "description": "hidden labels, indexed by language", 123 | "$ref": "#/definitions/language-map-of-lists" 124 | }, 125 | "scopeNote": { 126 | "description": "see SKOS Documentary Notes", 127 | "$ref": "#/definitions/language-map-of-lists" 128 | }, 129 | "definition": { 130 | "description": "see SKOS Documentary Notes", 131 | "$ref": "#/definitions/language-map-of-lists" 132 | }, 133 | "example": { 134 | "description": "see SKOS Documentary Notes", 135 | "$ref": "#/definitions/language-map-of-lists" 136 | }, 137 | "historyNote": { 138 | "description": "see SKOS Documentary Notes", 139 | "$ref": "#/definitions/language-map-of-lists" 140 | }, 141 | "editorialNote": { 142 | "description": "see SKOS Documentary Notes", 143 | "$ref": "#/definitions/language-map-of-lists" 144 | }, 145 | "changeNote": { 146 | "description": "see SKOS Documentary Notes", 147 | "$ref": "#/definitions/language-map-of-lists" 148 | }, 149 | "note": { 150 | "description": "see SKOS Documentary Notes", 151 | "$ref": "#/definitions/language-map-of-lists" 152 | }, 153 | "startDate": { 154 | "description": "date of birth, creation, or estabishment of the item", 155 | "$ref": "resource.schema.json#/definitions/edtf" 156 | }, 157 | "endDate": { 158 | "description": "date death or resolution of the item", 159 | "$ref": "resource.schema.json#/definitions/edtf" 160 | }, 161 | "relatedDate": { 162 | "description": "other date somehow related to the item (deprecated, use relatedDates instead)", 163 | "$ref": "resource.schema.json#/definitions/edtf" 164 | }, 165 | "relatedDates": { 166 | "description": "other date somehow related to the item (deprecated, use relatedDates instead)", 167 | "type": "array", 168 | "items": { 169 | "$ref": "resource.schema.json#/definitions/edtf" 170 | } 171 | }, 172 | "location": { 173 | "description": "geographic location of the item", 174 | "$ref": "#/definitions/location" 175 | }, 176 | "startPlace": { 177 | "description": "where an item started (e.g. place of birth)", 178 | "$ref": "concept.schema.json#/definitions/conceptSet" 179 | }, 180 | "endPlace": { 181 | "description": "where an item ended (e.g. place of death)", 182 | "$ref": "concept.schema.json#/definitions/conceptSet" 183 | }, 184 | "place": { 185 | "description": "other relevant place(s) of the item", 186 | "$ref": "concept.schema.json#/definitions/conceptSet" 187 | }, 188 | "address": { 189 | "description": "geographic location of the item", 190 | "$ref": "#/definitions/address" 191 | }, 192 | "replacedBy": { 193 | "description": "Related items that supplant, displace, or supersede the described item", 194 | "$ref": "#/definitions/itemSet" 195 | }, 196 | "subject": { 197 | "description": "what this item is about (e.g. topic)", 198 | "$ref": "concept.schema.json#/definitions/conceptSet" 199 | }, 200 | "subjectOf": { 201 | "description": "resources about this item (e.g. documentation)", 202 | "$ref": "concept.schema.json#/definitions/conceptSet" 203 | }, 204 | "source": { 205 | "description": "sources from which the described resource is derived", 206 | "$ref": "concept.schema.json#/definitions/conceptSet" 207 | }, 208 | "depiction": { 209 | "description": "list of image URLs depicting the item", 210 | "type": "array", 211 | "items": { 212 | "anyOf": [ 213 | { 214 | "type": "null" 215 | }, 216 | { 217 | "$ref": "resource.schema.json#/definitions/url" 218 | } 219 | ] 220 | } 221 | }, 222 | "media": { 223 | "description": "audiovisual or other digital content representing the item", 224 | "type": "array", 225 | "items": { 226 | "$ref": "#/definitions/media" 227 | } 228 | }, 229 | "version": { 230 | "description": "version number", 231 | "type": "string" 232 | } 233 | } 234 | } 235 | -------------------------------------------------------------------------------- /schemas/mapping.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "https://gbv.github.io/jskos/mapping.schema.json", 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", 4 | "title": "JSKOS Concept Mapping", 5 | "description": "A mapping represents a mapping between concepts of two concept schemes. It consists two concept bundles with additional metadata not fully defined yet.", 6 | "type": "object", 7 | "definitions": { 8 | "mappingSet": { 9 | "type": "array", 10 | "items": { 11 | "anyOf": [ 12 | { 13 | "type": "null" 14 | }, 15 | { 16 | "$ref": "mapping.schema.json#" 17 | } 18 | ] 19 | } 20 | } 21 | }, 22 | "allOf": [ 23 | { 24 | "$ref": "item.schema.json" 25 | } 26 | ], 27 | "properties": { 28 | "from": { 29 | "description": "concepts mapped from", 30 | "$ref": "bundle.schema.json" 31 | }, 32 | "to": { 33 | "description": "concepts mapped to", 34 | "$ref": "bundle.schema.json" 35 | }, 36 | "fromScheme": { 37 | "description": "source concept scheme", 38 | "$ref": "scheme.schema.json" 39 | }, 40 | "toScheme": { 41 | "description": "target concept scheme", 42 | "$ref": "scheme.schema.json" 43 | }, 44 | "mappingRelevance": { 45 | "description": "numerical confidence value between 0 and 1", 46 | "type": "number", 47 | "minimum": 0, 48 | "maximum": 1 49 | }, 50 | "justification": { 51 | "description": "mapping justification", 52 | "$ref": "resource.schema.json#/definitions/uri" 53 | } 54 | }, 55 | "required": [ 56 | "from", 57 | "to" 58 | ] 59 | } 60 | -------------------------------------------------------------------------------- /schemas/occurrence.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "https://gbv.github.io/jskos/occurrence.schema.json", 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", 4 | "title": "JSKOS Concept Occurrence", 5 | "description": "An occurrence gives the number of a times a concept (“occurrence”) or combination of concepts (“co-occurrence”) is used in a specific relation to entities from a particular database. For instance the occurrence could give the number of documents indexed with some term in a catalog. The field url typically includes a deep link into the database.", 6 | "type": "object", 7 | "definitions": { 8 | "occurrenceSet": { 9 | "type": "array", 10 | "items": { 11 | "anyOf": [ 12 | { 13 | "type": "null" 14 | }, 15 | { 16 | "$ref": "occurrence.schema.json#" 17 | } 18 | ] 19 | } 20 | } 21 | }, 22 | "allOf": [ 23 | { 24 | "$ref": "resource.schema.json" 25 | } 26 | ], 27 | "properties": { 28 | "count": { 29 | "description": "number of times the concepts are used", 30 | "type": "integer", 31 | "minimum": 0 32 | }, 33 | "database": { 34 | "description": "database in which the concepts are used", 35 | "$ref": "item.schema.json" 36 | }, 37 | "frequency": { 38 | "description": "count divided by total number of possible uses", 39 | "$ref": "resource.schema.json#/definitions/percentage" 40 | }, 41 | "relation": { 42 | "description": "type of relation between concepts and entities", 43 | "$ref": "resource.schema.json#/definitions/uri" 44 | }, 45 | "url": { 46 | "description": "URL of a page with information about the occurrence", 47 | "$ref": "resource.schema.json#/definitions/url" 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /schemas/registry.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "https://gbv.github.io/jskos/registry.schema.json", 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", 4 | "title": "JSKOS Registry", 5 | "description": "collections of items (concepts, concept schemes, ...)", 6 | "type": "object", 7 | "allOf": [ 8 | { 9 | "$ref": "item.schema.json" 10 | } 11 | ], 12 | "properties": { 13 | "concepts": { 14 | "description": "Concepts in this registry" 15 | }, 16 | "schemes": { 17 | "description": "Concept schemes in this registry" 18 | }, 19 | "types": { 20 | "description": "Resource types in this registry" 21 | }, 22 | "properties": { 23 | "description": "Property types in this registry" 24 | }, 25 | "mappings": { 26 | "description": "Mappings in this registry" 27 | }, 28 | "registries": { 29 | "description": "Other registries in this registry" 30 | }, 31 | "concordances": { 32 | "description": "Concordances in this registry" 33 | }, 34 | "occurrences": { 35 | "description": "Occurrences in this registry" 36 | }, 37 | "extent": { 38 | "description": "Size of the registry" 39 | }, 40 | "languages": { 41 | "description": "Supported languages" 42 | }, 43 | "license": { 44 | "description": "Licenses which the full registry content can be used under" 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /schemas/resource.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "https://gbv.github.io/jskos/resource.schema.json", 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", 4 | "title": "JSKOS Resource", 5 | "description": "all kinds of entities", 6 | "type": "object", 7 | "definitions": { 8 | "url": { 9 | "type": "string", 10 | "format": "iri-reference", 11 | "pattern": "^https?://" 12 | }, 13 | "uri": { 14 | "$comment": "workaround for https://github.com/luzlab/ajv-formats-draft2019/issues/16", 15 | "anyOf": [ 16 | { 17 | "type": "string", 18 | "format": "iri-reference", 19 | "pattern": "^[a-z]+:" 20 | }, 21 | { 22 | "type": "string", 23 | "format": "uri" 24 | } 25 | ] 26 | }, 27 | "type": { 28 | "description": "URIs of types", 29 | "type": "array", 30 | "items": { 31 | "$ref": "#/definitions/uri" 32 | } 33 | }, 34 | "non-negative-integer": { 35 | "type": "integer", 36 | "minimum": 0 37 | }, 38 | "percentage": { 39 | "type": "number", 40 | "minimum": 0, 41 | "maximum": 1 42 | }, 43 | "date": { 44 | "anyOf": [ 45 | { 46 | "type": "string", 47 | "format": "date" 48 | }, 49 | { 50 | "type": "string", 51 | "format": "date-time" 52 | }, 53 | { 54 | "type": "string", 55 | "pattern": "^-?\\d{4}-[01]\\d-[0123]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d$" 56 | }, 57 | { 58 | "type": "string", 59 | "pattern": "^-?\\d{4}(-[01]\\d)?$" 60 | } 61 | ] 62 | }, 63 | "list": { 64 | "type": "array", 65 | "items": { 66 | "anyOf": [ 67 | { 68 | "type": "null" 69 | }, 70 | { 71 | "type": "string" 72 | } 73 | ] 74 | } 75 | }, 76 | "edtf": { 77 | "$comment": "EDTF Level 1", 78 | "anyOf": [ 79 | { 80 | "type": "string", 81 | "pattern": "^Y?-?[0-9X]{4,}[?~%]?(-[012X][0-9X][?~%]?(-[0-3X][0-9X][?~%]?)?)?$", 82 | "$comment": "EDTF Year, Year-Month, Year-Month-Day" 83 | }, 84 | { 85 | "type": "string", 86 | "pattern": "^Y?-?[0-9X?~%-]{4,}T[0-9?~%:.]+(Z|[+-][0-9?~%:]+)?$", 87 | "$comment": "EDTF Date and Time" 88 | }, 89 | { 90 | "type": "string", 91 | "pattern": "^(|\\.\\.|[0-9TXYZ%~?.+-]+)/(|\\.\\.|[0-9TXYZ%~?.+-]+)$", 92 | "$comment": "EDTF Interval (very lax)" 93 | } 94 | ] 95 | }, 96 | "rank": { 97 | "type": "string", 98 | "enum": ["normal","preferred","deprecated"], 99 | "default": "normal" 100 | }, 101 | "qualifiedValue": { 102 | "type": "object", 103 | "properties": { 104 | "startDate": { 105 | "description": "date when the statement started to be valid", 106 | "$ref": "#/definitions/edtf" 107 | }, 108 | "endDate": { 109 | "description": "date when the statement ended to be valid", 110 | "$ref": "#/definitions/edtf" 111 | }, 112 | "source": { 113 | "description": "sources as evidence for the statement", 114 | "$ref": "concept.schema.json#/definitions/conceptSet" 115 | }, 116 | "rank": { 117 | "$ref": "#/definitions/rank" 118 | } 119 | } 120 | } 121 | }, 122 | "properties": { 123 | "@context": { 124 | "description": "reference to a JSON-LD context document", 125 | "anyOf": [ 126 | { 127 | "type": "string", 128 | "format": "iri", 129 | "default": "https://gbv.github.io/jskos/context.json" 130 | }, 131 | { 132 | "type": "array", 133 | "items": { 134 | "$ref": "#/properties/@context/anyOf/0" 135 | } 136 | } 137 | ] 138 | }, 139 | "uri": { 140 | "description": "primary globally unique identifier", 141 | "$ref": "#/definitions/uri" 142 | }, 143 | "identifier": { 144 | "description": "additional identifiers", 145 | "$ref": "#/definitions/list" 146 | }, 147 | "type": { 148 | "$ref": "#/definitions/type" 149 | }, 150 | "created": { 151 | "description": "date of creation", 152 | "$ref": "#/definitions/date" 153 | }, 154 | "issued": { 155 | "description": "date of publication", 156 | "$ref": "#/definitions/date" 157 | }, 158 | "modified": { 159 | "description": "date of last modification", 160 | "$ref": "#/definitions/date" 161 | }, 162 | "creator": { 163 | "description": "agent primarily responsible for creation of resource", 164 | "$ref": "concept.schema.json#/definitions/conceptSet" 165 | }, 166 | "contributor": { 167 | "description": "agent responsible for making contributions to the resource", 168 | "$ref": "concept.schema.json#/definitions/conceptSet" 169 | }, 170 | "publisher": { 171 | "description": "agent responsible for making the resource available", 172 | "$ref": "concept.schema.json#/definitions/conceptSet" 173 | }, 174 | "partOf": { 175 | "description": "resources which this resource is part of (if no other field applies)", 176 | "$ref": "concept.schema.json#/definitions/conceptSet" 177 | }, 178 | "annotations": { 179 | "type": "array", 180 | "items": { 181 | "$ref": "annotation.schema.json" 182 | } 183 | }, 184 | "rank": { 185 | "$ref": "#/definitions/rank" 186 | }, 187 | "qualifiedRelations": { 188 | "type": "object", 189 | "propertyNames": { "$ref": "#/definitions/uri" }, 190 | "patternProperties": { 191 | ".*": { 192 | "type": "array", 193 | "items": { 194 | "type": "object", 195 | "allOf": [ { "$ref": "#/definitions/qualifiedValue" } ], 196 | "properties": { 197 | "resource": { 198 | "description": "object of the relation", 199 | "$ref": "#" 200 | } 201 | }, 202 | "patternProperties": { "^_|^[A-Z0-9]+$": {} }, 203 | "unevaluatedProperties": false 204 | } 205 | } 206 | } 207 | }, 208 | "qualifiedDates": { 209 | "type": "object", 210 | "propertyNames": { "$ref": "#/definitions/uri" }, 211 | "patternProperties": { 212 | ".*": { 213 | "type": "array", 214 | "items": { 215 | "type": "object", 216 | "allOf": [ { "$ref": "#/definitions/qualifiedValue" } ], 217 | "properties": { 218 | "date": { 219 | "$ref": "#/definitions/edtf" 220 | } 221 | }, 222 | "patternProperties": { "^_|^[A-Z0-9]+$": {} }, 223 | "unevaluatedProperties": false 224 | } 225 | } 226 | } 227 | }, 228 | "qualifiedLiterals": { 229 | "type": "object", 230 | "propertyNames": { "$ref": "#/definitions/uri" }, 231 | "patternProperties": { 232 | ".*": { 233 | "type": "array", 234 | "items": { 235 | "type": "object", 236 | "allOf": [ 237 | { "$ref": "#/definitions/qualifiedValue" } 238 | ], 239 | "properties": { 240 | "type": { "$ref": "#/definitions/type" }, 241 | "literal": { 242 | "type": "object", 243 | "properties": { 244 | "string": { "type": "string" }, 245 | "language": { "$ref": "item.schema.json#/definitions/language-tag" } 246 | }, 247 | "required": [ "string" ], 248 | "additionalProperties": false 249 | } 250 | }, 251 | "patternProperties": { "^_|^[A-Z0-9]+$": {} }, 252 | "unevaluatedProperties": false 253 | } 254 | } 255 | } 256 | } 257 | }, 258 | "patternProperties": { "^_|^[A-Z0-9]+$": {} } 259 | } 260 | -------------------------------------------------------------------------------- /schemas/scheme.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "https://gbv.github.io/jskos/scheme.schema.json", 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", 4 | "title": "JSKOS Concept Scheme", 5 | "description": "compiled collections of concepts (knowledge organization systems)", 6 | "type": "object", 7 | "definitions": { 8 | "schemeSet": { 9 | "type": "array", 10 | "items": { 11 | "anyOf": [ 12 | { 13 | "type": "null" 14 | }, 15 | { 16 | "$ref": "scheme.schema.json#" 17 | } 18 | ] 19 | } 20 | } 21 | }, 22 | "allOf": [ 23 | { 24 | "$ref": "item.schema.json" 25 | } 26 | ], 27 | "$comment": "TODO: types, languages", 28 | "properties": { 29 | "topConcepts": { 30 | "description": "top concepts of the scheme", 31 | "$ref": "concept.schema.json#/definitions/conceptSet" 32 | }, 33 | "versionOf": { 34 | "description": "concept scheme which this scheme is a version or edition of", 35 | "$ref": "scheme.schema.json#/definitions/schemeSet" 36 | }, 37 | "namespace": { 38 | "description": "URI namespace that all concepts URIs are expected to start with", 39 | "$ref": "resource.schema.json#/definitions/uri" 40 | }, 41 | "uriPattern": { 42 | "description": "URI pattern that all concept URIs are expected to match", 43 | "type": "string" 44 | }, 45 | "notationPattern": { 46 | "description": "regular expression that all primary notations should follow", 47 | "type": "string" 48 | }, 49 | "notationExamples": { 50 | "description": "list of some valid notations as examples", 51 | "type": "array", 52 | "items": { 53 | "type": "string" 54 | } 55 | }, 56 | "concepts": { 57 | "description": "Concepts in this scheme", 58 | "$ref": "concept.schema.json#/definitions/conceptSet" 59 | }, 60 | "types": { 61 | "description": "Concept types of concepts in this scheme", 62 | "$ref": "concept.schema.json#/definitions/conceptSet" 63 | }, 64 | "distributions": { 65 | "description": "Distributions to access the content of the concept scheme", 66 | "$ref": "distribution.schema.json#/definitions/distributionSet" 67 | }, 68 | "extent": { 69 | "description": "Size of the concept scheme", 70 | "type": "string" 71 | }, 72 | "languages": { 73 | "description": "Supported languages", 74 | "$ref": "resource.schema.json#/definitions/list" 75 | }, 76 | "license": { 77 | "description": "Licenses which the full scheme can be used under", 78 | "$ref": "concept.schema.json#/definitions/conceptSet" 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | a { 2 | text-decoration: none; 3 | } 4 | a:hover { 5 | text-decoration: underline; 6 | } 7 | div.callout.callout-note { 8 | border: 1px solid #95a5a6; 9 | } 10 | .callout.callout-style-default .callout-body { 11 | font-size: 1rem; 12 | } 13 | .listing { 14 | border: 1px solid #95a5a6; 15 | border-radius: .375rem; 16 | } 17 | figure > div > .sourceCode { 18 | margin: 0 0 0.5rem 0; 19 | } 20 | .listing > figure > figcaption { 21 | background-color: #eaecee; 22 | margin: 0; 23 | padding: 0.25rem 0.5rem; 24 | } 25 | .listing > figure > div { 26 | padding: 0.25rem 0.5rem; 27 | } 28 | -------------------------------------------------------------------------------- /test/examples-ld.js: -------------------------------------------------------------------------------- 1 | import fs from "fs" 2 | import assert from "assert" 3 | import testExamples from "./lib/test-examples.js" 4 | 5 | import jsonld from "jsonld" 6 | 7 | const types = "resource item concept scheme mapping concordance registry distribution occurrence bundle".split(" ") 8 | 9 | const context = JSON.parse(fs.readFileSync('./context.json')) 10 | 11 | // TODO: move to jskos-tools 12 | // or fix https://github.com/digitalbazaar/jsonld.js/issues/271 13 | function cleanup(data) { 14 | if ( Array.isArray(data) ) { 15 | data.forEach(cleanup) 16 | } else if (typeof data === 'object') { 17 | for (let key in data) { 18 | if (key.match(/-$/)) { // remove language ranges 19 | delete data[key] 20 | } else { 21 | cleanup(data[key]) 22 | } 23 | } 24 | } 25 | } 26 | 27 | testExamples("JSON-LD examples", types, async (objects, file, type) => { 28 | objects.forEach( doc => { 29 | doc['@context'] = context 30 | cleanup(doc) 31 | }) 32 | const ntfile = file.replace(/\.json/,'.nt') 33 | const nquads = await jsonld.toRDF(objects, {format: 'application/n-quads'}) 34 | .then(quads => quads.split("\n").filter( l => l ).sort().join("\n")+"\n") 35 | if (fs.existsSync(ntfile)) { 36 | let expect = fs.readFileSync(ntfile).toString() 37 | assert.equal(expect, nquads, 'ntfile') 38 | //console.log(ntfile) 39 | } else { 40 | //console.log(nquads) 41 | } 42 | }) 43 | -------------------------------------------------------------------------------- /test/examples-schema.js: -------------------------------------------------------------------------------- 1 | import fs from "fs" 2 | import assert from "assert" 3 | import testExamples from "./lib/test-examples.js" 4 | 5 | // Set up Ajv JSON schema validator 6 | import Ajv2019 from "ajv/dist/2019.js" 7 | import ajvFormats from "ajv-formats" 8 | import ajvFormats2019 from "ajv-formats-draft2019" 9 | 10 | const ajv = new Ajv2019() 11 | ajvFormats(ajv) 12 | ajvFormats2019(ajv) 13 | 14 | // load schemas 15 | const types = "resource item concept scheme mapping concordance registry distribution occurrence bundle annotation".split(" ") 16 | 17 | let schemas = {} 18 | let validate = {} 19 | for (let type of types) { 20 | schemas[type] = JSON.parse(fs.readFileSync(`./schemas/${type}.schema.json`)) 21 | ajv.addSchema(schemas[type]) 22 | } 23 | for (let type of types) { 24 | validate[type] = ajv.compile(schemas[type]) 25 | } 26 | 27 | // validate examples against schemas 28 | testExamples("JSON Schema examples", types, (objects, file, type) => { 29 | for (let object of objects) { 30 | if (validate[type](object)) { 31 | assert.ok(true) 32 | } else { 33 | assert.fail(`${validate[type].errors.reduce((t, c) => `${t}- ${c.dataPath} ${c.message}\n`, "")}`) 34 | } 35 | } 36 | }) 37 | -------------------------------------------------------------------------------- /test/frame.json: -------------------------------------------------------------------------------- 1 | { 2 | "@type": "http://www.w3.org/2004/02/skos/core#Concept", 3 | "prefLabel": {}, 4 | "notation": {}, 5 | "altLabel": {}, 6 | "definition": { } 7 | } 8 | -------------------------------------------------------------------------------- /test/lib/test-examples.js: -------------------------------------------------------------------------------- 1 | import fs from "fs" 2 | import * as glob from "glob" 3 | 4 | export default (name, types, test) => { 5 | describe(name, () => { 6 | for (let type of types) { 7 | describe(type, () => { 8 | for (let file of glob.sync('examples/*'+type+'.json')) { 9 | it(file, async () => { 10 | let objects = JSON.parse(fs.readFileSync(file)) 11 | if (!Array.isArray(objects)) { 12 | objects = [objects] 13 | } 14 | return test(objects, file, type) 15 | }) 16 | } 17 | }) 18 | } 19 | }) 20 | } 21 | -------------------------------------------------------------------------------- /version.yaml: -------------------------------------------------------------------------------- 1 | subtitle: Version 0.6.0 2 | date: 2025-01-20 3 | --------------------------------------------------------------------------------