I want to implement events to ontology. For example by adding an individual to one class it's added to another class. Following the instructions in ProtegeOWL_API_Advanced_Topics I wrote this:
JenaOWLModel model=ProtegeOWL.createJenaOWLModel();
OWLNamedClass c1= model.createOWLNamedClass("A");
OWLNamedClass c2= model.createOWLNamedClass("B");
c1.addClassListener( new ClassAdapter(){
public void instaneAdded(RDFSClass c1,RDFSClass c2,RDFResource instance) {
String s= instance.getName();
c2.createInstance(s);
}
});
Isn't it right way? Because it doesn't work in protege.