|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjade.content.onto.Ontology
jade.content.onto.BasicOntology
public class BasicOntology
This class implements an ontology containing schemas for Primitive types and SL0 operators i.e. basic ontological elements required for minimal agent interaction. Users should always extend this ontology when defining their ontologies.
| Field Summary | |
|---|---|
static java.lang.String |
BOOLEAN
|
static java.lang.String |
BYTE_SEQUENCE
|
static java.lang.String |
CONTENT_ELEMENT_LIST
|
static java.lang.String |
DATE
|
static java.lang.String |
FLOAT
|
static java.lang.String |
INTEGER
|
static java.lang.String |
STRING
|
| Fields inherited from interface jade.content.lang.sl.SL0Vocabulary |
|---|
ACLMSG, ACLMSG_BYTE_SEQUENCE_CONTENT, ACLMSG_CONTENT, ACLMSG_CONVERSATION_ID, ACLMSG_ENCODING, ACLMSG_IN_REPLY_TO, ACLMSG_LANGUAGE, ACLMSG_ONTOLOGY, ACLMSG_PERFORMATIVE, ACLMSG_PROTOCOL, ACLMSG_RECEIVERS, ACLMSG_REPLY_BY, ACLMSG_REPLY_TO, ACLMSG_REPLY_WITH, ACLMSG_SENDER, ACTION, ACTION_ACTION, ACTION_ACTOR, AID, AID_ADDRESSES, AID_NAME, AID_RESOLVERS, DONE, DONE_ACTION, DONE_CONDITION, EQUALS, EQUALS_LEFT, EQUALS_RIGHT, FALSE_PROPOSITION, RESULT, RESULT_ACTION, RESULT_ITEMS, RESULT_VALUE, SEQUENCE, SET, TRUE_PROPOSITION |
| Method Summary | |
|---|---|
static java.lang.Object |
adjustPrimitiveValue(java.lang.Object srcValue,
java.lang.Class destClass)
Convert, if possible, the numeric value srcValue into an instance of destClass |
protected AbsObject |
fromObject(java.lang.Object obj,
Ontology referenceOnto)
This method is redefined as BasicOntology does not use an Introspector for performance reason |
static Ontology |
getInstance()
Returns the singleton instance of the BasicOntology. |
ObjectSchema |
getSchema(java.lang.Class clazz)
Redefine the getSchema() method to take into
account java primitives. |
ObjectSchema |
getSchema(java.lang.String name)
Redefine the getSchema() method to take into
account ACL performatives. |
static java.lang.Object |
resolveNumericValue(java.lang.Object srcValue,
java.lang.Class destClass)
Deprecated. Use adjustPrimitiveValue() instead |
protected java.lang.Object |
toObject(AbsObject abs,
java.lang.String lcType,
Ontology referenceOnto)
This method is redefined as BasicOntology does not use an Introspector for performance reason |
| 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, getSlotValue, internalize, internalizeSlotValue, setSlotValue, toObject, toString, useConceptSlotsAsFunctions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String STRING
public static final java.lang.String FLOAT
public static final java.lang.String INTEGER
public static final java.lang.String BOOLEAN
public static final java.lang.String DATE
public static final java.lang.String BYTE_SEQUENCE
public static final java.lang.String CONTENT_ELEMENT_LIST
| Method Detail |
|---|
public static Ontology getInstance()
BasicOntology.
BasicOntology
protected java.lang.Object toObject(AbsObject abs,
java.lang.String lcType,
Ontology referenceOnto)
throws UngroundedException,
OntologyException
toObject in class Ontologyabs - 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.referenceOnto - The ontology this ontology is part of (i.e. the
ontology that extends this ontology).
UngroundedException - if the abstract descriptor contains a
variable
UnknownSchemaException - If no schema for the abs descriptor
to be translated is defined in this ontology.
OntologyException - if some mismatch with the schema is found * ontology. In this case UnknownSchemaOntology.toObject(AbsObject)
protected AbsObject fromObject(java.lang.Object obj,
Ontology referenceOnto)
throws OntologyException
fromObject in class Ontologyobj - the objectreferenceOnto - The ontology this ontology is part of (i.e. the
ontology that extends this ontology).
UnknownSchemaException - If no schema for the object to be
translated is defined in this ontology.
OntologyException - if some mismatch with the schema is foundOntology.toObject(AbsObject)
public ObjectSchema getSchema(java.lang.String name)
throws OntologyException
getSchema() method to take into
account ACL performatives.
getSchema in class Ontologyname - the name of the schema in the vocabulary.
null if the schema is not found.
OntologyException
public ObjectSchema getSchema(java.lang.Class clazz)
throws OntologyException
getSchema() method to take into
account java primitives.
getSchema in class Ontologyclazz - the class whose associated schema must be retrieved.
null if the schema is not found.
OntologyException
public static java.lang.Object adjustPrimitiveValue(java.lang.Object srcValue,
java.lang.Class destClass)
public static java.lang.Object resolveNumericValue(java.lang.Object srcValue,
java.lang.Class destClass)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||