|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectsl.Frame
Representation of an ontological entity as a set of untyped slots. This class can hold different slots, keeping track both their unique name and their position.
| Nested Class Summary | |
(package private) static class |
Frame.NoSuchSlotException
|
| Field Summary | |
private java.lang.String |
myName
|
private java.util.List |
slotNames
|
private java.util.List |
slotValues
|
static java.lang.String |
UNNAMEDPREFIX
This string is the prefix of all the unnamed slots of a Frame |
| Constructor Summary | |
Frame(java.lang.String name)
Creates a new frame with the given name. |
|
| Method Summary | |
java.lang.String |
getName()
Reads the name of this frame. |
java.lang.Object |
getSlot(int position)
Retrieves an unnamed slot from this frame, by position. |
java.lang.Object |
getSlot(java.lang.String name)
Retrieves a named slot from this frame, by name. |
java.lang.String |
getSlotName(int position)
|
void |
putSlot(java.lang.Object value)
Adds an unnamed slot to this frame. |
void |
putSlot(java.lang.String name,
java.lang.Object value)
Adds a named slot to this frame. |
int |
size()
|
java.lang.String |
toString()
it is here just for debugging purposes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private java.lang.String myName
private java.util.List slotNames
private java.util.List slotValues
public static java.lang.String UNNAMEDPREFIX
| Constructor Detail |
public Frame(java.lang.String name)
name - The name of this frame.| Method Detail |
public java.lang.String getName()
public void putSlot(java.lang.String name,
java.lang.Object value)
name - The unique name of the new slotvalue - A Java object that will be associated with the given name.public void putSlot(java.lang.Object value)
UNNAMEDPREFIX.
value - A Java object that will be associated with the given position.
public java.lang.Object getSlot(java.lang.String name)
throws OntologyException
name - The name of the desired slot.
OntologyException - If no suitable slot exists.
public java.lang.Object getSlot(int position)
throws OntologyException
position - The position of the desired slot.
OntologyException - If no suitable slot exists.public int size()
public java.lang.String getSlotName(int position)
throws OntologyException
OntologyException - If no suitable slot exists.public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||