A minimal ontology example described in the turtle syntax is described below.
This minimal example would be accepted for the POST /ontologies operation and then be available for the administrator to validate.
@prefix owl: <http://www.w3.org/2002/07/owl#> .
<http://www.orange.org/minimal-ontology> rdf:type owl:Ontology .
This first validation step ensures the ontology is valid in terms of syntax/parsing and basic structure: it should at least have a <iri> rdf:type owl:Ontology
declaration
Alternatively, a default namespace declared as below is also compliant. This is mostly only recommended for controlled vocabularies outside of OWL e.g. SKOS or RDFS vocabularies.
@prefix : <http://www.orange.org/minimal-ontology/> .
Although these minimal examples are funcionnal, they are neither practicle nor informative, please follow the recommendations below.
The following is a recommended set of annotations that you should consider adding to your ontology, whatever its state. See https://www.dublincore.org/specifications/dublin-core/dcmi-terms/ and
A default namespace (@prefix and a @base with the ontology iri.
Below is an exemple ontology with this structure:
@base <http://www.orange.org/minimal-ontology/> .
@prefix : <http://www.orange.org/minimal-ontology/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix terms: <http://purl.org/dc/terms/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
<http://www.orange.org/minimal-ontology> rdf:type owl:Ontology ;
dc:creator "TH" ;
dc:title "The prime ontology example" ;
dc:description "One Ontology example to rule them all" ;
owl:versionInfo "0.0.1" ;
owl:versionIRI "http://www.orange.org/minimal-ontology/0.0.1" ;
terms:issued "2024-07-15" ;
terms:issued "2024-07-20" ;
terms:licence <http://www.gnu.org/licenses/gpl.html> .
<http://www.gnu.org/licenses/gpl.html> rdfs:label "GNU General Public License"
A series of additional ontology tests are run at after the first validation step. These tests check for different soft errors or warnings relating to your ontology file.
The implementation of this test step is based on robot report. The list of checks is a subset of the following list.
A few checks are removed from the list, thus the full list is the following:
Severity Name
WARN annotation_whitespace
ERROR deprecated_boolean_datatype
ERROR deprecated_class_reference
ERROR deprecated_property_reference
ERROR duplicate_label
WARN equivalent_pair
WARN equivalent_class_axiom_no_genus
ERROR illegal_use_of_built_in_vocabulary
WARN invalid_xref
ERROR label_formatting
ERROR label_whitespace
ERROR missing_label
WARN missing_obsolete_label
ERROR missing_ontology_description
ERROR missing_ontology_license
ERROR missing_ontology_title
INFO missing_superclass
ERROR misused_obsolete_label
ERROR misused_replaced_by
WARN multiple_equivalent_classes
ERROR multiple_equivalent_class_definitions
ERROR multiple_labels
WARN invalid_entity_uri
The result of these tests are :
location
field).An example task response with reportResult is given below:
{
"uploaderEmail" : "admin",
"createdAt" : "2024-07-15T18:01:36.702671033",
"taskType" : "ADD_ONTOLOGY",
"infoURL" : "http://localhost:8000/api/v2/tasks/1417e88b",
"endedAt" : "2024-07-15T18:01:39.664284564",
"rootDir" : "thingin_temp_dir_0907b251",
"id" : "1417e88b",
"type" : "task",
"ontologyOrigin" : "unknown",
"ontologies" : [ "http://localhost:8000/api/v2/ontologies/16e70fc4-7e8e33ff" ],
"reportResult" : [ {
"level" : "ERROR",
"violations" : [ {
"missing_ontology_license" : [ {
"subject" : "http://www.orange.org/minimal-ontology"
} ]
} ]
}, {
"level" : "WARN"
}, {
"level" : "INFO"
} ],
"status" : "COMPLETED"
}
The tests result are currently not compatible with files outside of OWL ontologies (e.g. SKOS, RDFS).
The requirements for an ontology update has additional requirements, to help disambiguate the different versions.
Additional annotations are required:
This means that as long as you do not manage the ontology version within the file, you can update your ontology with little care, although it is AGAINST recommendations. We highly recommend to keep your ontology metadata tidy and as exhaustive as possible, and update it systematically.
For RDFS schemas, there is no additional constraints compared to the initial file:
For SKOS, it is required to include your SKOS vocabulary annotations in a dedicated individual, preferably at the top of your file as shown below.
If this is individual is missing or annotations are not directly attached to an indiviual with the same IRI as the default prefix, the annotation will be ignored, thus preventing their display in the metadata
and making further updates less practicle (similarly to the RDFS schemas updates).
<https:www.example.org/skos>
a skos:ConceptScheme;
# --- Metadata ---
dcterms:creator "Richard Richardson" ;
dcterms:license <https://spdx.org/licenses/BSD-4-Clause> ;
dcterms:title "The SKOS prime example" ;
dcterms:type <http://purl.org/nkos/terms/thesaurus> ;
dcterms:issued "2023-01-01"^^xsd:date ;
dcterms:modified "2024-01-01"^^xsd:date .
There are no rules regarding your ontology axiomatisation to be accepted by the service.
However we recommend to follow good practices in ontology design, for instance refer to this article, or this paper.
Additionally, the test report can give you some hints on basic axiomatization improvements you can make to your ontology.