|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.instantreality.InstantIO.Namespace
org.instantreality.InstantIO.Node
org.instantreality.InstantIO.InlineNode
public final class InlineNode
A simple Node that loads its contents from a file.
By using the StateKeeperXML
class, you can save
the contents of a namespace, e.g. a subtree of the data
flow graph consisting of namespaces, nodes and routes,
to an XML file. By using the InlineNode, you can later
integrate the saved subtree into other data flow graphs.
The InlineNode takes an URL as parameter where the XML
file is located. When it gets enabled, it reconstructs the
subtree from that XML file and puts it into itself. This
means that you can partition your data flow graph into
smaller "macros" that can be combined into one single
data flow graph later on by using InlineNodes.
The following example demonstrates how to create a new InlineNode that reads its contents from a file "macro.xml" located in the current working directory:
InlineNode inlineNode = new InlineNode(); inlineNode.setURL("macro.xml"); // The following call automatically enables the InlineNode // and loads its contents from the URL: Root.the().addNamespace(inlineNode);
StateKeeperXML
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.instantreality.InstantIO.Namespace |
---|
Namespace.Listener |
Field Summary | |
---|---|
static Field[] |
fields
Defines the fields of the InlineNode. |
Fields inherited from class org.instantreality.InstantIO.Node |
---|
NODE_DISABLED, NODE_ERROR, NODE_RUNNING, NODE_SLEEPING |
Constructor Summary | |
---|---|
InlineNode()
Creates the new InlineNode object. |
Method Summary | |
---|---|
java.lang.String |
getURL()
Returns the URL of the file the namespace is read from. |
protected void |
initialize()
Initializes the InlineNode object. |
boolean |
saveState()
Returns if the contents of this Node should be saved. |
void |
setURL(java.lang.String url)
Sets the URL of the file the namespace is read from. |
NodeType |
type()
Returns meta information about the InlineNode. |
Methods inherited from class org.instantreality.InstantIO.Node |
---|
addLog, getDetailedInfo, getFieldNames, getFieldValue, getLog, getShortInfo, getState, newData, setFieldValue, setState, setState, shutdown, start, startInSlot, startOutSlot, stop, stopInSlot, stopOutSlot, typeName |
Methods inherited from class org.instantreality.InstantIO.Namespace |
---|
addExternalRoute, addInSlot, addListener, addNamespace, addNamespace, addOutSlot, addRoute, clear, clearExternalRoutes, clearNamespaces, clearRoutes, dirty, disable, dispose, enable, enabled, finalize, getBaseURL, getLabel, removeExternalRoute, removeInSlot, removeListener, removeNamespace, removeOutSlot, removeRoute, setBaseURL, setDirty, setFieldValues |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Field[] fields
Constructor Detail |
---|
public InlineNode()
Method Detail |
---|
public void setURL(java.lang.String url)
url
- The URL of the file.Namespace.setBaseURL(java.net.URL)
,
Namespace.getBaseURL()
public java.lang.String getURL()
protected void initialize()
initialize
in class Node
public boolean saveState()
saveState
in class Namespace
public NodeType type()
type
in class Node
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |