de.unihalle.informatik.MiToBo.io.dirs
Class DirectoryTreeNodeData

java.lang.Object
  extended by de.unihalle.informatik.MiToBo.core.datatypes.MTBTreeNodeData
      extended by de.unihalle.informatik.MiToBo.io.dirs.DirectoryTreeNodeData

public class DirectoryTreeNodeData
extends MTBTreeNodeData

Implements class TreeNodeData for DirectoryTree. In particular, each node of the tree is associated with an absolute path and a list of files. These data are stored inside objects of this class.

Author:
moeller
See Also:
MTBTreeNodeData

Field Summary
(package private)  java.util.Vector<java.lang.String> files
          List of files (no subdirectories!)
(package private)  java.lang.String path
          Absolute directory path associated with this node.
 
Fields inherited from class de.unihalle.informatik.MiToBo.core.datatypes.MTBTreeNodeData
node
 
Constructor Summary
DirectoryTreeNodeData(java.lang.String p)
          Default constructor.
 
Method Summary
 void addFile(java.lang.String f)
          Adds a file to the list of the node.
 java.util.Vector<java.lang.String> getFileList()
          Get the list of all files inside the directory.
 java.lang.String getPath()
          Request path associated with the node.
 java.util.Vector<java.lang.String> getSubtreeFileList()
          Collects the list of all files inside this directory AND inside all subdirectories.
 void printData()
          Method to print the data associated with the node.
 void setNode(MTBTreeNode n)
          Sets the node the object is associated with.
 void setPath(java.lang.String p)
          Specify path associated with the node.
 
Methods inherited from class de.unihalle.informatik.MiToBo.core.datatypes.MTBTreeNodeData
getNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

files

java.util.Vector<java.lang.String> files
List of files (no subdirectories!) inside the directory.


path

java.lang.String path
Absolute directory path associated with this node.

Constructor Detail

DirectoryTreeNodeData

public DirectoryTreeNodeData(java.lang.String p)
Default constructor.

Parameters:
p - absolute path of directory
Method Detail

addFile

public void addFile(java.lang.String f)
Adds a file to the list of the node.

Parameters:
f - file to be added

getFileList

public java.util.Vector<java.lang.String> getFileList()
Get the list of all files inside the directory.

Returns:
list with files inside directory

getPath

public java.lang.String getPath()
Request path associated with the node.

Returns:
path of the node

getSubtreeFileList

public java.util.Vector<java.lang.String> getSubtreeFileList()
Collects the list of all files inside this directory AND inside all subdirectories.

Returns:
complete file list with absolute paths

printData

public void printData()
Description copied from class: MTBTreeNodeData
Method to print the data associated with the node.

Specified by:
printData in class MTBTreeNodeData

setNode

public void setNode(MTBTreeNode n)
Description copied from class: MTBTreeNodeData
Sets the node the object is associated with.

Overrides:
setNode in class MTBTreeNodeData
Parameters:
n - TreeNode the data object belongs to.

setPath

public void setPath(java.lang.String p)
Specify path associated with the node.

Parameters:
p - path of the node's directory