Package jade.content.onto
Class SerializableOntology
- java.lang.Object
-
- jade.content.onto.Ontology
-
- jade.content.onto.SerializableOntology
-
- All Implemented Interfaces:
Serializable,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
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERIALIZABLEstatic StringSERIALIZABLE_VALUE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbsObjectfromObject(Object obj, Ontology globalOnto)Converts a Java object into a proper abstract descriptor.static OntologygetInstance()Returns the singleton instance of theSerializableOntology.voidsetClassLoader(ClassLoader cl)protected ObjecttoObject(AbsObject abs, 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, getReferencedSchemas, getSchema, getSchema, getSlotValue, internalize, internalizeSlotValue, isBaseOntology, setSlotValue, toObject, toString, useConceptSlotsAsFunctions
-
-
-
-
Field Detail
-
SERIALIZABLE
public static final String SERIALIZABLE
- See Also:
- Constant Field Values
-
SERIALIZABLE_VALUE
public static final String SERIALIZABLE_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static Ontology getInstance()
Returns the singleton instance of theSerializableOntology.- Returns:
- the singleton instance of the
SerializableOntology
-
setClassLoader
public void setClassLoader(ClassLoader cl)
-
toObject
protected Object toObject(AbsObject abs, String lcType, Ontology globalOnto) throws UnknownSchemaException, UngroundedException, OntologyException
Description copied from class:OntologyConverts an abstract descriptor to a Java object of the proper class.- Overrides:
toObjectin classOntology- 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 variableOntologyException- if some mismatch with the schema is found * ontology. In this case UnknownSchema
-
fromObject
protected AbsObject fromObject(Object obj, Ontology globalOnto) throws UnknownSchemaException, OntologyException
Description copied from class:OntologyConverts a Java object into a proper abstract descriptor.- Overrides:
fromObjectin classOntology- 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
-
-