2.1 Creating the Classes
1. First, start Protege and start a new ontology.
2. Enter an Ontology IRI as shown in the figure below.
3. Save it as university.owl
4. In the Classes tab, create class "Person" as the subclass of "Thing".
5. Then, inside the "Person" class, create "Lecturer" and "Student" as subclasses.
6. Create subclass "Module" under "Thing".
7. Create "CSModule" and "MathModule" as subclasses of "Module".
8. The Classes should look like this.
2.2 Creating the Object Properties
1. Switch to Object Properties tab first.
2. Create a new object property "studies".
3. Then, select "Student" as it's domain and "Module" as it's range.
4. Create another new object properties "teaches".
5. Then, select "Lecturer" as it's domain and "Module" as it's range.
2.3 Adding Data Properties
1. Switch to "Data Properties" tab.
2. Create new data property "first_name" and select "Person" as it's domain and "string" as it's range.
3. Create new data property "last_name" and select "Person" as it's domain and "string" as it's range.
5. Create new data property "studentID" and select "Lecturer" as it's domain and "integer" as it's range.
6. The Data Properties will look like this.
2.4 Adding Some Individuals (Instances)
1. Switch to the individual tab
2. Create new individuals "CS101" and "CS103" and choose "CSModule" for their type.
3. Create new individuals "M201" and "M204" and choose "MathModule" type for each of them.
4. Create new individuals "Lecturer1" and "Lecturer2" and choose "Lecturer" type for each of them.
5. Click on "Lecturer1" and:
- add Data property assertions: first name of type string and value Laris
- add another Data property assertions: last name of type string and value Soldatova
- add another Data property assertions: staffID of type integer and value 417686
6. Click on Lecturer2 and add Object property assertions: teaches CS103 and teaches M201
7. Create new individuals Student1, Student2 and Student3. Click on Types and choose Student for each of them.
8. Click on Student1 and add Object property assertions: studies M204, studies M201 and studies CS101.
9. Click on Student1 and:
- add Data property assertions: first name of type string and value Josef
- add another Data property assertions: last name of type string and value Baker
- add another Data property assertions: studentID of type integer and value 226814
10. Click on Student2 and add Object property assertions: studies M204.
11. Click on Student3 and add Object property assertions: studies M201 and
studies CS103.
12. Individual will look like figure above.
2.5 Saving/Publishing the Ontology
1. Save it in local file as university.owl
2. Publishing it online.
No comments:
Post a Comment