www.altova.com
Previous  Top  Next

Creating the Classes


In the document ontology, which makes use of the Altova Document vocabulary, we wish to create the following basic class hierarchy:

 

Document

|

|___PrintManual

|

|___WebPage

       |

       |___EnglishWebPage

       |

       |___GermanWebPage

       

Languages

 

OutputFormats

 

 

Creating the classes

To start with you will create the seven classes shown in the hierarchy above in the Classes Overview. The procedure for creating each class is as follows:

 

1.Click the Add New button in the Classes Overview to create an entry for the new class (screenshot below).

 

ss_tut_add_new_class

 

2.Type in the name of each class, using the doc: prefix for each. For example, doc:Document.

 

After you have finished creating these seven classes, the Classes Overview should look something like this:

 

ss_tut_odl_classes_oview_1

 

Check the validity of the document (correct syntax and partial consistency) by clicking the ic_validate icon (RDF/OWL | Semantics Check). You should get messages saying the document is both well-formed and partially consistent.

 

 

Defining the class hierarchy for documents

Start by defining the class PrintManual as a subclass of the class Document. Do this as follows:

 

1.In the Classes Overview, click the Detail View button of the PrintManual class.
2.In the Detail View of PrintManual, right-click the PrintManual box, and select Add subClassOf.
3.Right-click the subClassOf connector box and select Add Class.
4.In the newly added class box, click the down arrow, and, from the dropdown list, select doc:Document.

 

When you are done, the Detail View of the PrintManual class will look like this:

 

ss_tut_odl_printmanual

 

Now create the following classes as subclasses using the method described above:

 

WebPage as a subclass of Document.
EnglishWebPage as a subclass of WebPage.
GermanWebPage as a subclass of WebPage.

 

You have created a hierarchy for documents involving five of the seven classes you created. The other two classes (Languages and OutputFormats) are not directly involved in this hierarchy, and their definition will be described in the next section.

 


Previous  Top  Next

© 2008 Altova