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 > >
