org.problets.lib.conceptmap.model.userbuilt
Class UserBuiltNodeModel

java.lang.Object
  extended by org.problets.lib.conceptmap.model.NodeModel
      extended by org.problets.lib.conceptmap.model.userbuilt.UserBuiltNodeModel

public class UserBuiltNodeModel
extends NodeModel

Derived from NodeModel. Written in order to allow the user to create user-built link models.

Author:
Adrian Maries

Constructor Summary
UserBuiltNodeModel(UserBuiltNodeModel parent, java.util.Vector contents)
          Creates a UserBuiltNodeModel object using the parent node and the data for the rest of the tree passed in a vector of strings as arguments.
 
Method Summary
 java.lang.String getFeedback(java.lang.String targetNode)
          Returns the feedback the user gets when connecting the node passed as argument to the current node.
 UserBuiltNodeModel getShallowCopy()
          Returns a shallow copy (a copy of the ) of this node model.
static void main(java.lang.String[] args)
           
 void removeChildLink(java.lang.String childNodeName)
          Removes the child link which connects this node to the node whose name is passed by argument.
 void removeChildNode(java.lang.String childNodeName)
          Removes the child node at the specified index.
 void updateTutor(boolean[][] userMatrix, boolean[][] actualMatrix, java.util.Vector matrixDifferenceVector, java.util.Vector labelsVector)
          Updates the connection matrix of the user-built tree and the vector of MatrixDifference objects in the forest tutor.
 
Methods inherited from class org.problets.lib.conceptmap.model.NodeModel
addLink, addNode, connect2StatusProvider, getAreChildrenAnd, getChild, getChildLink, getChildLinkTo, getDescription, getIndex, getModelVector, getName, getNumChildren, getParent, getPercentCompletion, print, setAreChildernAndFlag, setParent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserBuiltNodeModel

public UserBuiltNodeModel(UserBuiltNodeModel parent,
                          java.util.Vector contents)
Creates a UserBuiltNodeModel object using the parent node and the data for the rest of the tree passed in a vector of strings as arguments.

Parameters:
parent - the parent node
contents - the vector holding the data for the rest of the tree
Method Detail

getShallowCopy

public UserBuiltNodeModel getShallowCopy()
Returns a shallow copy (a copy of the ) of this node model.

Returns:
a shallow copy of this node model

getFeedback

public java.lang.String getFeedback(java.lang.String targetNode)
Returns the feedback the user gets when connecting the node passed as argument to the current node.

Parameters:
targetNode - the target node in the group of two nodes connected to each other
Returns:
the feedback the user gets when connecting the node passed as argument to the current node

removeChildNode

public void removeChildNode(java.lang.String childNodeName)
Removes the child node at the specified index.

Parameters:
index - an index into the vector

removeChildLink

public void removeChildLink(java.lang.String childNodeName)
Removes the child link which connects this node to the node whose name is passed by argument.

Parameters:
childNodeName - the name of the node whose link to its parent will be removed

updateTutor

public void updateTutor(boolean[][] userMatrix,
                        boolean[][] actualMatrix,
                        java.util.Vector matrixDifferenceVector,
                        java.util.Vector labelsVector)
Updates the connection matrix of the user-built tree and the vector of MatrixDifference objects in the forest tutor.

Parameters:
userMatrix - the connection matrix of the user-built tree
actualMatrix - the connection matrix of the actual tree
matrixDifferenceVector - the vector of MatrixDifference objects
labelsVector - the vector with the order of the nodes in the connection matrix

main

public static void main(java.lang.String[] args)