|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.ObjectJADE_SL.onto.BCReflectiveIntrospector
Backward Compatible reflective introspector. This Introspector
uses Java Reflection to translate java object to/from abstract
descriptors as the ReflectiveIntrospector does, but
it assumes the accessors methods for aggregate slots to be in the
"old JADE style" i.e.
For every aggregate slot named XXX,
with elements of type T, the Java class must have
two accessible methods, with the following signature:
Iterator getAllXXX()
void addXXX(T t)
| Constructor Summary | |
BCReflectiveIntrospector()
|
|
| Method Summary | |
void |
checkClass(ObjectSchema schema,
java.lang.Class javaClass)
Check the structure of a java class associated to an ontological element to ensure that translations to/from abstract descriptors and java objects (instances of that class) can be accomplished by this introspector. |
AbsObject |
externalise(Ontology onto,
Ontology referenceOnto,
java.lang.Object obj)
Translate an object of a class representing an element in an ontology into a proper abstract descriptor |
private java.lang.reflect.Method |
findMethodCaseInsensitive(java.lang.String name,
java.lang.Class c)
|
java.lang.Object |
internalise(Ontology onto,
Ontology referenceOnto,
AbsObject abs)
Translate an abstract descriptor into an object of a proper class representing an element in an ontology |
private void |
invokeAddMethod(Ontology onto,
java.lang.reflect.Method method,
java.lang.Object obj,
AbsAggregate value)
|
private AbsObject |
invokeGetMethod(Ontology onto,
java.lang.reflect.Method method,
java.lang.Object obj)
|
private void |
invokeSetMethod(Ontology onto,
java.lang.reflect.Method method,
java.lang.Object obj,
AbsObject value)
|
private java.lang.String |
translateName(java.lang.String name)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BCReflectiveIntrospector()
| Method Detail |
public AbsObject externalise(Ontology onto,
Ontology referenceOnto,
java.lang.Object obj)
throws UnknownSchemaException,
OntologyException
externalise in interface Introspectoronto - The ontology that uses this Introspector.referenceOnto - The reference ontology in the context of
this translation i.e. the most extended ontology that extends
onto (directly or indirectly).obj - The Object to be translated
UnknownSchemaException - If no schema for the object to be
translated is defined in the ontology that uses this Introspector
OntologyException - If some error occurs during the translation
private AbsObject invokeGetMethod(Ontology onto,
java.lang.reflect.Method method,
java.lang.Object obj)
throws OntologyException
OntologyException
public java.lang.Object internalise(Ontology onto,
Ontology referenceOnto,
AbsObject abs)
throws UngroundedException,
UnknownSchemaException,
OntologyException
internalise in interface Introspectoronto - The ontology that uses this Introspector.referenceOnto - The reference ontology in the context of
this translation i.e. the most extended ontology that extends
onto (directly or indirectly).abs - The abstract descriptor to be translated
UngroundedException - If the abstract descriptor to be translated
contains a variable
UnknownSchemaException - If no schema for the abstract descriptor
to be translated is defined in the ontology that uses this Introspector
OntologyException - If some error occurs during the translation
private void invokeSetMethod(Ontology onto,
java.lang.reflect.Method method,
java.lang.Object obj,
AbsObject value)
throws OntologyException
OntologyException
private void invokeAddMethod(Ontology onto,
java.lang.reflect.Method method,
java.lang.Object obj,
AbsAggregate value)
throws OntologyException
OntologyException
public void checkClass(ObjectSchema schema,
java.lang.Class javaClass)
throws OntologyException
checkClass in interface Introspectorschema - The schema of the ontological elementjavaClass - The java class associated to the ontologcal element
OntologyException - if the java class does not have the correct
structure
private java.lang.reflect.Method findMethodCaseInsensitive(java.lang.String name,
java.lang.Class c)
throws OntologyException
OntologyExceptionprivate java.lang.String translateName(java.lang.String name)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||