|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectJ2OClassManager
public class J2OClassManager
This class manages all correspondences between Java-classes and OWL-classes.
For OWL-classes generated from Java-classes there is a one-to-one correspondence. In contrast to Java classes, OWL-classes allow for multiple inheritance. This means that for subclasses there is no one-to-one correspondence any more.
Example: Java-classes Ship and LandVehicle are mapped to OWL-classes. If in the extension ontology a common subclass AmphibiousCraft is externally added, this class corresponds to the two Java-classes Ship and LandVehicle. This becomes relevant when OWL-individuals are imported and mapped to Java-objects. In the case of AmphibiousCraft-instances, one could then generate two Java-objects, a Ship and a LandVehicle.
Constructor Summary | |
---|---|
J2OClassManager(J2OManager manager)
creates a class manager for the given top-manager. |
Method Summary | |
---|---|
void |
activateSynchronisation(Object... classes)
activates Java <-> OWL synchronisation for all objects in the given classes. |
void |
clear()
clears all internal class-relevant data. |
void |
clearCache()
clears the internal cache. |
void |
deactivateSynchronisation(Object... classes)
deactivates Java <-> OWL synchronisation for all objects in the given classes. |
Set<Class> |
getClasses()
returns the set of classes managed by the class manager. |
ClassWrapper |
getCLW(Class jcl)
returns for a given Java class the corresponding class wrapper, or null if there is none stored. |
ClassWrapper |
getCLW(Class jcl,
boolean direct)
returns the ClassWrapper for the given Java class, or null if none can be found.. |
Collection<ClassWrapper> |
getCLWs()
returns the ClassWrappers managed by the class manager. |
Set<ClassWrapper> |
getCLWs(Set<OWLClass> ocls)
yields the ClassWrappers which correspond to the given OWL-classes. |
String |
getName()
returns the name of the class manager. |
OWLClass |
getOWLClass(Class jcl,
boolean direct)
yields the OWL-class which corresponds to the Java class jcl, or null. |
boolean |
isMapped(Class jcl)
returns true if the Java class is directly mapped to an OWLClass. |
String |
toString()
returns a string-representation of the class manager. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public J2OClassManager(J2OManager manager)
Method Detail |
---|
public String getName()
public ClassWrapper getCLW(Class jcl)
public Set<Class> getClasses()
public Collection<ClassWrapper> getCLWs()
public boolean isMapped(Class jcl)
public ClassWrapper getCLW(Class jcl, boolean direct)
jcl
- a Java class.direct
- if false then jcl's superclasses are also searched for ClassWrapper.
public OWLClass getOWLClass(Class jcl, boolean direct)
jcl
- the Java Class.direct
- if false then jcl's superclasses are also searched for ClassWrapper.cache
- if true the finding is internally stored.
public Set<ClassWrapper> getCLWs(Set<OWLClass> ocls)
Since OWL has multiple inheritance, an OWL-class may have several superclasses which correspond to Java-classes. The lowest such superclasses are returned. remember = true should only be used if the Java <-> OWL relations do not change any more for ocl's superclasses.
ocls
- a set of OWL classes.
public void activateSynchronisation(Object... classes)
classes
- are either single Java class, an array or a collection of Java classes.
For all these classes and their subclasses the synchronisation is activated. This activation can be overwritten at object level.
Before the synchronisation is activated all objects in the classes are synchronised with OWL.
IndividualWrapper.activateSynchronisation.
public void deactivateSynchronisation(Object... classes)
classes
- are either single Java class, an array or a collection of Java classes.
For all these classes and their subclasses the synchronisation is activated. This activation can be overwritten at object level.
IndividualWrapper.activateSynchronisation.
public void clearCache()
public void clear()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |