|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.alveole.studio.web.data.NodeContainer
com.alveole.studio.web.data.NodePackage
public class NodePackage
This class represents a package. A package is a node that can contain other nodes. This kind of node is used to group parts of graph under a package (look like a directory). This enables a more readable graph.
| Field Summary | |
|---|---|
protected org.w3c.dom.Document |
extensions
A document to store plugins's specific extensions, that apply on this package. |
protected boolean |
forceLayout
Check if layout should be forced, after any import for example. |
protected java.util.ArrayList<NodeContainer> |
subNodes
List of all sub-nodes. |
| Fields inherited from class com.alveole.studio.web.data.NodeContainer |
|---|
ID, label, parent, project, uiPreferences |
| Constructor Summary | |
|---|---|
NodePackage(Project project,
NodePackage parent)
Constructor. |
|
| Method Summary | ||
|---|---|---|
|
getAdapter(java.lang.Class<T> cls)
Gets an adapter. |
|
NodeContainer |
getNodeByID(java.lang.String id)
Find a node given its ID. |
|
org.w3c.dom.Element |
getPluginElement(java.lang.String name)
Get plugin specific node (to store specific settings for that plugin on package). |
|
java.util.ArrayList<NodeContainer> |
getSubNodes()
Get a list of all sub-nodes. |
|
boolean |
isChildNode(NodeContainer child)
Check if a node is under this package (any descendants). |
|
boolean |
isForceLayout()
|
|
static void |
readNodes(Project project,
NodePackage parent,
org.w3c.dom.Element current,
java.util.ArrayList<NodeContainer> subNodes)
Unserialize some sub-nodes contained in this package. |
|
void |
serialize(org.w3c.dom.Element parent)
Stored this package contents in XML node. |
|
void |
setForceLayout(boolean forceLayout)
|
|
void |
setSubNodes(java.util.ArrayList<NodeContainer> subNodes)
Sets a list of sub-nodes. |
|
void |
unserialize(org.w3c.dom.Element element)
Read package contents from XML. |
|
| Methods inherited from class com.alveole.studio.web.data.NodeContainer |
|---|
getID, getLabel, getParent, getProject, getUiPreferences, serializeUiPrefs, setID, setLabel, setParent, setProject, setUiPreferences, unserializeUiPrefs |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.ArrayList<NodeContainer> subNodes
protected org.w3c.dom.Document extensions
protected boolean forceLayout
| Constructor Detail |
|---|
public NodePackage(Project project,
NodePackage parent)
project - The project.parent - A parent package.| Method Detail |
|---|
public void serialize(org.w3c.dom.Element parent)
serialize in class NodeContainerparent - The parent XML node.
public static void readNodes(Project project,
NodePackage parent,
org.w3c.dom.Element current,
java.util.ArrayList<NodeContainer> subNodes)
throws javax.xml.xpath.XPathException
project - The current project.parent - The current package to read in.current - The current XML element in DOM document.subNodes - List of returned sub-nodes for this package.
javax.xml.xpath.XPathExceptionpublic org.w3c.dom.Element getPluginElement(java.lang.String name)
public void unserialize(org.w3c.dom.Element element)
throws javax.xml.xpath.XPathException
unserialize in class NodeContainerelement - The current XMl tag.
javax.xml.xpath.XPathException - If XPath error.public NodeContainer getNodeByID(java.lang.String id)
id - A unique ID to find in sub-nodes.
public boolean isChildNode(NodeContainer child)
child - The child node.
public java.util.ArrayList<NodeContainer> getSubNodes()
public void setSubNodes(java.util.ArrayList<NodeContainer> subNodes)
subNodes - direct descendants.public <T> T getAdapter(java.lang.Class<T> cls)
getAdapter in class NodeContainercls - A target class.
public boolean isForceLayout()
public void setForceLayout(boolean forceLayout)
forceLayout - the forceLayout to set
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||