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

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

public class SchemaSlot
extends Object
implements Serializable

The class SchemaSlot is a mirror of AffordanceSlots from decision tree and ObjectSlots from episode tree in the schemas. SchemaObjectNodes can be linked with SchemaSlots via the SlotContent objects. Each slot is linked with all the items that were ever used to fill it and satisfy the given affordance.

Author:
Michal Cermak
See Also:
Serialized Form

Constructor Summary
SchemaSlot(int _id, String _type)
          Instantiate the slot by providing its unique ID type.
 
Method Summary
 boolean addSlotContent(int id, SchemaObjectNode o)
          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.
 int getId()
          Getter method for the id variable.
 SlotContent getSlotContent(String s)
          Method to retrieve to SlotContent object connecting the slot with specified item.
 Collection<SlotContent> getSlotContents()
          Basically a getter method for the filledBy variable.
 String getType()
          Getter method for the type variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaSlot

public SchemaSlot(int _id,
                  String _type)
Instantiate the slot by providing its unique ID type.

No two slots of the same type can be attached on one node.

Parameters:
_id - Unique ID of the slot.
_type - Type of the new slot.
Method Detail

getId

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

Returns:
Returns the unique ID of the slot that is used as an ID of vertex representing this node when visualizing decision tree.

getType

public String getType()
Getter method for the type variable.

Returns:
Returns the type of this slot specifying the class of items that can satisfy (fill) it. Any item of same item type can be linked with with the slot and no item that is not of this type cannot be linked with it.

addSlotContent

public boolean addSlotContent(int id,
                              SchemaObjectNode o)
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. This method adds a new SlotContent to the list of slot contents that link this slot to all the items it was ever filled with. If however this slot was already linked with that item, this method does nothing.

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

getSlotContent

public SlotContent getSlotContent(String s)
Method to retrieve to SlotContent object connecting the slot with specified item.

Parameters:
s - Name of the object node the slot content is connecting this slot with.
Returns:
Returns the SlotContent connecting the slot with the specified item. If no such slot exists in the schema returns null.

getSlotContents

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

Returns:
Returns a collection of all SlotContent objects that are pointing to this slot.


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