|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jade.onto.DefaultOntology
A simple implementation of the Ontology interface. Instances of
this class keeps all the ontology data in memory, and don't support an
external archive format.
| Constructor Summary | |
DefaultOntology()
Default constructor. |
|
| Method Summary | |
void |
addRole(java.lang.String roleName,
SlotDescriptor[] slots)
Adds a new role to this ontology, without a user defined Java class to represent it. |
void |
addRole(java.lang.String roleName,
SlotDescriptor[] slots,
RoleEntityFactory ref)
Adds a new role to this ontology, with a user defined Java class to represent it. |
void |
check(Frame f)
Checks whether a given frame is correct with respect to this ontology. |
void |
check(java.lang.Object o,
java.lang.String roleName)
Checks whether a given Java object is correct with respect to the given role in this ontology. |
Frame |
createFrame(java.lang.Object o,
java.lang.String roleName)
Creates a frame from a given Java Object representing an instance of a given role. |
java.util.List |
createObject(java.util.List v)
Creates a List of Java objects from the given list of frame. |
RoleEntityFactory |
getFactory(java.lang.String roleName)
Returns the factory for instances of the user defined class representing a given role |
java.lang.String |
getRoleName(java.lang.Class c)
|
SlotDescriptor[] |
getSlots(java.lang.String roleName)
Get the descriptions for all the slots that define the structure of a given ontological role. |
java.util.List |
getVocabulary()
|
boolean |
isRole(java.lang.String roleName)
Checks whether a given string is the name of a role in this ontology. |
void |
joinOntology(Ontology o)
Adds to this ontology all roles included into another ontology |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public DefaultOntology()
| Method Detail |
public void addRole(java.lang.String roleName,
SlotDescriptor[] slots)
throws OntologyException
Ontology.addRole(String roleName, SlotDescriptor[] slots)
public void addRole(java.lang.String roleName,
SlotDescriptor[] slots,
RoleEntityFactory ref)
throws OntologyException
Ontology.addRole(String roleName, SlotDescriptor[] slots, RoleEntityFactory ref)
public void joinOntology(Ontology o)
throws OntologyException
o - The Ontology object whose roles will
be addedOntology.joinOntology(Ontology o)
public java.util.List createObject(java.util.List v)
throws OntologyException
Ontology.createObject(List v)
public Frame createFrame(java.lang.Object o,
java.lang.String roleName)
throws OntologyException
Ontology.createFrame(Object o, String roleName)
public void check(Frame f)
throws OntologyException
Ontology.check(Frame f)
public void check(java.lang.Object o,
java.lang.String roleName)
throws OntologyException
Ontology.check(Object o, String roleName)
public boolean isRole(java.lang.String roleName)
throws OntologyException
Ontology.isRole(String roleName)
public SlotDescriptor[] getSlots(java.lang.String roleName)
throws OntologyException
Ontology.getSlots(String roleName)
public java.lang.String getRoleName(java.lang.Class c)
throws OntologyException
Ontology.getRoleName(Class c)public java.util.List getVocabulary()
List including the names of all the roles
in the ontology, i.e. the Vocabulary used by the ontologyOntology.getVocabulary()
public RoleEntityFactory getFactory(java.lang.String roleName)
throws OntologyException
roleName - The name of the ontological role.Ontology.getFactory(String roleName)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||