org.primordion.xholon.app
Interface IApplication

All Superinterfaces:
IXholon
All Known Implementing Classes:
Application

public interface IApplication
extends IXholon

Every Xholon application proceeds through three phases, which are declared in this interface: (1) initialize, (2) process, (3) wrapup. Applications also need to read their configuration from a file.

Since:
0.1 (Created on Jul 28, 2005)
Author:
Ken Webb

Field Summary
 
Fields inherited from interface org.primordion.xholon.base.IXholon
DEFAULT_SIZE_MSG_Q, NINCLUDE_PSC, NINCLUDE_PSx, NINCLUDE_PxC, NINCLUDE_Pxx, NINCLUDE_xSC, NINCLUDE_xSx, NINCLUDE_xxC, NINCLUDE_xxx
 
Method Summary
 void about()
          Display brief information about Xholon and the application.
 Control getAppRoot()
          Get the application root.
 int getControllerState()
          Get state of the controller.
 java.lang.String getModelName()
          Get the model name.
 IXholon getRoot()
          Get the model root.
 void information()
          Display detailed information about the application.
 void initControl()
          Initialize the control aspects of the application.
 void initGui(java.lang.Object gui)
          Initialize the GUI.
 void initialize(java.lang.String configFileName)
          Initialize the application.
 void initViewers()
          Initialize any View tools to be used by the application.
 IViewer invokeDataPlotter()
          Invoke the data plotter.
 IViewer invokeGraphicalNetworkViewer()
          Invoke the graphical network viewer.
 IViewer invokeGraphicalNetworkViewer(IXholon xhStart, java.lang.String graphicalNetworkViewerParams)
          Invoke the graphical network viewer.
 IViewer invokeGraphicalTreeViewer()
          Invoke the graphical tree viewer.
 IViewer invokeGraphicalTreeViewer(IXholon xhStart, java.lang.String graphicalNetworkViewerParams)
          Invoke the graphical tree viewer.
 IViewer invokeHistogramPlotter()
          Invoke the histogram plotter.
 IViewer invokeInteraction()
          Invoke the interaction viewer.
 void process()
          Process time steps during the lifetime of the application.
 void readConfigFromFileXml(java.lang.String fileName)
          Read configuration values from an XML file.
 void resetViewers()
          Reset all viewers to their default values.
 void saveSnapshot()
          Save snapshot of the xholon tree.
 void setControllerState(int controllerState)
          Set state of the controller for this app.
 boolean setParam(java.lang.String pName, java.lang.String pValue)
          Set the value of a parameter.
 void wrapup()
          Wrapup any unfinished business in the application.
 
Methods inherited from interface org.primordion.xholon.base.IXholon
act, appendChild, appendChild, appendChild, cleanup, configure, configure, createStructure, decVal, decVal, depth, draw, getChildNodes, getFirstChild, getFirstSibling, getId, getLastChild, getLastSibling, getName, getNeighbors, getNextSibling, getNthChild, getNthSibling, getNumChildren, getNumSiblings, getParentNode, getPort, getPreviousSibling, getRoleName, getRootNode, getSiblings, getUid, getVal_boolean, getVal_byte, getVal_char, getVal_double, getVal_float, getVal_int, getVal_long, getVal_Object, getVal_short, getVal_String, getVal, getXhc, getXhcId, getXhcName, getXhType, handleNodeSelection, hasAncestor, hasChildNodes, hasChildOrSiblingNodes, hasNextSibling, hasParentNode, height, incVal, incVal, initialize, initStatics, inOrderPrint, insertAfter, insertBefore, insertFirstChild, isActiveObject, isBound, isContainer, isExternal, isInternal, isLeaf, isPassiveObject, isRootNode, performActivity, performActivity, performBooleanActivity, performBooleanActivity, performDoubleActivity, performGuard, performVoidActivity, postAct, postConfigure, postOrderPrint, postReconfigure, preAct, preConfigure, preOrderPrint, preReconfigure, print, println, processMessageQ, processReceivedMessage, reconfigure, remove, removeChild, sendMessage, sendMessage, sendMessage, setAttributeVal, setFirstChild, setId, setNextSibling, setParentChildLinks, setParentNode, setParentSiblingLinks, setPorts, setRoleName, setUid, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVariableValue, setXhc, swapNode, terminate, treeSize, writeXml
 

Method Detail

initialize

public void initialize(java.lang.String configFileName)
Initialize the application.

Parameters:
configFileName - Name of the configuration file.

process

public void process()
Process time steps during the lifetime of the application.


wrapup

public void wrapup()
Wrapup any unfinished business in the application.


readConfigFromFileXml

public void readConfigFromFileXml(java.lang.String fileName)
Read configuration values from an XML file.

Parameters:
fileName - Name of the configuration file. ex: Config_HelloWorld.xml

setParam

public boolean setParam(java.lang.String pName,
                        java.lang.String pValue)
Set the value of a parameter.

Parameters:
pName - Parameter name.
pValue - Parameter value.

setControllerState

public void setControllerState(int controllerState)
Set state of the controller for this app.

Parameters:
controllerState - The current controller state.

getControllerState

public int getControllerState()
Get state of the controller.

Returns:
The current controller state.

getRoot

public IXholon getRoot()
Get the model root.

Returns:
The model root.

getAppRoot

public Control getAppRoot()
Get the application root.

Returns:
The application root.

initGui

public void initGui(java.lang.Object gui)
Initialize the GUI.

Parameters:
gui - The JTree gui.

initControl

public void initControl()
Initialize the control aspects of the application.


resetViewers

public void resetViewers()
Reset all viewers to their default values. This should be done when a new model is run after a previous one.


initViewers

public void initViewers()
Initialize any View tools to be used by the application.


saveSnapshot

public void saveSnapshot()
Save snapshot of the xholon tree.


about

public void about()
Display brief information about Xholon and the application.


information

public void information()
Display detailed information about the application.


getModelName

public java.lang.String getModelName()
Get the model name.

Returns:
The name of this model.

invokeGraphicalTreeViewer

public IViewer invokeGraphicalTreeViewer()
Invoke the graphical tree viewer.


invokeGraphicalTreeViewer

public IViewer invokeGraphicalTreeViewer(IXholon xhStart,
                                         java.lang.String graphicalNetworkViewerParams)
Invoke the graphical tree viewer.

Parameters:
xhStart - The start node whose contents will be graphed.
graphicalNetworkViewerParams - A set of comma-delimited parameters.

invokeGraphicalNetworkViewer

public IViewer invokeGraphicalNetworkViewer()
Invoke the graphical network viewer.


invokeGraphicalNetworkViewer

public IViewer invokeGraphicalNetworkViewer(IXholon xhStart,
                                            java.lang.String graphicalNetworkViewerParams)
Invoke the graphical network viewer.

Parameters:
xhStart - The start node whose contents will be graphed.
graphicalNetworkViewerParams - A set of comma-delimited parameters.

invokeDataPlotter

public IViewer invokeDataPlotter()
Invoke the data plotter.


invokeHistogramPlotter

public IViewer invokeHistogramPlotter()
Invoke the histogram plotter.


invokeInteraction

public IViewer invokeInteraction()
Invoke the interaction viewer.