![]() |
| Previous Top Next |
Declaring AllDifferent Instances |
In the previous section, you created three instances of the XMLSpy class: XMLSpyEnterprise, XMLSpyProfessional, and XMLSpyHome. These are the three editions of the XMLSpy product. You specified the difference in the editions by using the property hasEdition and assigning it three different object values, namely the instances Enterprise, Professional, and Home, respectively. This, however, does not ensure that the three URIrefs prod:XMLSpyEnterprise, prod:XMLSpyProfessional, and prod:XMLSpyHome are indeed different, since two of them, or even all three, could actually be referring to a single individual (or resource). That these are three different URIrefs must be explicitly stated, and the AllDifferent construct is used to state the pairwise difference of instances in a collection.
In this section of the tutorial, you create an AllDifferent collection object and collect within it all the instances that must be pairwise different. Do this as follows:
| 1. | In the allDifferent tab of RDF/OWL View, click the Add New button and select allDifferent. Name the newly created allDifferent item prod:XMLSpyEditions. |
| 2. | Click the Detail View button of the prod:XMLSpyEditions entry to switch to Detail View (screenshot below). |

| 3. | Right-click the owl:DistinctMembers box, and select Add Instance. |
| 4. | Click the down arrow in the newly created instance box, and select prod:XMLSpyEnterprise (screenshot below). |

The XMLSpyEnterprise instance is selected as a distinct member of the XMLSpyEditions AllDifferent collection.
| 5. | Add the XMLSpyProfessional and XMLSpyHome instances to the collection (by right-clicking the owl:DistinctMembers box and selecting Add Instance, then selecting the respective instances). When you're done, the Detail View will look something like this: |

| 6. | Run a semantic check to confirm the validity (correct syntax and partial consistency) of the ontology, and then save the file. |
| Note: | Alternatively, you can specify that a set of instances are mutually different by selecting those instances in the Overview of RDF/OWL View, right-clicking, and selecting the Make Mutually Different command. |
That's it!
You have successfully completed the OWL Lite tutorial. In the course of this tutorial you have learned how to build an OWL Lite ontology using SemanticWorks and have become familiar with the interface, features, and mechanisms of SemanticWorks.
|