/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.nplusc.izc.tools.IOtools;

import java.util.ArrayList;

/**
 *
 * @author LH
 */
public class DirectoryTreeNode
{
    private String parentNodeID,nodeID;//datenbankid oder Pfad
    private String Name;
    private boolean isDirectory;
    private ArrayList<String> additionalData;
    
    public DirectoryTreeNode(String lnodeID,String parentnodeID,String Name,boolean isDirectory)
    {
        parentNodeID=parentnodeID;
        nodeID=lnodeID;
        this.Name=Name;
        this.isDirectory=isDirectory;
        additionalData = new ArrayList<>();
        for (int i = 0; i < 10; i++)
        {
            additionalData.add("");//Buffer um genügend platz zu haben
        }
    }
    
    
    public String getParentID()
    {
        return parentNodeID;
    }
    public String getNodeID()
    {
        return nodeID;
    }
    public boolean isDirectory()
    {
        return isDirectory;
    }
    @Override
    public String toString()
    {        
        return Name;
    }
    public void addAdditionalData(int idx,String cnt)
    {
        additionalData.set(idx,cnt);
    }
    public String getAdditionalData(int idx)
    {
        return additionalData.get(idx);
    }
}
