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

@ALDMetaInfo(export=ALLOWED)
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
 
Fields inherited from class de.unihalle.informatik.MiToBo.core.datatypes.MTBTreeNodeData
node
 
Constructor Summary
DirectoryTreeNodeData(String p)
          Default constructor.
 
Method Summary
 void addFile(String f)
          Adds a file to the list of the node.
 Vector<String> getFileList()
          Get the list of all files inside the directory.
 String getPath()
          Request path associated with the node.
 Vector<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(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
 

Constructor Detail

DirectoryTreeNodeData

public DirectoryTreeNodeData(String p)
Default constructor.

Parameters:
p - absolute path of directory
Method Detail

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.

getPath

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

Returns:
path of the node

setPath

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

Parameters:
p - path of the node's directory

addFile

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

Parameters:
f - file to be added

getFileList

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

Returns:
list with files inside directory

printData

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

Specified by:
printData in class MTBTreeNodeData

getSubtreeFileList

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

Returns:
complete file list with absolute paths


Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.