Skip to main content

Ontology properties used by Model-Prime

Although the Web Ontology Language (OWL) allows arbitrary property annotations for classes, there are only a few properties that have any significance within the Model-Prime platform. They are the following:

  • ID The Model-Prime ID of a class is a shortened version of the Internationalized Resource Identifier (IRI) used within OWL.
  • Label (http://www.w3.org/2000/01/rdf-schema#label): used to specify one or more human-readable labels for a class.
  • Subclass (http://www.w3.org/2000/01/rdf-schema#subClassOf): used to specify the subclass ('is-a') relationships between classes.
  • Comment (http://www.w3.org/2000/01/rdf-schema#comment): used to add a descriptive comment for a class.

More information on each of these properties follows below.

ID

The IRIs used within the Resource Description Framework (RDF) are fully qualified resource identifiers, usually non-human-readable. For example a typical class IRI generated by WebProtégé is http://webprotege.stanford.edu/R7M6ZKvZEU0mzYDBF8gu9Ip. On upload, Model-Prime truncates the IRI to whatever follows the last slash or colon: in this case R7M6ZKvZEU0mzYDBF8gu9Ip becomes the ID of that class. This is done to reduce redundancy and also to signify that Model-Prime's copy of this resource is not a website, and is no longer "owned" by Stanford or another entity.

Note that that the class ID only needs to be unique within its particular ontology, not globally unique.

ID of the ontology

An ontology file must define exactly one subject of type Ontology, as in the following OWL sentence:

<urn:webprotege:ontology:6cba1bb0-020a-4985-9cd3-7672846c561f> rdf:type owl:Ontology .

Ontology editors should generate this line automatically. As with class IDs, Model-Prime truncates the IRI to whatever follows the last colon or slash -- 6cba1bb0-020a-4985-9cd3-7672846c561f in the above example.
If two ontology IRIs (in your organization) become identical after truncation, then they have the same ID and Model-Prime assumes they specify the same ontology.

Root class of the ontology

When an ontology file is uploaded, Model-Prime automatically generates a root class for the ontology and defines each top-level class as a subclass of the root. The ID of the root class is equal to the ID of the ontology. In this way, ontologies are in one-to-one correspondence with their root classes.

IMPORTANT Adding a label to the root class is strongly recommended, as it is the only way to give your ontology a human-readable name in addition to an ID. In order to apply a label, comment or other property annotation to the root class, it must be applied either to the unique subject of type http://www.w3.org/2002/07/owl#Ontology (often abbreviated as owl:Ontology as above), or to the subject http://www.w3.org/2002/07/owl#Thing (often abbreviated as owl:Thing). In WebProtégé, this can be accomplished by adding a label to the root node, which is always displayed as owl:Thing.

Annotating the root class in WebProtégé:

Root Class Annotation

Label

A "label" is just a human-readable string representing the name of a class. A class can have zero or more labels, any of which can be used in place of the ID to refer to that class -- for example when using the search feature.
Additionally, each class will be displayed according to its primary label, which is the one that appears first in the ontology file.

When using WebProtégé, new classes are created according to their primary label, with a unique ID being automatically generated. The label -- but not the ID -- can be changed after the fact, and labels can be added or removed at will. Model-Prime supports all such modifications to an ontology definition.

Labels must be 1 to 255 characters in length, and they must consist of upper or lowercase letters, numerals, spaces, hyphens, and underscores. The first character must be a letter or an underscore. Note also that matching of strings to labels within the API is case-insensitive and treats the space, hyphen, and underscore characters as interchangeable.

For this reason, it is required that all class labels in an ontology be distinct from one another (after converting to lower_snake_case), and also distinct from all class IDs. For example, you cannot have a class with the label Fire-Hydrant and another with the label FIRE HYDRANT.

If this requirement is not met, you will not be able to upload the ontology file. The only exception is that a class is allowed to have a label equal or equivalent to its own ID.

Subclass

Although OWL allows arbitrary subclass relationships, in Model-Prime, subclass relationships are required to be acyclic. That is, they must form a directed acyclic graph (DAG).

For example, a class cannot be explicitly annotated as a subclass of itself (although it is implicitly understood to be the case that every C is a C). Nor can classes A and B be subclasses of each other. This would mean that they are equivalent classes, which is not allowed because it would surely lead to equivalent classes being ID-ed inconsistently. Instead, use a single class with multiple labels.

Comment

Optionally, you can use http://www.w3.org/2000/01/rdf-schema#comment (a.k.a. rdfs:comment) to provide short descriptions of your classes. This comment is displayed in the ontology API, but it serves no other purpose. It should not be used as documentation -- write at most a sentence or two which describes the class and distinguishes it from other classes.