public class CombineArchiveFolderNode extends CombineArchiveContentNode
archiveNode, name
Constructor and Description |
---|
CombineArchiveFolderNode(String name,
CombineArchiveNode archiveNode,
CombineArchiveFolderNode parentFolder)
Instantiates a new combine archive content node.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntry(String path,
de.unirostock.sems.cbarchive.ArchiveEntry entry)
Adds an entry to this folder.
|
void |
generateTreeModel(DefaultMutableTreeNode parent)
Generate tree model.
|
Collection<CombineArchiveEntryNode> |
getArchivesNodes()
Gets the archives nodes rooted in this subtree.
|
int |
getNumChildren()
Gets the number of children in this folder.
|
CombineArchiveFolderNode |
getParentNode()
Gets the parent node.
|
String |
getPath()
Gets the path to this node.
|
boolean |
isFolder()
Checks if is folder.
|
void |
rename(String newName)
Rename this entry.
|
compareTo, getArchiveNode, getName, toString
public CombineArchiveFolderNode(String name, CombineArchiveNode archiveNode, CombineArchiveFolderNode parentFolder)
name
- the namearchiveNode
- the corresponding archive nodeparentFolder
- the parent folder, or null if this is in rootpublic boolean isFolder()
CombineArchiveContentNode
isFolder
in class CombineArchiveContentNode
public void addEntry(String path, de.unirostock.sems.cbarchive.ArchiveEntry entry)
path
- the path of entryentry
- the entrypublic int getNumChildren()
public Collection<CombineArchiveEntryNode> getArchivesNodes()
CombineArchiveContentNode
getArchivesNodes
in class CombineArchiveContentNode
public void generateTreeModel(DefaultMutableTreeNode parent)
generateTreeModel
in class CombineArchiveContentNode
parent
- the parentpublic CombineArchiveFolderNode getParentNode()
public String getPath()
public void rename(String newName) throws IOException
CombineArchiveContentNode
rename
in class CombineArchiveContentNode
newName
- the new nameIOException
Copyright © 2014. All rights reserved.