jade.content.onto
Class MicroIntrospector

java.lang.Object
  extended by jade.content.onto.MicroIntrospector
All Implemented Interfaces:
Introspector, java.io.Serializable

public class MicroIntrospector
extends java.lang.Object
implements Introspector

This introspector does nothing but "asking objects to convert themselves into/from abstract descriptors". It could be used when working in Java environments where the reflection is not supported (MIDP). All classes in an ontology using this introspector must implement the Introspectable interface.

Author:
Giovanni Caire - TILAB
See Also:
Serialized Form

Constructor Summary
MicroIntrospector()
           
 
Method Summary
 void checkClass(ObjectSchema schema, java.lang.Class javaClass, Ontology onto)
          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.
 AbsAggregate externalizeAggregate(java.lang.String slotName, java.lang.Object obj, ObjectSchema schema, Ontology referenceOnto)
           
 AbsObject externalizeSpecialType(java.lang.Object obj, ObjectSchema schema, java.lang.Class javaClass, Ontology referenceOnto)
           
 java.lang.Object getSlotValue(java.lang.String slotName, java.lang.Object obj, ObjectSchema schema)
           
 java.lang.Object internalizeAggregate(java.lang.String slotName, AbsAggregate abs, ObjectSchema schema, Ontology referenceOnto)
           
 java.lang.Object internalizeSpecialType(AbsObject abs, ObjectSchema schema, java.lang.Class javaClass, Ontology referenceOnto)
           
 void setSlotValue(java.lang.String slotName, java.lang.Object slotValue, java.lang.Object obj, ObjectSchema schema)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MicroIntrospector

public MicroIntrospector()
Method Detail

checkClass

public void checkClass(ObjectSchema schema,
                       java.lang.Class javaClass,
                       Ontology onto)
                throws OntologyException
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. This is the case if javaClass implements the Introspectable

Specified by:
checkClass in interface Introspector
Parameters:
schema - The schema of the ontological element
javaClass - The java class associated to the ontologcal element
onto - The Ontology that uses this Introspector
Throws:
OntologyException - if the java class does not have the correct structure

getSlotValue

public java.lang.Object getSlotValue(java.lang.String slotName,
                                     java.lang.Object obj,
                                     ObjectSchema schema)
                              throws OntologyException
Specified by:
getSlotValue in interface Introspector
Throws:
OntologyException

setSlotValue

public void setSlotValue(java.lang.String slotName,
                         java.lang.Object slotValue,
                         java.lang.Object obj,
                         ObjectSchema schema)
                  throws OntologyException
Specified by:
setSlotValue in interface Introspector
Throws:
OntologyException

externalizeAggregate

public AbsAggregate externalizeAggregate(java.lang.String slotName,
                                         java.lang.Object obj,
                                         ObjectSchema schema,
                                         Ontology referenceOnto)
                                  throws OntologyException
Specified by:
externalizeAggregate in interface Introspector
Throws:
OntologyException

internalizeAggregate

public java.lang.Object internalizeAggregate(java.lang.String slotName,
                                             AbsAggregate abs,
                                             ObjectSchema schema,
                                             Ontology referenceOnto)
                                      throws OntologyException
Specified by:
internalizeAggregate in interface Introspector
Throws:
OntologyException

externalizeSpecialType

public AbsObject externalizeSpecialType(java.lang.Object obj,
                                        ObjectSchema schema,
                                        java.lang.Class javaClass,
                                        Ontology referenceOnto)
                                 throws OntologyException
Specified by:
externalizeSpecialType in interface Introspector
Throws:
OntologyException

internalizeSpecialType

public java.lang.Object internalizeSpecialType(AbsObject abs,
                                               ObjectSchema schema,
                                               java.lang.Class javaClass,
                                               Ontology referenceOnto)
                                        throws OntologyException
Specified by:
internalizeSpecialType in interface Introspector
Throws:
OntologyException