From: Matthew H. <mat...@cs...> - 2007-08-03 16:20:35
|
On 3 Aug 2007, at 06:30, Cody Burleson wrote: >> I am wondering if my assumption is correct. I am creating a class >> at the root of my ontology (not the child of anything particular). >> To create such a case, I assume I must make the class a child of >> OWL Thing. In my code experiment (shown below), it appears to work. >> But I wonder if it is proper. Do we have to make all root classes a >> child of OWL Thing? Or is this unnecessary for some reason? > >>> It's not necessary. Say you just wanted to set the range of >>> property >>> p to be class A. You could just get instances of p and A from the >>> OWLDataFactory and then just create a domain axiom Domain(p A) and >>> add this to the ontology - there is no need to have made A a >>> subclass >>> of Thing. > > I don't quite understand what is a domain axiom? You provided the > example: > > Domain(p A) > > Are you being very general, Yes, I'm being general > or is there supposed to be a java class called > "Domain"? There is nothing in the API that I can find like this. In the API, if p is an object property then you can use OWLObjectPropertyDomainAxiom (OWLDataPropertyDomainAxiom if p is a data property) for specifying the domain of p. Domain basically says that if individual 'a' has a relationship (property value) along p to some other individual (or constant if p is a data property) then it will be inferred that 'a' is a member of the classes in the domain of p. For example, if we have a property hasParent and we say that the domain of hasParent is Person, then if we have Matthew hasParent Peter (where Matthew and Peter are individuals) then Matthew will be inferred to be an instance of Person. > What would be really good is some variant examples as simple (but > different > than) > Example 2. o.k. I'll see what I can do. > I know that if I can just get through some of these basics, I will > be "over > the > hump" and I will start to understand. But I am stuck at the very > early stage > of the > learning curve. No worries. (The learning curve is fairly steep :) ) Matthew |