|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
org.keridwen.core.data.model.impl.DefaultNode<T>
public class DefaultNode<T>
| Field Summary |
|---|
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Constructor Summary | |
|---|---|
DefaultNode(String name)
Creates an empty folder Node. |
|
DefaultNode(String name,
T contentToSet)
Creates a Node with the given name, initial content, NodeReader and NodeWriter. |
|
DefaultNode(String name,
URI anURI,
NodeReader<T> aReader,
NodeWriter aWriter)
Creates a Node with the given name, NodeReader and NodeWriter. |
|
| Method Summary | |
|---|---|
void |
clearContent()
Removes the content of the node. |
Node<?> |
getChildNodeByName(String nameToFind)
Gets the child Node with the given name. |
T |
getContent()
Gets the content of the Node. |
String |
getDescription()
Gets the String description of the Node |
String |
getName()
Gets the Node name. |
NodeInformation |
getNodeInformation()
Gets metadata information about the Node. |
NodeReader<T> |
getNodeReader()
Gets the NodeReader. |
NodeState |
getNodeState()
Gets the NodeState. |
URI |
getNodeURI()
Gets the URI where the Node is saved. |
nu.xom.Element |
getXmlElement()
Gets the XML description of the Node. |
boolean |
isContentLoaded()
Indicates whether the content of the node has been loaded in memory or not. |
boolean |
isContentLocal()
Indicates whether the content of the node is stored within the model or linked from outside. |
boolean |
isFolder()
Indicates if this Node is a folder Node or a leaf Node. |
Iterator<Node<?>> |
iterator()
|
void |
load(URI anURI)
Loads the Node content from the given URI. |
void |
reload()
Reloads the Node content |
void |
saveNode()
Saves the Node to its current URI |
void |
saveNodeAs(URI anURI)
Saves the Node to the given URI |
void |
setContentLocal(boolean innerContent)
Indicates whether the content of the node is stored within the model or linked from outside. |
void |
setName(String name)
Sets the Node name. |
void |
setNodeReader(NodeReader<T> aReader)
Sets the NodeReader. |
void |
setNodeState(NodeState stateToSet)
Sets the Node state. |
void |
setNodeURI(URI uriToSet)
Sets the Node URI. |
void |
setNodeWriter(NodeWriter aWriter)
Sets the NodeWriter. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.swing.tree.MutableTreeNode |
|---|
insert, remove, remove, removeFromParent, setParent, setUserObject |
| Methods inherited from interface javax.swing.tree.TreeNode |
|---|
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf |
| Constructor Detail |
|---|
public DefaultNode(String name,
T contentToSet)
Node with the given name, initial content, NodeReader and NodeWriter.
name - the Node namecontentToSet - the initial content of the Node
public DefaultNode(String name,
URI anURI,
NodeReader<T> aReader,
NodeWriter aWriter)
Node with the given name, NodeReader and NodeWriter.
name - the Node nameanURI - the Node URIaReader - the NodeReader to setaWriter - the NodeWriter to setpublic DefaultNode(String name)
Node.
name - the name of the Node| Method Detail |
|---|
public void setName(String name)
Node name.
name - the name to setpublic String getName()
NodeNode name.
getName in interface Node<T>Node namepublic NodeInformation getNodeInformation()
NodeNode.
getNodeInformation in interface Node<T>NodeInformation containing metadatapublic void setNodeState(NodeState stateToSet)
NodeNode state.
setNodeState in interface Node<T>stateToSet - the NodeState to set.public NodeState getNodeState()
NodeNodeState. Its state tells if the node has been removed, is up to date, has been newly created
...
getNodeState in interface Node<T>NodeState of the Nodepublic Iterator<Node<?>> iterator()
iterator in interface Iterable<Node<?>>iterator in interface Node<T>public T getContent()
NodeNode.
getContent in interface Node<T>public void reload()
NodeNode content
reload in interface Node<T>public void load(URI anURI)
NodeNode content from the given URI.
load in interface Node<T>public void saveNode()
NodeNode to its current URI
saveNode in interface Node<T>public void saveNodeAs(URI anURI)
NodeNode to the given URI
saveNodeAs in interface Node<T>public NodeReader<T> getNodeReader()
NodeNodeReader.
getNodeReader in interface Node<T>NodeReaderpublic void setNodeWriter(NodeWriter aWriter)
NodeNodeWriter.
setNodeWriter in interface Node<T>aWriter - the NodeWriter to setpublic void setNodeReader(NodeReader<T> aReader)
NodeNodeReader.
setNodeReader in interface Node<T>aReader - the NodeReader to setpublic boolean isFolder()
NodeNode is a folder Node or a leaf Node. A folder Node does not
have any content associated to it. It this does not have a NodeReader nor a NodeWriter.
isFolder in interface Node<T>true if the Node is a folder.public URI getNodeURI()
NodeURI where the Node is saved.
getNodeURI in interface Node<T>Node URIpublic void setNodeURI(URI uriToSet)
NodeNode URI.
setNodeURI in interface Node<T>uriToSet - the URI to setpublic boolean isContentLocal()
Node
isContentLocal in interface Node<T>public void setContentLocal(boolean innerContent)
Node
setContentLocal in interface Node<T>innerContent - the boolean value to setpublic nu.xom.Element getXmlElement()
NodeNode.
getXmlElement in interface Node<T>Node as a Xom Elementpublic Node<?> getChildNodeByName(String nameToFind)
Node with the given name.
nameToFind - the name of the child Node to find
Node found (if any, null otherwisepublic String getDescription()
NodeString description of the Node
getDescription in interface Node<T>String description of the Nodepublic void clearContent()
Node
clearContent in interface Node<T>public boolean isContentLoaded()
Node
isContentLoaded in interface Node<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||