Introduction Interface 19 Error 划△回回X OThis ontology is well-formed. B9doc: MLSpyEnterpriseUseMManualDEPDE is not a membe ? The hasvalue constraint for property de: format does not ?The individual doc: XMLSpyEnterpriseUserManualDEPD The individual doc: XMLSpyEnterpriseUserManualDEPD 旧回 doc: XMLSpyEnterpriseUserManualENPDE is not a membe ty dc: format does 2The individual doc: MLSpyEnterpriseUserManualENPD 9The individual doc: MLSpyEnterpriseUserManuaIENPD O This ontology does not appear to be consistent ght draw You can also select a message by clicking it. Selecting a message is useful if you wish to save a particular message to the clipboard Copying to clipboard There are three ways in which messages can be copied to the clipboard: (i copy the selected tooltip for that button to be displayed C 2007 A/tova gmb Works 20
© 2007 Altova GmbH Introduction Interface 19 Altova SemanticWorks 2007 You can also select a message by clicking it. Selecting a message is useful if you wish to save a particular message to the clipboard. Copying to clipboard There are three ways in which messages can be copied to the clipboard: (i) copy the selected line; (ii) copy the selected line and its children; and (iii) copy all messages. The corresponding buttons are the fourth, fifth, and sixth from left. Placing the cursor over these buttons causes a tooltip for that button to be displayed
20 Introduction verview of u 3.3 Overview of Usage This section broadly describes how SemanticWorks is to be used to Create and edit ontologies Create and edit rdf documents Creating and editing ontologies When creating or editing ontologies with SemanticWorks, the broad usage procedure is as follows 1. Create a new ontology document or load an existing ontology document into SemanticWorks 2. Edit the document in RDF/oWL View 3. Within SemanticWorks, check document syntax and/or semantics against RDF Schema, OWL Lite, OWL DL, or OWL Full specifications 4. Save the document as a, rdf,, rdfs, or owl file 5. If required, export the document as an N-Triples(. nt)or XML ( xml)file Steps 1, 4, and 5 in the above process are straightforward. In this section, we briefly discuss how ontologies can be edited in RDF/OWL View( Step 2 above)and checked for correct syntax and semantics( Step 3) Editing ontologies in RDF/OWL View Ontologies are best edited in RDF/OWL View. Text View should be used to check the serialization, in XML format, of the ontology graph that was created or edited in RDF/OWL View Additionally, Text View can be used to make minor modifications to the XML serialization so that his suits user preferences. However, most editing should be done in RDF/OWL View since this provides a graphical, intuitive, and fast way to edit ontologies Editing an ontology in RDF/OWL View involves the following processes. There is no strict sequence to be followed, and you will likely find yourself revisiting previous steps and revising various ontology item Declaring namespaces and their prefixes. This is done at the document level (in the URIref Prefixes dialog (Tools I URIref Prefixes )). Declaring namespaces is important because they are used to identify ontology constructs, items from various vocabularies and user-defined resources. The RDF, RDFS, and OWL namespaces are declared by default when a new ontology is created Select the ontology level. You do this using the menu command RDF/OWL I RDF/OWL Level. Selecting the required level is important because: () the choice of constructs made available in the GUI, and (i) the syntax and semantics checks done by SemanticWorks are based on this selection Setting up the ontology header. The ontology header is created at the ontology level and is optional. It is useful when you wish to import one or more ontologies into the current ontology, or when you wish to record a prior version of the ontology. You create a new ontology in the Ontologies tab of Overview, then switch to Detail View and define the ontology using Detail View editing mechanisms Creating new ontology items. Ontology items are classes, properties, instances AllDifferent items, and ontologies Each such item must first be created in the appropriate Overview tab. Only after the relevant items have been created, should you go to the Detail View of an item to either define attributes of the item( e.g. create restrictions for properties), or define relationships with other items(e.g. define an intersection of classes) Defining and editing items in Detail View. Definitions for ontology items are created and @2007 Aitova gmbH
20 Introduction Overview of Usage Altova SemanticWorks 2007 © 2007 Altova GmbH 3.3 Overview of Usage This section broadly describes how SemanticWorks is to be used to: · Create and edit ontologies · Create and edit RDF documents Creating and editing ontologies When creating or editing ontologies with SemanticWorks, the broad usage procedure is as follows: 1. Create a new ontology document or load an existing ontology document into SemanticWorks. 2. Edit the document in RDF/OWL View. 3. Within SemanticWorks, check document syntax and/or semantics against RDF Schema, OWL Lite, OWL DL, or OWL Full specifications. 4. Save the document as a .rdf, .rdfs, or .owl file. 5. If required, export the document as an N-Triples (.nt) or XML (.xml) file. Steps 1, 4, and 5 in the above process are straightforward. In this section, we briefly discuss how ontologies can be edited in RDF/OWL View (Step 2 above) and checked for correct syntax and semantics (Step 3). Editing ontologies in RDF/OWL View Ontologies are best edited in RDF/OWL View. Text View should be used to check the serialization, in XML format, of the ontology graph that was created or edited in RDF/OWL View. Additionally, Text View can be used to make minor modifications to the XML serialization so that this suits user preferences. However, most editing should be done in RDF/OWL View since this provides a graphical, intuitive, and fast way to edit ontologies. Editing an ontology in RDF/OWL View involves the following processes. There is no strict sequence to be followed, and you will likely find yourself revisiting previous steps and revising various ontology items. · Declaring namespaces and their prefixes. This is done at the document level (in the URIref Prefixes dialog (Tools | URIref Prefixes)). Declaring namespaces is important because they are used to identify ontology constructs, items from various vocabularies, and user-defined resources. The RDF, RDFS, and OWL namespaces are declared by default when a new ontology is created. · Select the ontology level. You do this using the menu command RDF/OWL | RDF/OWL Level. Selecting the required level is important because: (i) the choice of constructs made available in the GUI, and (ii) the syntax and semantics checks done by SemanticWorks are based on this selection. · Setting up the ontology header. The ontology header is created at the ontology level and is optional. It is useful when you wish to import one or more ontologies into the current ontology, or when you wish to record a prior version of the ontology. You create a new ontology in the Ontologies tab of Overview, then switch to Detail View and define the ontology using Detail View editing mechanisms. · Creating new ontology items. Ontology items are classes, properties, instances, AllDifferent items, and ontologies. Each such item must first be created in the appropriate Overview tab. Only after the relevant items have been created, should you go to the Detail View of an item to either define attributes of the item (e.g. create restrictions for properties), or define relationships with other items (e.g. define an intersection of classes). · Defining and editing items in Detail View. Definitions for ontology items are created and
Introduction Overview of Usage 21 edited in Detail View by selecting the required properties or relationships from a context menu. SemanticWorks will make only those constructs available that are allowed rding to the ontology level you have selected Checking the syntax and semantics of ontologies When you edit an ontology in RDF/OWL View, what is created is a graph of the ontology. This graph is serialized in ML format-which is what is displayed in Text View. The syntax of DL documents can be checked for correct semantics against the OWL Lite and OWL D OWL specifications. Note, however, that the semantics check in SemanticWorks is a partial consistency check. The significance of this is explained in the descriptions of the commands Show Possible Inconsistencies and semantics Check To check the syntax of ontology documents and the semantics of OWL Lite and OWL DL documents, you do the following Select the required specification against which the ontology is to be checked RDF/OWL I RDF/OWL Level Click the Syntax Check or Semantics Check command(RDF/OWL menu)or button(in the Toolbar) If errors are detected, these are reported in the Errors Window, with each error including a link (or links) to the relevant ontology item(screenshot below) UIn UWL Lite a class name is expected in gwL allValuest rom-statement instead ot blank node 551 gIn OWL Lite a class name is expected in owt allvalues From-statement instead of blank node 656 JIn OWL Lite a class name is expected in gwt all aluesF rom-statement instead of blanklode 661 aIn OWL Lite a class name is expected in owt allvaluesFrom-statement instead of blank node 663 aIn OWL Lite a class name is expected in owt allvalues From-statement instead of blank node 665 gIn OWL Lite a class name is expected in owt al/values From-statement instead of blank node 667 ank node 228 owtmin Cardinality2 gIn ' OWL Lite'the value of 2 must be '0 or1 gIn 'OWL Lite' the value of 2 must be O' or'1 Creating and editing RDF documents In Rdf/oWL view. when the rdf/owl level has been set to rdf resources are listed in the Overview pane of RDF/OWL view. The resources listed here are of two types: those that are made available from an ontology, and( i) those that you create(or that are present in the RDF document you are editing) In order to make resources from an ontology available in the Resources Overview, you do the following 1. Import the namespaces used in the ontolog 2. Declare the namespaces required in the rdF document In the Resources Overview, you create resources as required, and name them. Next, in the Detail View of each resource, you insert predicates, either by entering them or by selecting them from a dropdown list of available resources(which include resources made available from an ontology). The objects of RDF statements can also be inserted either by entering the name of an RDF resource or selecting one from a list of available resources, or by entering a literal value for the object. You can check the syntax of the RDF document at any time C 2007 A/tova gmb Altova S tinWorks 20
© 2007 Altova GmbH Introduction Overview of Usage 21 Altova SemanticWorks 2007 edited in Detail View by selecting the required properties or relationships from a context menu. SemanticWorks will make only those constructs available that are allowed according to the ontology level you have selected. Checking the syntax and semantics of ontologies When you edit an ontology in RDF/OWL View, what is created is a graph of the ontology. This graph is serialized in RDF/XML format—which is what is displayed in Text View. The syntax of this document serialization can be checked for conformance. Additionally, OWL Lite and OWL DL documents can be checked for correct semantics against the OWL Lite and OWL DL specifications. Note, however, that the semantics check in SemanticWorks is a partial consistency check. The significance of this is explained in the descriptions of the commands Show Possible Inconsistencies and Semantics Check. To check the syntax of ontology documents and the semantics of OWL Lite and OWL DL documents, you do the following: · Select the required specification against which the ontology is to be checked ( RDF/OWL | RDF/OWL Level). · Click the Syntax Check or Semantics Check command (RDF/OWL menu) or button (in the Toolbar). If errors are detected, these are reported in the Errors Window, with each error including a link (or links) to the relevant ontology item (screenshot below). Creating and editing RDF documents In RDF/OWL View, when the RDF/OWL level has been set to RDF, resources are listed in the Overview pane of RDF/OWL View. The resources listed here are of two types: (i) those that are made available from an ontology, and (ii) those that you create (or that are present in the RDF document you are editing). In order to make resources from an ontology available in the Resources Overview, you do the following: 1. Import the namespaces used in the ontology. 2. Declare the namespaces required in the RDF document. In the Resources Overview, you create resources as required, and name them. Next, in the Detail View of each resource, you insert predicates, either by entering them or by selecting them from a dropdown list of available resources (which include resources made available from an ontology). The objects of RDF statements can also be inserted either by entering the name of an RDF resource or selecting one from a list of available resources, or by entering a literal value for the object. You can check the syntax of the RDF document at any time
Introduction Overview of Usage See the RDF Document tutorial for a detailed description of the steps listed above Alternatively, you can create and edit RDF documents directly in Text View, using RDF /XML or N-Triples notation @2007 Aitova gmbH
22 Introduction Overview of Usage Altova SemanticWorks 2007 © 2007 Altova GmbH See the RDF Document tutorial for a detailed description of the steps listed above. Alternatively, you can create and edit RDF documents directly in Text View, using RDF/XML or N-Triples notation
Chapter 4 Tutorial
Chapter 4 Tutorial