Tutorial Tutorial In this tutorial, you will do the following Create an OWL Lite ontology from scratch Create an OWL DL ontology from scratch Create a set of RDF resources based on the oWL DL ontology; Create an rdF document that uses dublin Core vocabulary to describe metadata associated with document-type resources The OWL Lite and oWL DL ontologies you create are small ontologies that take you through the various features of SemanticWorks. After you have finished creating the ontologies, you will have learned how to use all the features of SemanticWorks you need to quickly construct any ype of ontology. The RDF-document-creation part of the tutorial shows you how you can use the resources of an ontology to create and define RDF resources, and includes a tutorial that shows how to create an RDF document that uses the Dublin Core vocabulary Doing the tutorial The OWL Lite and OWL DL parts of the tutorial start from scratch, so you do not need any file to start with and can start on these parts of the tutorial as soon as you have successfully installed SemanticWorks. The files created in these two parts of the tutorial are delivered in the Examples folder of your SemanticWorks application folder DL part of the tutorial before you do the part in which you create an rof o The OWL DL ontology used to create an RDF document based on an OWL DL ontology is the OWL DL ontology you will create in the OWL DL part of the tutorial It is therefore better if you go document based on this ontology. However, since the required ontology is available in the Examples folder of your SemanticWorks application folder, you can start with the RDF document creation part if you like. The tutorial part for creating an RDF document based on the Dublin Core starts from scratch, so, again, you can start with this part right away It is best to do the tutorial in sequence, that is, starting with the creation of an OWL Lite ontology and ending with the creation of an RDF document that uses the Dublin Core vocabulary. The reason for this is that basic usage mechanisms and concepts are explained in detail and incrementally as you proceed in sequence. Before starting this tutorial, we also suggest that you read through the Interface section in the Introduction so as to familiarize yourself with the GUI and the terms used to describe it. Also, note that the screenshots in this tutorial draw the graphs in Detail View horizontally, from left to right; this is a setting made in the Options dialog About the ontologies and naming conventions The OWL Lite ontology you will create is used to describe Altova products, while the OWL DL ontology describes Altova documents. These ontologies have deliberately been kept simple and small, so that you can concentrate on the usage mechanisms and become familiar with SemanticWorks, instead of being overwhelmed by the complexity of the ontologies In this tutorial we use the following naming conventions: Class names and instance re capitalized (for example, Documents). If a class name consists of more than one word, the words are run together with each word capitalized (for example, ProductManual) Property names start with a lowercase alphabet( for example, source). If a property name consists of more than one word, the words are run together with words subsequent to the first capitalized (responsibilityof) @2007 Aitova gmbH
24 Tutorial Altova SemanticWorks 2007 © 2007 Altova GmbH 4 Tutorial In this tutorial, you will do the following: · Create an OWL Lite ontology from scratch; · Create an OWL DL ontology from scratch; · Create a set of RDF resources based on the OWL DL ontology; · Create an RDF document that uses Dublin Core vocabulary to describe metadata associated with document-type resources. The OWL Lite and OWL DL ontologies you create are small ontologies that take you through the various features of SemanticWorks. After you have finished creating the ontologies, you will have learned how to use all the features of SemanticWorks you need to quickly construct any type of ontology. The RDF-document-creation part of the tutorial shows you how you can use the resources of an ontology to create and define RDF resources, and includes a tutorial that shows how to create an RDF document that uses the Dublin Core vocabulary. Doing the tutorial The OWL Lite and OWL DL parts of the tutorial start from scratch, so you do not need any file to start with and can start on these parts of the tutorial as soon as you have successfully installed SemanticWorks. The files created in these two parts of the tutorial are delivered in the Examples folder of your SemanticWorks application folder. The OWL DL ontology used to create an RDF document based on an OWL DL ontology is the OWL DL ontology you will create in the OWL DL part of the tutorial It is therefore better if you go through the OWL DL part of the tutorial before you do the part in which you create an RDF document based on this ontology. However, since the required ontology is available in the Examples folder of your SemanticWorks application folder, you can start with the RDF document creation part if you like. The tutorial part for creating an RDF document based on the Dublin Core starts from scratch, so, again, you can start with this part right away. It is best to do the tutorial in sequence, that is, starting with the creation of an OWL Lite ontology and ending with the creation of an RDF document that uses the Dublin Core vocabulary. The reason for this is that basic usage mechanisms and concepts are explained in detail and incrementally as you proceed in sequence. Before starting this tutorial, we also suggest that you read through the Interface section in the Introduction so as to familiarize yourself with the GUI and the terms used to describe it. Also, note that the screenshots in this tutorial draw the graphs in Detail View horizontally, from left to right; this is a setting made in the Options dialog. About the ontologies and naming conventions The OWL Lite ontology you will create is used to describe Altova products, while the OWL DL ontology describes Altova documents. These ontologies have deliberately been kept simple and small, so that you can concentrate on the usage mechanisms and become familiar with SemanticWorks, instead of being overwhelmed by the complexity of the ontologies. In this tutorial we use the following naming conventions: · Class names and instance names are capitalized (for example, Documents). If a class name consists of more than one word, the words are run together with each word capitalized (for example, ProductManual). · Property names start with a lowercase alphabet (for example, source). If a property name consists of more than one word, the words are run together with words subsequent to the first capitalized (responsibilityOf)
Tutorial Note about namespaces The namespaces used for the AltovaProduct and AltovaDocument ontologies are fictitious there are no ontologies or any other resource at the locations specified by the URIs in these namespaces. C 2007 A/tova gmb Works 20
© 2007 Altova GmbH Tutorial 25 Altova SemanticWorks 2007 Note about namespaces The namespaces used for the AltovaProduct and AltovaDocument ontologies are fictitious; there are no ontologies or any other resource at the locations specified by the URIs in these namespaces
Tutorial OWL Lite Ontology 4.1 OWL Lite Ontology The OWL Lite ontology you will create describes Altova products. It consists of the following Creating a New Ontology: Shows how to create a new ontology document, select an ontology level, and save the ontology document Declaring Namespaces: Explores the Text View and explains what namespaces are AltovaProducts vocabulary and for XML Schema datatype paces for the required in your ontology document. You will declare names ting Classes: Describes how classes are created in RDF/OWL View, and explore L View and Text View Explains how to delete and re-create classes, and shows how the syntax and semantics of the ontology can be checked in SemanticWorks Creating the Class Hierarchy: Explains how classes are created as subclasses of another class, and thus how a hierarchy of classes can be built Describes how the Detail View of rdf/owl view works Defining Properties: Shows how to create OWL properties-both object and datatype- and how to define the domain, range, and cardinality of properties. Also shows how relationships between classes and properties can be viewed in SemanticWorks Declaring Instances: Describes how to create instances, how to define these as instances of a particular class, and how to assign a literal value to an instance Concludes by showing how created instances can be viewed in the Classes Overview Declaring AllDifferent Instances: Explains how to collect instances in a group and define each of them as being pairwise different from all other members of the group The OWL Lite ontology that is the end result of this tutorial part is delivered in the SemanticWorks package as the file AltovaProducts. rdf; it is located in the Examples folder in the SemanticWorks application folder @2007 Aitova gmbH
26 Tutorial OWL Lite Ontology Altova SemanticWorks 2007 © 2007 Altova GmbH 4.1 OWL Lite Ontology The OWL Lite ontology you will create describes Altova products. It consists of the following sections: · Creating a New Ontology: Shows how to create a new ontology document, select an ontology level, and save the ontology document. · Declaring Namespaces: Explores the Text View and explains what namespaces are required in your ontology document. You will declare namespaces for the AltovaProducts vocabulary and for XML Schema datatypes. · Creating Classes: Describes how classes are created in RDF/OWL View, and explores RDF/OWL View and Text View. Explains how to delete and re-create classes, and shows how the syntax and semantics of the ontology can be checked in SemanticWorks. · Creating the Class Hierarchy: Explains how classes are created as subclasses of another class, and thus how a hierarchy of classes can be built. Describes how the Detail View of RDF/OWL View works. · Defining Properties: Shows how to create OWL properties—both object and datatype— and how to define the domain, range, and cardinality of properties. Also shows how relationships between classes and properties can be viewed in SemanticWorks. · Declaring Instances: Describes how to create instances, how to define these as instances of a particular class, and how to assign a literal value to an instance. Concludes by showing how created instances can be viewed in the Classes Overview. · Declaring AllDifferent Instances: Explains how to collect instances in a group and define each of them as being pairwise different from all other members of the group. The OWL Lite ontology that is the end result of this tutorial part is delivered in the SemanticWorks package as the file AltovaProducts.rdf; it is located in the Examples folder in the SemanticWorks application folder
Tutorial 4.1.1 Creating a New Ontology In this section, you will learn how to create a new ontology document in SemanticWorks. You will open a blank document in SemanticWorks, select an ontology compliance level (OWL Lite) and Creating a new ontology document in SemanticWorks To create a new ontology document in SemanticWorks, do the following 1. Start SemanticWorks by clicking the SemanticWorks shortcut 2 in the Quick Launch tray or via the Start I All Programs menu item. SemanticWorks starts. The application window looks something like this emanticworks File View Tools Help 岛|= v X Errors CAP NUM SCRL Notice that there are three windows: the Main Window,(i) the Overview Window: and (ii) the Errors Window 2. If the windows are not arranged as shown in the screenshot above, try arranging it in his way. Do this by dragging the title bar of the Overview Window and dropping it on the left-pointing arrow that appears in the Errors Window. The Errors Window itself should be located at the bottom of the application window(down-pointing arrow of outer circle arrows) 3. Click the New icon in the toolbar (or File New or ctrl+n to open a blank document in SemanticWorks The main Window will now look like this C 2007 A/tova gmb Altova S Works 20
© 2007 Altova GmbH Tutorial OWL Lite Ontology 27 Altova SemanticWorks 2007 4.1.1 Creating a New Ontology In this section, you will learn how to create a new ontology document in SemanticWorks. You will open a blank document in SemanticWorks, select an ontology compliance level (OWL Lite), and save the document, while briefly exploring the SemanticWorks interface. Creating a new ontology document in SemanticWorks To create a new ontology document in SemanticWorks, do the following: 1. Start SemanticWorks by clicking the SemanticWorks shortcut in the Quick Launch tray or via the Start | All Programs menu item. SemanticWorks starts. The application window looks something like this. Notice that there are three windows: (i) the Main Window; (ii) the Overview Window; and (iii) the Errors Window. 2. If the windows are not arranged as shown in the screenshot above, try arranging it in this way. Do this by dragging the title bar of the Overview Window and dropping it on the left-pointing arrow that appears in the Errors Window. The Errors Window itself should be located at the bottom of the application window (down-pointing arrow of outer circle arrows). 3. Click the New icon in the toolbar (or File | New or Ctrl+N) to open a blank document in SemanticWorks. The Main Window will now look like this
8 Tutorial OWL Lite Ontology Classes Properties I Instances allDifferent Ontologies I Instances for Class ClassPropertie Text RDF/OW/L Notice that there are five tabs at the top of the window and that the classes tab is elected. These five tabs organize the ontology information in five categories, thus providing an overview of ontology information. We refer to this view as the ontology Overview(also called Overview for short; it should not be confused with the Overview Window). Further, notice that a pane containing subsidiary categories for the selected Overview category(currently, the Classes category)is displayed below the main category. With the Classes tab selected, the subsidiary pane displays the instances and properties of the selected class Selecting the language level of the ontology The ontology you will create in this part of the tutorial will use features of the OWL Lite sublanguage. SemanticWorks checks ontologies according to the language level selected by the user, and also makes available constructors specific to the selected ontology language. It is herefore best to select the required language at the outset. To select the OWL Lite sublanguage, do the following 1. In the RDF/OWL Level combo box in the toolbar, click the arrowhead to display the RDF/OWL Level to display a submenu of language levels/ elect RDF/OWL I dropdown list of options(screenshot below).(Alternatively, s asemanticWorks-[Untitled1 Euy File Edit yiew RDF/OWL Iools Window Help D哆副|影wF山 RDF ①·只旦 OWL Fu‖ 2. Select oWL Lite from the dropdown list. Notice that as soon as the specification level is selected, a syntax check is run on the document, and the message This ontology is well-formed is displayed in the Errors @2007 Aitova gmbH
28 Tutorial OWL Lite Ontology Altova SemanticWorks 2007 © 2007 Altova GmbH Notice that there are five tabs at the top of the window and that the Classes tab is selected. These five tabs organize the ontology information in five categories, thus providing an overview of ontology information. We refer to this view as the Ontology Overview (also called Overview for short; it should not be confused with the Overview Window). Further, notice that a pane containing subsidiary categories for the selected Overview category (currently, the Classes category) is displayed below the main category. With the Classes tab selected, the subsidiary pane displays the instances and properties of the selected class. Selecting the language level of the ontology The ontology you will create in this part of the tutorial will use features of the OWL Lite sublanguage. SemanticWorks checks ontologies according to the language level selected by the user, and also makes available constructors specific to the selected ontology language. It is therefore best to select the required language at the outset. To select the OWL Lite sublanguage, do the following: 1. In the RDF/OWL Level combo box in the toolbar, click the arrowhead to display the dropdown list of options (screenshot below). (Alternatively, select RDF/OWL | RDF/OWL Level to display a submenu of language levels.) 2. Select OWL Lite from the dropdown list. Notice that as soon as the specification level is selected, a syntax check is run on the document, and the message This ontology is well-formed is displayed in the Errors