jade.content.onto
Class MicroIntrospector
java.lang.Object
|
+--jade.content.onto.MicroIntrospector
- public class MicroIntrospector
- extends java.lang.Object
- implements Introspector
- Author:
- Giovanni Caire - TILAB
- See Also:
- Serialized Form
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.
|
AbsObject |
externalise(java.lang.Object obj,
ObjectSchema schema,
java.lang.Class javaClass,
Ontology referenceOnto)
Translate an object of a class representing an element in an
ontology into a proper abstract descriptor |
java.lang.Object |
internalise(AbsObject abs,
ObjectSchema schema,
java.lang.Class javaClass,
Ontology referenceOnto)
Translate an abstract descriptor into an object of a proper class
representing an element in an ontology |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
MicroIntrospector
public MicroIntrospector()
externalise
public AbsObject externalise(java.lang.Object obj,
ObjectSchema schema,
java.lang.Class javaClass,
Ontology referenceOnto)
throws OntologyException
- Translate an object of a class representing an element in an
ontology into a proper abstract descriptor
- Specified by:
- externalise in interface Introspector
- Parameters:
onto
- The reference ontologyobj
- The Object to be translated- Returns:
- The Abstract descriptor produced by the translation
- Throws:
- jade.content.onto.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
internalise
public java.lang.Object internalise(AbsObject abs,
ObjectSchema schema,
java.lang.Class javaClass,
Ontology referenceOnto)
throws UngroundedException,
OntologyException
- Translate an abstract descriptor into an object of a proper class
representing an element in an ontology
- Specified by:
- internalise in interface Introspector
- Parameters:
onto
- The reference ontologyabs
- The abstract descriptor to be translated- Returns:
- The Java object produced by the translation
- Throws:
- UngroundedException - If the abstract descriptor to be translated
contains a variable
- jade.content.onto.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
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 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