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

java.lang.Objectcz.cuni.amis.pogamut.episodic.schemas.SchemaEpisodeNode
public class SchemaEpisodeNode
The class SchemaEpisodeNode is a mirror of Nodes
from decision tree and EpisodeNodes from episode tree in
the schemas. Each schema episode node is associated with exactly one node
in decision trees, so for each node in episode trees it is possible to find
its associated schema node. Same of their equivalents, schema episode nodes
can have schema affordance slots attached to them.
Together with SlotContents (linkage between given object and
a affordanceslot in schemas) they form a set that is indexing different
schema counters. They keep list of references to counters they contribute
to. This list can be quite long, but it always contains at least a single
counter for current schema episode node.
| Constructor Summary | |
|---|---|
SchemaEpisodeNode(Node _associatedNode,
int _id,
String _name)
Instantiate the class by providing its name, reference to associated decision Node, and its unique ID. |
|
| Method Summary | |
|---|---|
void |
addCount(int key,
SchemaCounter count)
Each SchemaEpisodeNode keeps the list of references
to counters it is contributing to (it is contained in set of nodes
defining the counter). |
boolean |
addSlot(String s,
int id)
This method attaches a new slot to this SchemaEpisodeNode. |
Node |
getAssociatedNode()
Getter method for the name variable. |
Collection<SchemaEpisodeNode> |
getChildrenSchemaNodes()
|
org.apache.commons.collections15.multimap.MultiHashMap<Integer,SchemaCounter> |
getCounts()
|
int |
getId()
Getter method for the name variable. |
String |
getName()
Getter method for the name variable. |
SchemaEpisodeNode |
getParentSchemaNode()
|
Integer |
getSingleCount()
Returns actual count of this single schema episode node. |
SchemaSlot |
getSlot(String s)
This method can be used to retrieve one specified slot attached to this node. |
Collection<SchemaSlot> |
getSlots()
Basically a getter method for the slots variable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SchemaEpisodeNode(Node _associatedNode,
int _id,
String _name)
Node, and its unique ID.
Mutual association with associated node is created in constructor.
_associatedNode - Reference to associated Node._id - Unique ID of the new node._name - Name of the node.| Method Detail |
|---|
public String getName()
name variable.
public int getId()
name variable.
public Node getAssociatedNode()
name variable.
public boolean addSlot(String s,
int id)
SchemaEpisodeNode.
There should be no two slots of same type attached to one node,
but since this should already hold for the associated node, it should
never happen for the schema node either.
s - Type of the slot and class of item that satisfies it.id - Unique ID used for visualizing purposes.
public SchemaSlot getSlot(String s)
s - Type of the slot that is to be returned.
SchemaSlot of specified type
that was attached to this node. If no such slot exists returns
null.public Collection<SchemaSlot> getSlots()
slots variable.
SchemaSlots
attached to this node. Each slot is equivalent with exactly
one affordance slot in decision tree. Through schema slots it is
possible to find out how many times was each item used to satisfy
the given slot.
public void addCount(int key,
SchemaCounter count)
SchemaEpisodeNode 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 node, 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 node.count - Reference to the SchemaCounter that should
be added to the list (actually a map) of counters.public Integer getSingleCount()
public org.apache.commons.collections15.multimap.MultiHashMap<Integer,SchemaCounter> getCounts()
public SchemaEpisodeNode getParentSchemaNode()
public Collection<SchemaEpisodeNode> getChildrenSchemaNodes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||