jade.content.onto
Class SerializableOntology
java.lang.Object
jade.content.onto.Ontology
jade.content.onto.SerializableOntology
- All Implemented Interfaces:
- java.io.Serializable
public class SerializableOntology
- extends Ontology
This ontology allows dealing with Java Serializable objects as
if they were instances of ontological elements.
NOT available in MIDP
- Author:
- Giovanni Caire - TILAB
- See Also:
- Serialized Form
|
Method Summary |
protected AbsObject |
fromObject(java.lang.Object obj,
Ontology globalOnto)
Converts a Java object into a proper abstract descriptor. |
static Ontology |
getInstance()
Returns the singleton instance of the SerializableOntology. |
void |
setClassLoader(java.lang.ClassLoader cl)
|
protected java.lang.Object |
toObject(AbsObject abs,
java.lang.String lcType,
Ontology globalOnto)
Converts an abstract descriptor to a Java object of the proper class. |
| Methods inherited from class jade.content.onto.Ontology |
add, add, checkIsTerm, createConceptSlotFunction, dump, dump, externalize, externalizeSlotValue, fromObject, getActionNames, getClassForElement, getConceptNames, getIntrospector, getName, getOwnActionNames, getOwnConceptNames, getOwnPredicateNames, getPredicateNames, getSchema, getSchema, getSlotValue, internalize, internalizeSlotValue, setSlotValue, toObject, toString, useConceptSlotsAsFunctions |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SERIALIZABLE
public static final java.lang.String SERIALIZABLE
- See Also:
- Constant Field Values
SERIALIZABLE_VALUE
public static final java.lang.String SERIALIZABLE_VALUE
- See Also:
- Constant Field Values
getInstance
public static Ontology getInstance()
- Returns the singleton instance of the
SerializableOntology.
- Returns:
- the singleton instance of the
SerializableOntology
setClassLoader
public void setClassLoader(java.lang.ClassLoader cl)
toObject
protected java.lang.Object toObject(AbsObject abs,
java.lang.String lcType,
Ontology globalOnto)
throws UnknownSchemaException,
UngroundedException,
OntologyException
- Description copied from class:
Ontology
- Converts an abstract descriptor to a Java object of the proper class.
- Overrides:
toObject in class Ontology
- Parameters:
abs - the abstract descriptor.lcType - the type of the abstract descriptor to be translated
aconverted into lower case. This is passed as parameters to avoid
making the conversion to lower case for each base ontology.globalOnto - The ontology this ontology is part of (i.e. the
ontology that extends this ontology).
- Returns:
- the object
- Throws:
UnknownSchemaException - If no schema for the abs descriptor
to be translated is defined in this ontology.
UngroundedException - if the abstract descriptor contains a
variable
OntologyException - if some mismatch with the schema is found * ontology. In this case UnknownSchema
fromObject
protected AbsObject fromObject(java.lang.Object obj,
Ontology globalOnto)
throws UnknownSchemaException,
OntologyException
- Description copied from class:
Ontology
- Converts a Java object into a proper abstract descriptor.
- Overrides:
fromObject in class Ontology
- Parameters:
obj - the objectglobalOnto - The ontology this ontology is part of (i.e. the
ontology that extends this ontology).
- Returns:
- the abstract descriptor.
- Throws:
UnknownSchemaException - If no schema for the object to be
translated is defined in this ontology.
OntologyException - if some mismatch with the schema is found