cz.cuni.amis.pogamut.episodic.schemas
Class SchemaObjectNode

Package class diagram package SchemaObjectNode
java.lang.Object
  extended by cz.cuni.amis.pogamut.episodic.schemas.SchemaObjectNode
All Implemented Interfaces:
Serializable

public class SchemaObjectNode
extends Object
implements Serializable

The class SchemaObjectNode is a mirror of ObjectNodes from chronobag structure. There is exactly one SchemaObjectNode created for each item that was ever used by an agent.

In schemas these nodes are linked together with slots they were used in via the SlotContent structure. Thus it is possible to determine how many times each item was used to perform each node.

Author:
Michal Cermak
See Also:
Serialized Form

Constructor Summary
SchemaObjectNode(int _id, String _name)
          Instantiate the class by providing unique ID of the node and unique name of item it is representing.
 
Method Summary
 boolean addSlotUsedIn(SlotContent content)
          When the item represented by this node is used in an affordance slot, it is linked with the node representing that slot via the SlotContent class.
 int getId()
          Getter method for the id variable.
 String getName()
          Getter method for the name variable.
 Collection<SlotContent> getSlotContents()
          Basically a getter method for the usedIn variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaObjectNode

public SchemaObjectNode(int _id,
                        String _name)
Instantiate the class by providing unique ID of the node and unique name of item it is representing.

Parameters:
_id - Unique ID of the new node.
_name - Unique name of the item.
Method Detail

getId

public int getId()
Getter method for the id variable.

Returns:
Returns ID of this node. Used as an ID of vertex representing this chronobag when visualizing Schemas.

getName

public String getName()
Getter method for the name variable.

Returns:
Returns unique name of the item this node is representing.

addSlotUsedIn

public boolean addSlotUsedIn(SlotContent content)
When the item represented by this node is used in an affordance slot, it is linked with the node representing that slot via the SlotContent class. This method adds a new SlotContent to the list of slot contents that link this item to all the slots it was ever used in. If however this item was already linked with that slot, this method does nothing.

Parameters:
content - SlotContent object to be added to the list of SlotContents connecting this item node with slot nodes.
Returns:
Returns true, if new link was created. Returns false if the link between the item and the slot already existed in schema.

getSlotContents

public Collection<SlotContent> getSlotContents()
Basically a getter method for the usedIn variable.

Returns:
Returns the map of all SlotContents pointing to this SchemaObjectNode.


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.