Skip to content

Mini University Demo Project

julijaovcinnikova edited this page Mar 5, 2026 · 12 revisions

This repository contains the Mini University demo ontology used to illustrate the updated web-based OWLGrEd visual notation and tooling for OWL 2 ontology management.

Graphical OWL ontology (Mini University)

The Mini University ontology is represented using a UML-inspired graphical notation for OWL 2. Screenshot 2026-03-02 084836

OWL export in Turtle

@prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
@prefix owl:  <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix :     <http://lumii.lv/ontologies/Mini_University.owl#> .

: a owl:Ontology .

:AcademicProgram
    a owl:Class ;
    rdfs:subClassOf [
        a owl:Restriction ;
        owl:onProperty :programName ;
        owl:onDataRange xsd:string ;
        owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger
    ] .

:acadTitle
    a owl:DatatypeProperty ;
    rdfs:domain :FacultyLevel ;
    rdfs:range xsd:string .

:Alice
    a :Student, owl:NamedIndividual ;
    :takes :ComputerScience .

:Assistant
    a owl:Class ;
    rdfs:subClassOf :Teacher ;
    owl:disjointWith :Professor ;
    owl:equivalentClass [
        a owl:Class ;
        owl:intersectionOf (
            :Teacher
            [
                a owl:Restriction ;
                owl:onProperty :facultyLevel ;
                owl:hasValue :Level_Assistant
            ]
        )
    ] .

:completed
    a owl:ObjectProperty ;
    rdfs:comment "Completed courses are finished taken courses" ;
    rdfs:domain :Student ;
    rdfs:range :Course ;
    rdfs:subPropertyOf :takes .

:ComputerScience
    a :MandatoryCourse, owl:NamedIndividual .

:Course
    a owl:Class ;
    owl:equivalentClass [
        owl:unionOf ( :MandatoryCourse :OptionalCourse )
    ] .

:courseCode
    a owl:DatatypeProperty ;
    rdfs:domain :Course ;
    rdfs:range xsd:string .

:courseCredit
    a owl:DatatypeProperty ;
    rdfs:domain :Course ;
    rdfs:range [
        a rdfs:Datatype ;
        owl:onDatatype xsd:integer ;
        owl:withRestrictions ( [ xsd:minExclusive 0 ] )
    ] .

:courseName
    a owl:DatatypeProperty ;
    rdfs:domain :Course ;
    rdfs:range xsd:string .

:enrolled
    a owl:ObjectProperty ;
    rdfs:domain :Student ;
    rdfs:range :AcademicProgram .

:facultyLevel
    a owl:ObjectProperty ;
    rdfs:domain :Teacher ;
    rdfs:range :FacultyLevel .

:FacultyLevel
    a owl:Class .

:includes
    a owl:ObjectProperty ;
    rdfs:domain :AcademicProgram ;
    rdfs:range :Course .

:isTaughtBy
    a owl:ObjectProperty ;
    rdfs:domain :Course ;
    rdfs:range :Teacher ;
    owl:inverseOf :teaches .

:MandatoryCourse
    a owl:Class ;
    rdfs:comment "Mandatory courses are taught by only professors" ;
    rdfs:subClassOf
        :Course ,
        [
            a owl:Restriction ;
            owl:onProperty :isTaughtBy ;
            owl:allValuesFrom :Professor
        ] ;
    owl:disjointWith :OptionalCourse .

:nationality
    a owl:ObjectProperty ;
    rdfs:domain foaf:Person ;
    rdfs:range :Nationality .

:Nationality
    a owl:Class .

:nCode
    a owl:DatatypeProperty ;
    rdfs:domain :Nationality ;
    rdfs:range xsd:string .

:nValue
    a owl:DatatypeProperty ;
    rdfs:domain :Nationality ;
    rdfs:range xsd:string .

:OptionalCourse
    a owl:Class ;
    rdfs:subClassOf :Course .

:personID
    a owl:DatatypeProperty ;
    rdfs:domain foaf:Person ;
    rdfs:range xsd:string .

:personName
    a owl:DatatypeProperty ;
    rdfs:domain foaf:Person ;
    rdfs:range xsd:string .

:Professor
    a owl:Class ;
    rdfs:subClassOf :Teacher ;
    owl:equivalentClass [
        a owl:Class ;
        owl:intersectionOf (
            :Teacher
            [
                a owl:Restriction ;
                owl:onProperty :facultyLevel ;
                owl:hasValue :Level_Professor
            ]
        )
    ] .

:programName
    a owl:DatatypeProperty ;
    rdfs:domain :AcademicProgram ;
    rdfs:range xsd:string .

:salary
    a owl:DatatypeProperty ;
    rdfs:domain :Teacher ;
    rdfs:range xsd:decimal .

:Student
    a owl:Class ;
    rdfs:subClassOf
        foaf:Person ,
        [
            a owl:Restriction ;
            owl:onProperty :enrolled ;
            owl:onClass :AcademicProgram ;
            owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger
        ] ,
        [
            a owl:Restriction ;
            owl:onProperty :takes ;
            owl:someValuesFrom :Course
        ] .

:studentName
    a owl:DatatypeProperty ;
    rdfs:domain :Student ;
    rdfs:range xsd:string ;
    rdfs:subPropertyOf :personName .

:studentNumber
    a owl:DatatypeProperty ;
    rdfs:domain :Student ;
    rdfs:range xsd:string .

:takes
    a owl:ObjectProperty ;
    rdfs:domain :Student ;
    rdfs:range :Course ;
    owl:propertyDisjointWith :teaches .

:Teacher
    a owl:Class ;
    rdfs:subClassOf foaf:Person .

:teacherName
    a owl:DatatypeProperty ;
    rdfs:domain :Teacher ;
    rdfs:range xsd:string ;
    rdfs:subPropertyOf :personName .

:teaches
    a owl:ObjectProperty ;
    rdfs:domain :Teacher ;
    rdfs:range :Course ;
    owl:propertyDisjointWith :takes .

foaf:Person
    a owl:Class ;
    rdfs:subClassOf [
        a owl:Restriction ;
        owl:onProperty :nationality ;
        owl:onClass :Nationality ;
        owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger
    ] ;
    owl:hasKey ( :personID ) .

Graphical example of property qualifiers

Contextual metadata attached to a property axiom or property assertion, such as temporal validity, provenance, or confidence.

  • qualifiers are encoded using OWL 2 annotation properties,
  • the qualifier-to-property link is represented via an AnnotationAssertion that connects the qualifier annotation property to the qualified property,
  • additional nested annotations can further describe the qualifier (for example expected value type via rdfs:range or multiplicity constraints),
  • once defined, the same qualifier annotation properties can be reused to annotate instance-level assertions.
Screenshot 2026-03-02 085842

Clone this wiki locally