Package jade.content.onto
Class MicroIntrospector
- java.lang.Object
-
- jade.content.onto.MicroIntrospector
-
- All Implemented Interfaces:
Introspector,Serializable,Serializable
public class MicroIntrospector extends 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 theIntrospectableinterface.- Author:
- Giovanni Caire - TILAB
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MicroIntrospector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckClass(ObjectSchema schema, 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.AbsAggregateexternalizeAggregate(String slotName, Object obj, ObjectSchema schema, Ontology referenceOnto)AbsObjectexternalizeSpecialType(Object obj, ObjectSchema schema, Class javaClass, Ontology referenceOnto)ObjectgetSlotValue(String slotName, Object obj, ObjectSchema schema)ObjectinternalizeAggregate(String slotName, AbsAggregate abs, ObjectSchema schema, Ontology referenceOnto)ObjectinternalizeSpecialType(AbsObject abs, ObjectSchema schema, Class javaClass, Ontology referenceOnto)voidsetSlotValue(String slotName, Object slotValue, Object obj, ObjectSchema schema)
-
-
-
Method Detail
-
checkClass
public void checkClass(ObjectSchema schema, 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 ifjavaClassimplements theIntrospectable- Specified by:
checkClassin interfaceIntrospector- Parameters:
schema- The schema of the ontological elementjavaClass- The java class associated to the ontologcal elementonto- The Ontology that uses this Introspector- Throws:
OntologyException- if the java class does not have the correct structure
-
getSlotValue
public Object getSlotValue(String slotName, Object obj, ObjectSchema schema) throws OntologyException
- Specified by:
getSlotValuein interfaceIntrospector- Throws:
OntologyException
-
setSlotValue
public void setSlotValue(String slotName, Object slotValue, Object obj, ObjectSchema schema) throws OntologyException
- Specified by:
setSlotValuein interfaceIntrospector- Throws:
OntologyException
-
externalizeAggregate
public AbsAggregate externalizeAggregate(String slotName, Object obj, ObjectSchema schema, Ontology referenceOnto) throws OntologyException
- Specified by:
externalizeAggregatein interfaceIntrospector- Throws:
OntologyException
-
internalizeAggregate
public Object internalizeAggregate(String slotName, AbsAggregate abs, ObjectSchema schema, Ontology referenceOnto) throws OntologyException
- Specified by:
internalizeAggregatein interfaceIntrospector- Throws:
OntologyException
-
externalizeSpecialType
public AbsObject externalizeSpecialType(Object obj, ObjectSchema schema, Class javaClass, Ontology referenceOnto) throws OntologyException
- Specified by:
externalizeSpecialTypein interfaceIntrospector- Throws:
OntologyException
-
internalizeSpecialType
public Object internalizeSpecialType(AbsObject abs, ObjectSchema schema, Class javaClass, Ontology referenceOnto) throws OntologyException
- Specified by:
internalizeSpecialTypein interfaceIntrospector- Throws:
OntologyException
-
-