IRI: https://w3id.org/arm/core/vocabularies/handwriting_type/0.1/mixedHand
IRI: https://w3id.org/arm/core/vocabularies/handwriting_type/0.1/otherHand
This HTML document was obtained by processing the OWL ontology source code through LODE, Live OWL Documentation Environment, developed by Silvio Peroni.
13 | -------------------------------------------------------------------------------- /application_profiles/sources/ontologies/geonames_v3.1_pruned_for_ARM.rdf: -------------------------------------------------------------------------------- 1 | 2 | 3 |IRI: https://w3id.org/arm/core/vocabularies/typeface/0.1/gothic-antique
IRI: https://w3id.org/arm/core/vocabularies/typeface/0.1/rotunda
IRI: https://w3id.org/arm/core/vocabularies/typeface/0.1/textura
This HTML document was obtained by processing the OWL ontology source code through LODE, Live OWL Documentation Environment, developed by Silvio Peroni.
13 | -------------------------------------------------------------------------------- /core/vocabularies/arrangement/0.1/arrangement.rdf: -------------------------------------------------------------------------------- 1 | 2 | 3 |IRI: https://w3id.org/arm/core/vocabularies/status/0.1/cancelled
IRI: https://w3id.org/arm/core/vocabularies/status/0.1/current
IRI: https://w3id.org/arm/core/vocabularies/status/0.1/deprecated
IRI: https://w3id.org/arm/core/vocabularies/status/0.1/invalid
This HTML document was obtained by processing the OWL ontology source code through LODE, Live OWL Documentation Environment, developed by Silvio Peroni.
13 | -------------------------------------------------------------------------------- /doc/versioning.md: -------------------------------------------------------------------------------- 1 | Art and Rare Materials (ARM) Ontology and Vocabulary Versioning and Change Management 2 | ========================== 3 | 4 | Table of Contents 5 | ------------ 6 | 7 | * [Introduction](#intro) 8 | * [Ontology Versioning](#ontology-versioning) 9 | * [Vocabulary Versioning](#vocabulary-versioning) 10 | * [Version Numbering](#version-numbering) 11 | * [Issuance and Modification Datetimes](#datetimes) 12 | * [Change Descriptions](#change-descriptions) 13 | 14 | 15 | Introduction 16 | ------------ 17 | 18 | This document describes a process and protocol for versioning and change management of the ARM ontologies and vocabularies. 19 | 20 | 21 | Ontology Versioning 22 | ------------ 23 | 24 | The following protocols are used to version the ontologies. 25 | 26 | * The use of OWL versioning predicates follows the [OWL 2 specification](https://www.w3.org/TR/owl2-syntax/#Ontology_IRI_and_Version_IRI). 27 | * The ontology IRI is the unversioned IRI that is the subject of the `rdf:type` owl:Ontology assertion in the ontology header. 28 | * `owl:versionIRI` identifies a particular version of the ontology; e.g., `https://w3id.org/arm/core/ontology/0.1/`. 29 | * The ontology IRI redirects to the `owl:versionIRI` of the current version of the ontology. 30 | * Previous versions of the ontology continue to be available at their `owl:versionIRI`. 31 | * By importing or referencing terms from a particular `owl:versionIRI`, users are insulated from non-backward-compatible changes in newer published versions until they decide to upgrade. 32 | * Version numbering (`MAJOR.MINOR.PATCH`). See [discussion below](#version-numbering) on two possible numbering conventions. 33 | * The `owl:versionIRI` is updated for `MAJOR` and `MINOR` versions, but not `PATCH` versions. It thus includes only the `MAJOR` and `MINOR` version numbers. 34 | 35 | 36 | Vocabulary Versioning 37 | ------------ 38 | 39 | Several of the predicates used in the ontology versioning protocol are of type `owl:OntologyProperty` and thus cannot be used with our vocabularies, which are typed `void:Dataset` rather than 40 | `owl:Ontology`. In particular, `owl:versionIRI` has domain `owl:Ontology`, so only versioned URIs are used for the vocabularies (e.g., `https://w3id.org/arm/core/vocabularies/typeface/0.1/`), using the same schema outlined for ontologies. Versioning is also supported by defining `owl:versionInfo` on the Dataset 41 | and following the conventions described below for use of [version numbers](#version-numbering), [issuance and modification datetimes](#datetimes), and [change descriptions](#change-descriptions). 42 | 43 | Version Numbering 44 | ---------------- 45 | 46 | Two possible version number conventions are shown here. Note that Model A is more rigorously defined than Model B, because the latter uses subjective notions of "sufficiently large" and "sufficiently significant" alongside the objective notions of backward- and non-backward-compatibility. Possibly Model B can be provided a fully objective formulation. 47 | 48 | **MODEL A (the bibliotek-o model)** 49 | 50 | * MAJOR: non-backward-compatible modifications 51 | * MINOR: backward-compatible semantic modifications 52 | * PATCH: non-semantic modifications, such as fixing typos or adding rdfs:labels in other languages 53 | 54 | **MODEL B:** 55 | 56 | * MAJOR: a sufficiently large set of sufficiently significant and non-backward-compatible changes so as to represent a new major version 57 | * MINOR: non-backward-compatible semantic modifications 58 | * PATCH: backward-compatible semantic modifications as well as non-semantic modifications, such as fixing typos or adding rdfs:labels in other languages 59 | 60 | 61 | * To avoid an unnecessary proliferation of `MAJOR` versions, `owl:deprecated` is applied to terms slated for removal. The precise implementation depends on the choice of Model A or B above: 62 | * Model A: A term deprecated in a `MINOR` version will be removed in the next `MAJOR` version 63 | * Model B: A term deprecated in a `PATCH` version will be removed in the next `MINOR` version 64 | 65 | * `owl:versionInfo` provides a label containing the version number, formatted as "Version n.n.n"; e.g., "Version 1.1.0". This version number is also used to tag the repository, in this case `v1.1.0`. 66 | * `owl:priorVersion` provides the URI of the previous MAJOR.MINOR version of the ontology, if any. 67 | * `owl:backwardCompatibleWith` or `owl:incompatibleWith` may also be used to reference previous `MAJOR.MINOR` versions of the ontology, where applicable. 68 | 69 | 70 | 71 | Issuance and Modification Datetimes 72 | ------------ 73 | 74 | * `dcterms:issued` is used on each term, and on the ontology or vocabulary as a whole, to indicate datetime of first issuance. 75 | * `dcterms:modified` is used on each term, and on the ontology or vocabulary as a whole, to indicate last modification datetime. 76 | * Terms not modified since first issuance have the same `dcterms:issued` and `dcterms:modified` values. 77 | * Datetime values are expressed in ISO-8601 format; e.g., "2017-04-22T01:30:00-04:00". 78 | * The `dcterms` values do not include extraneous text, so that they are machine-readable without parsing. Change descriptions are provided by `skos:changeNote` (see following section). 79 | 80 | Change Descriptions 81 | ------------ 82 | * `skos:changeNote` is used to provide human-readable descriptions of term modifications. 83 | * One `skos:changeNote` is used per version. That is, if more than one change is made to the same term in the same version, all are recorded in the same change note. If multiple changes are made to the same term in different versions, they are recorded in multiple change notes. 84 | * The change note also records the ontology or vocabulary version, so that modifications to a term can be traced through the affected versions of the ontology. The format used is, e.g., "Fix rdfs:label (v1.0.1)". 85 | * A `skos:changeNote` could be applied to the ontology or vocabulary itself to record major, broad, or high-level changes affecting multiple terms. 86 | * Changes are also recorded in change logs for each ontology, vocabulary, and application profile. 87 | 88 | 89 | -------------------------------------------------------------------------------- /tools/rbms_vocabs/test/xspec/rbms_vocabs.xspec: -------------------------------------------------------------------------------- 1 | 2 |IRI: https://w3id.org/arm/core/vocabularies/arrangement/0.1/closed
IRI: https://w3id.org/arm/core/vocabularies/arrangement/0.1/folded
IRI: https://w3id.org/arm/core/vocabularies/arrangement/0.1/unfolded
IRI: https://w3id.org/arm/core/vocabularies/arrangement/0.1/opened
IRI: https://w3id.org/arm/core/vocabularies/arrangement/0.1/rolled
IRI: https://w3id.org/arm/core/vocabularies/arrangement/0.1/unrolled
This HTML document was obtained by processing the OWL ontology source code through LODE, Live OWL Documentation Environment, developed by Silvio Peroni.
13 | -------------------------------------------------------------------------------- /tools/build-lode-docs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Build LODE documentation for the ARM ontologies and vocabularies. 3 | 4 | Designed to be run from the root directory with: 5 | 6 | > python tools/build-lode-docs.py 7 | 8 | and assumes paths for RDF files as set in the RDF_FILES list with 9 | paths relative to the repository root. 10 | """ 11 | import argparse 12 | import logging 13 | import os.path 14 | import re 15 | from requests_toolbelt import MultipartEncoder 16 | import requests 17 | 18 | LODE_SERVICE = 'http://www.essepuntato.it/lode' 19 | BASE = '/arm' 20 | 21 | RDF_FILES = [ 22 | 'award/ontology/0.1/award.rdf', 23 | 'activity/ontology/0.1/activity.rdf', 24 | 'core/ontology/0.1/core.rdf', 25 | 'core/vocabularies/arrangement/0.1/arrangement.rdf', 26 | 'core/vocabularies/handwriting_type/0.1/handwriting_type.rdf', 27 | 'core/vocabularies/origin/0.1/origin.rdf', 28 | 'core/vocabularies/status/0.1/status.rdf', 29 | 'core/vocabularies/typeface/0.1/typeface.rdf', 30 | 'custodial_history/ontology/0.1/custodial_history.rdf', 31 | 'measurement/ontology/0.1/measurement.rdf' 32 | ] 33 | 34 | 35 | def get_namespace(rdfxml): 36 | """Get ontology or vocabulary namespace from the RDF/XML. 37 | 38 | look for either: 39 | * owl:versionIRI property for the ontologies 40 | * else the owl:Ontology (was void:Dataset before munging) 41 | type definition for the vocabularies 42 | """ 43 | from rdflib.graph import Graph 44 | from rdflib.namespace import RDF, OWL, VOID 45 | g = Graph() 46 | g.parse(data=rdfxml, format="application/rdf+xml") 47 | # Look for owl:versionIRI first (_assume_ only one!) 48 | for s, p, o in g.triples((None, OWL.versionIRI, None)): 49 | return str(o) 50 | # Look for void:Dataset second (_assume_ only one!) 51 | for s, p, o in g.triples((None, RDF.type, OWL.Ontology)): 52 | return str(s) 53 | # Else, oops 54 | raise Exception("Failed to find namespace!") 55 | 56 | 57 | def get_lode(rdfxml): 58 | """Get LODE HTML document for given rdfxml. 59 | 60 | Returns LODE HTML as a string. 61 | 62 | curl -H 'Expect:' 63 | -F "url=" 64 | -F "file=@award/ontology/0.1/temp.rdf;filename=temp.rdf" 65 | -F "module=" 66 | -F "lang_label=" 67 | http://www.essepuntato.it/lode 68 | """ 69 | m = MultipartEncoder( 70 | fields={'url': '', 71 | 'file': ('file.rdf', rdfxml, 'application/xml+rdf'), 72 | 'module': '', 73 | 'lang_label': ''} 74 | ) 75 | r = requests.post(LODE_SERVICE, data=m, 76 | headers={'Content-Type': m.content_type}) 77 | # Get bytes back and decode as UTF-8 string 78 | return(r.content.decode("utf-8")) 79 | 80 | 81 | def fix_anchors(html, namespace): 82 | """Fix anchors in LODE html, returns modified HTML.""" 83 | # Pass 1 - find anchors to change 84 | terms = {} 85 | seen_anchors = set() 86 | for m in re.findall(r'''IRI: