org.molgenis.standardsregistry.utils.PackageTreeNode Maven / Gradle / Ivy
package org.molgenis.standardsregistry.utils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class PackageTreeNode
{
private final String title;
private final String key;
private final boolean folder;
private List children = null;
private String tooltip;
private boolean expanded;
private Map data;
private final String extraClasses;
public PackageTreeNode(String extraClasses, String title, String key, String tooltip, boolean folder,
boolean expanded, Map data)
{
this(extraClasses, title, key, tooltip, folder, expanded, data, null);
}
public PackageTreeNode(String extraClasses, String title, String key, String tooltip, boolean folder,
boolean expanded, Map data, List children)
{
this.title = title;
this.key = key.replace(' ', '_');
this.tooltip = tooltip;
this.folder = folder;
this.expanded = expanded;
this.data = data;
this.children = children;
this.extraClasses = extraClasses;
}
public Map getData()
{
return data;
}
public void setData(Map data)
{
this.data = data;
}
public boolean isExpanded()
{
return expanded;
}
public void setExpanded(boolean expanded)
{
this.expanded = expanded;
}
public String getTitle()
{
return title;
}
public String getKey()
{
return key;
}
public boolean isFolder()
{
return folder;
}
public List getChildren()
{
return children;
}
public void addChild(PackageTreeNode child)
{
if (children == null)
{
children = new ArrayList();
}
children.add(child);
}
public String getTooltip()
{
return tooltip;
}
public void setTooltip(String tooltip)
{
this.tooltip = tooltip;
}
public String getExtraClasses()
{
return extraClasses;
}
}