|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.episodic.schemas.SlotContent
public class SlotContent
When the slot represented by this node is filled with an object node,
it is linked with the node representing that item via the
SlotContent class. Each SlotContent contains
references to exactly one SchemaSlot and one
SchemaObjectNode it is linking together.
Together with SchemaEpisodeNodes they form a set that is
indexing different schema counters. They keep list of references
to counters they contribute to.
| Constructor Summary | |
|---|---|
SlotContent(int _id,
SchemaSlot _slot,
SchemaObjectNode _object)
Instantiate the class by providing unique ID and references to both SchemaSlot and SchemaObjectNode that are
to be connected by this slot content. |
|
| Method Summary | |
|---|---|
void |
addCount(int key,
SchemaCounter count)
Each SlotContent keeps the list of references
to counters it is contributing to (it is contained in set of nodes
defining the counter). |
org.apache.commons.collections15.multimap.MultiHashMap<Integer,SchemaCounter> |
getCounts()
Getter variable for counts variable. |
int |
getId()
Getter method for the id variable. |
SchemaObjectNode |
getObject()
Getter method for the object variable. |
SchemaSlot |
getSlot()
Getter method for the slot variable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SlotContent(int _id,
SchemaSlot _slot,
SchemaObjectNode _object)
SchemaSlot and SchemaObjectNode that are
to be connected by this slot content.
_id - Unique ID of this slot content._slot - Reference to the SchemaSlot object on
one end of the link between a slot and an object created by
this new slot content._object - Reference to the SchemaObjectNode
object on one end of the link between a slot and an object created
by this new slot content.| Method Detail |
|---|
public int getId()
id variable.
public SchemaSlot getSlot()
slot variable.
SchemaSlot object
on one end of the link between a slot and an object created by
this new slot content.public SchemaObjectNode getObject()
object variable.
SchemaObjectNode
object on one end of the link between a slot and an object created
by this new slot content.
public void addCount(int key,
SchemaCounter count)
SlotContent keeps the list of references
to counters it is contributing to (it is contained in set of nodes
defining the counter). So when a new counter is created, that
is co-defined by this slot content, it need to be added to this list.
This method adds a speficied counter to this list under a specified key.
key - Index of the new SchemaCounter. It is the key
of the counter minus the ID of current slot content.count - Reference to the SchemaCounter that should
be added to the list (actually a map) of counters.public org.apache.commons.collections15.multimap.MultiHashMap<Integer,SchemaCounter> getCounts()
counts variable.
counts is a collection of all SchemaCounters
this node contributes to. In order to quickly access any counter,
counters are indexed in a multihashmap. Index of a counter is calculated
as the sum of IDs of all nodes it refers to, but when accessing
a counter from the inside of the node, nodes id is not added to the sum.
So a single counters of nodes can always be accessed on zero index.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||