diff --git a/README.md b/README.md index 5b12e48..67abaa0 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,11 @@ # versioning-ontology -Generic concepts for doing semantic versioning for a suite of artifacts for semantic systems in production. +This ontology represents generic concepts for doing semantic versioning and dependency tracking for a suite of artifacts for semantic systems in production. Versioned artifacts are given semantic version numbers of the form "N.N.N" (as described in https://semver.org/). This ontology provides the ability to state that a particular version of one ontology depends on the semantic version number of another ontology being in a certain range. For example, version 6.3.0 of a disease taxonomy depends on: +1. the version of a disease ontology being at least 3.1.0 and less than 4.0.0. +2. the version of gist core being between at least 12.1.0 and less than 13.0.0. + +The need for specifying such dependencies arises when ontologies use terms from imported ontologies. + +Three SPARQL queries are provided to perform the following tasks: +1. Find all versioned artifacts and their dependencies. +2. Find all cases where a version dependency requirement is not met. Return result in English. +3. Find all cases where a version dependency requirement is not met. Return result as a SHACL report. diff --git a/examples/examplesVersionDependency.ttl b/examples/examplesVersionDependency.ttl index 2ab4a62..2fec5ba 100644 --- a/examples/examplesVersionDependency.ttl +++ b/examples/examplesVersionDependency.ttl @@ -1,7 +1,7 @@ # imports: https://ontologies.exco.com/exeoDiseases -# imports: https://w3id.org/semanticarts/ontology/gistCore12.1.0 -# imports: https://w3id.org/semanticarts/ontology/operators -# imports: https://w3id.org/semanticarts/ontology/versioning +# imports: https://w3id.org/semanticarts/ontology/gistCore12.2.2 +# imports: https://w3id.org/semanticarts/ontology/operators1.0.0 +# imports: https://w3id.org/semanticarts/ontology/versioning1.0.0 @prefix ops: . @prefix owl: . @@ -13,8 +13,13 @@ a owl:Ontology ; - skos:scopeNote "The version of this ontology does not meet the dependency requirement."^^xsd:string ; + owl:imports + , + + ; + owl:versionIRI ; skos:prefLabel "Diseases"^^xsd:string ; + skos:scopeNote "The version of this ontology does not meet the dependency requirement."^^xsd:string ; ver:hasVersionNumber [ a ver:SemanticVersionNumber ; ver:uniqueText "3.0.2"^^xsd:string ; @@ -25,13 +30,13 @@ a owl:Ontology ; owl:imports , - , - , - + , + , + ; + owl:versionIRI ; skos:definition "A hierarchy of diseases."^^xsd:string ; skos:prefLabel "Disease Taxonomy"^^xsd:string ; - skos:scopeNote "The semantic version number for the disease taxonomy is 6.3.0. This version depends on the version of the disease ontology being between 3.1.0 and 4.0.0. It also depends on the version of gist core being between 12.1.0 and 13.0.0."^^xsd:string ; ver:dependsOn [ a ver:VersionRangeSpec ; @@ -66,10 +71,15 @@ a owl:Ontology ; + owl:imports + , + + ; + owl:versionIRI ; skos:prefLabel "gist"^^xsd:string ; ver:hasVersionNumber [ a ver:SemanticVersionNumber ; - ver:uniqueText "12.2.0"^^xsd:string ; + ver:uniqueText "12.2.2"^^xsd:string ; ] ; . diff --git a/versioning.ttl b/versioning.ttl index c9fdeea..97a353e 100644 --- a/versioning.ttl +++ b/versioning.ttl @@ -1,4 +1,4 @@ -# imports: https://w3id.org/semanticarts/ontology/operators +# imports: https://w3id.org/semanticarts/ontology/operators1.0.0 @prefix ops: . @prefix owl: . @@ -11,10 +11,11 @@ a owl:Ontology ; - owl:imports ; + owl:imports ; owl:versionIRI ; skos:definition "Generic concepts for semantic versioning of a suite of artifacts for semantic systems in production."^^xsd:string ; - skos:editorialNote "Although this was originally intended for semantic version numbers, the ontology could be tweaked in a very small way to use different version numbers, so long as they are ordered."^^xsd:string ; + skos:editorialNote "Although this was originally intended for semantic version numbers, the ontology could be tweaked in a very small way to use different version numbers, so long as they are ordered."^^xsd:string ; + skos:example "The semantic version number for the disease taxonomy is 6.3.0. This version depends on the version of the imported disease ontology being at least 3.1.0 and less than 4.0.0. It also depends on the version of gist core being at least 12.1.0 and less than 13.0.0."^^xsd:string ; skos:prefLabel "Semantic Versioning Ontology"^^xsd:string ; ver:hasVersionNumber [ a ver:SemanticVersionNumber ; @@ -114,7 +115,7 @@ ver:VersionedItemCollection ver:dependsOn a owl:ObjectProperty ; skos:definition "Relates something to what it depends on."^^xsd:string ; - skos:example "A given versioned item may depend on a particular version (or range of versions) of another versioned item."^^xsd:string ; + skos:example "Version 6.3.0 of a disease taxonomy depends on the version number of an imported disease ontology being at least 3.1.0 and less than 4.0.0."^^xsd:string ; skos:prefLabel "depends on"^^xsd:string ; .