On Monday, April 15, 2013 10:15:35 AM aarthi wrote:
> hi i have two ontology.. consider ont1 and ont2. if both ont1 and ont2
> have a class named employee. And ont1's employee class have a sub
> class named age. but ont2's employee class doesn't have that class. i
> need to specify a relation that age "is-a" subclass of ont2's employee
> class. how to do that using jena? anyone help  me

It depends on exactly what you're trying to do and how you've set
up the ontologies.

Ignoring all the details, all you need to do in ont2 is to add the
statement

    age RDFS.isSubclassOf employee

where age is set up to be the `age` class and employee is set up to
be the `employee` class. Adding the statement is then one call
to the appropriate Model.add().

However, whether that's the right answer -- "right" as in making
your application work clearly and effectively -- depends on what your
application is trying to do, whether you need to keep ont1 and ont2
separate or bother with ont2 at all, whether `age` is just a named
class or a restriction, etc & co. Which we don't know.

Chris

Reply via email to