Aarthi, a Class is a concept, an idea, or a blueprint of an object. (e.g. Employee) ----- an Employee is a concept which has properties like for example, Name, Employee ID, Job Description, Gender and Address (yes, Address is a property)
Conversely, an Object is a concrete example of such a Class. (e.g. Dave is an object which has a Name : Dave, Employee ID: 0001, Job Description : Programmer Gender : Male, Address : 55 East 52nd Street, 21st Floor, New York, NY 10022, United States ) A Sub-Class is also a concept, an idea, or a blueprint. But to say that something is really a Sub-Class, say for example of the Employee class, It must share the SAME PROPERTIES of the Employee Class, a better word for it is INHERIT the same properties. What is different about a Sub-Class though is that, it can have ADDITIONAL FEATURES. So back to our example, we create the Sub-Class "Office Technical Employee" and add two more properties that is specific to this sub-class, Cubicle Number and Technical Expertise. Notice that this Sub-Class still has the properties of its "parent" or "root" class which is Employee. Parent Class: Employee Sub-Class : Office Technical Employee Name : Dave, Employee ID: 0001, Job Description : Programmer Gender : Male, Address : 55 East 52nd Street, 21st Floor, New York, NY 10022, United States CUBICLE NO : 01 TECHNICAL EXPERTISE : Java programming When you said that ADDRESS as a sub-class of EMPLOYEE. It doesn't make any sense because if we are to create a class called Address, its properties are basically House Number, Street Number, Street Name, and so forth. Such a class is TOTALLY DIFFERENT from the Employee Class. On Wed, Apr 17, 2013 at 5:29 AM, David Jordan <[email protected]>wrote: > > You are not listening to what we are telling you. > An address is NOT an employee. If you don't understand that, you are not > going to get very far… > You want to say that the address can also be a property of ont2's employee > class. > There is a big difference between being a property and being a subclass. > > > On Apr 16, 2013, at 2:58 PM, aarthi wrote: > > > no.. i'm not merging......... i need to say that address can also be a > > subclass of ont2's employee class. for that what i have to do? > > > > > > On Tue, Apr 16, 2013 at 11:42 AM, davejrdn <[email protected]> > wrote: > > > >> An address is NOT a subclass of an Employee, you are confusing the isA > and > >> hasA > >> relationships. Do you have any control over the definition of ont1 and > >> ont2? Or > >> are you just trying to use these together? Will instances be defined in > >> both > >> Employee classes, for ont1 and ont2? Will a given instance ever be > defined > >> directly as a ont1.Employee and an ont2.Employee? It really sounds like > >> you are > >> trying to merge data from two different data sources. Are you? > >> > >> > >> > >> > >> ________________________________ > >> From: aarthi <[email protected]> > >> To: users <[email protected]> > >> Sent: Tue, April 16, 2013 2:24:30 PM > >> Subject: Re: isA relation in jena > >> > >> hi.. i'll say clearly now... ont1 and ont2 are two ontologies created > using > >> protege. consider both ontology have a class named employee. but there > is a > >> class named address present in ont1 only... > >> > >> > >> Employee class is similar in both ontology. but address is present only > in > >> ont1, as there is a class named employee in ont2, we can say that > address > >> can also be a subclass of ont2. for this i need to create address isA > >> subclass of Employee(ont2) > >> > >> > >> On Tue, Apr 16, 2013 at 7:41 AM, Ian Dickinson <[email protected]> > >> wrote: > >> > >>> On 16/04/13 14:32, aarthi wrote: > >>> > >>>> sorry for the confusion... here in my ontology i include both the > >>>> classes and properties. and consider a class address is a subclass for > >>>> ont1(address is taken instead of john). now i haveto map address isA > >>>> subclass of ont2's Employee class. > >>>> > >>> This isn't adding much clarity, I'm afraid. Let me re-state the > problem > >>> to see if that helps - > >>> > >>> You have two ontology classes: > >>> > >>> ont1:Address > >>> ont2:Address > >>> > >>> You want to assert that ont2:Address is a sub-class of ont1:Address > (i.e, > >>> every instance of an ont1:Address is also an instance of an > >> ont2:Address). > >>> You need to add the triple: > >>> > >>> ont2:Address rdfs:subClassOf ont1:Address > >>> > >>> which you can do via the OntClass API, as I showed in the code sample > >> gist > >>> that I put in my previous message. > >>> > >>> The only other question is *where* you assert this new triple. And that > >> is > >>> entirely dependent on what you want to do with the ontologies and > >> mappings > >>> you are creating. It's not really possible to give advice on how to > >>> structure your Jena models without some sense of what you are trying to > >>> achieve. > >>> > >>> It would probably be helpful if you thought about the next steps of > your > >>> project in BDD terms, by creating some given/when/then user stories. > For > >>> example (and I'm making this up, you'll need to write your own): > >>> > >>> Given: a triple store containing data from one list of customers using > >>> terms only from ontology 1 > >>> And: a mapping between ontology 1 and ontology 2 > >>> When: the user runs a SPARQL query using terms from ontology 2 > >>> Then: the displayed results include the corresponding resources from > the > >>> triple store > >>> > >>> If you can get clear in your mind what problem you're trying to solve, > >>> then you'll be able to see potential solutions more clearly, and you'll > >> be > >>> able to ask clearer questions that we can give you more help with. > >>> > >>> Ian > >>> > >>> > >> > > -- Regards, Daryl
