org.primordion.xholon.base
Class ContainmentHierarchy

java.lang.Object
  extended byorg.primordion.xholon.base.Xholon
      extended byorg.primordion.xholon.base.ContainmentHierarchy
All Implemented Interfaces:
IContainmentHierarchy, IXholon

public class ContainmentHierarchy
extends Xholon
implements IContainmentHierarchy

A ContainmentHierarchy represents a hierarchy (tree) of Xholon nodes contained within other Xholon nodes. This is called a Composite Structure in UML. It encapsulates the root node of a Xholon hierarchy (rootNode). A primary role of the ContainmentHierarchy is to read a Xholon hierarchy in from a file (ex: CompositeStructureHierarchy.xml), and store the nodes in a tree.

Since:
0.1 (Created on Sept 7, 2005)
Author:
Ken Webb

Field Summary
 
Fields inherited from class org.primordion.xholon.base.Xholon
DEFAULT_LEVEL, interaction, interactionsEnabled
 
Fields inherited from interface org.primordion.xholon.base.IContainmentHierarchy
COMMENT_CHAR
 
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
 
Constructor Summary
ContainmentHierarchy(int maxXholons)
          Constructor.
 
Method Summary
 void deleteContainmentHierarchy()
          Delete the containment hierarchy.
 IXholon getTheRootNode()
          Get the root node of the containment (composite structure) hierarchy.
static java.lang.String getXincludePath()
          Get parameter XInclude path.
 void populateAllFromFile(java.lang.String fileName)
          Populate all instances of Xholon from a file.
 void printContainmentHierarchy()
          Print out the Xholon names, in tree order.
 void setInheritanceHierarchy(IInheritanceHierarchy ih)
          Set InheritanceHierarchy instance.
 void setTreeNodeFactory(ITreeNodeFactory f)
          Set singleton TreeNodeFactory instance.
static void setXincludePath(java.lang.String xiPath)
          Set parameter XInclude path.
 
Methods inherited from class org.primordion.xholon.base.Xholon
act, appendChild, appendChild, appendChild, cleanup, configure, configure, createStructure, decVal, decVal, depth, draw, getChildNodes, getFirstChild, getFirstSibling, getId, getLastChild, getLastSibling, getName, getNeighbors, getNextId, getNextSibling, getNthChild, getNthSibling, getNumChildren, getNumSiblings, getParentNode, getPort, getPreviousSibling, getRoleName, getRootNode, getSiblings, getSizeMessageQ, 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, resetNextId, sendMessage, sendMessage, sendMessage, setAttributeVal, setFactory, setFirstChild, setId, setNextSibling, setParentChildLinks, setParentNode, setParentSiblingLinks, setPorts, setRoleName, setSizeMessageQ, setUid, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVariableValue, setXhc, swapNode, terminate, toString, treeSize, writeXml
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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
 

Constructor Detail

ContainmentHierarchy

public ContainmentHierarchy(int maxXholons)
Constructor.

Parameters:
maxXholons - no longer used
Method Detail

deleteContainmentHierarchy

public void deleteContainmentHierarchy()
Description copied from interface: IContainmentHierarchy
Delete the containment hierarchy.

Specified by:
deleteContainmentHierarchy in interface IContainmentHierarchy

setTreeNodeFactory

public void setTreeNodeFactory(ITreeNodeFactory f)
Description copied from interface: IContainmentHierarchy
Set singleton TreeNodeFactory instance.

Specified by:
setTreeNodeFactory in interface IContainmentHierarchy
Parameters:
f - The TreeNodeFactory instance.

setXincludePath

public static void setXincludePath(java.lang.String xiPath)
Set parameter XInclude path.

Parameters:
xiPath - The path ex: "./config/_common/" .

getXincludePath

public static java.lang.String getXincludePath()
Get parameter XInclude path.

Returns:
The path.

setInheritanceHierarchy

public void setInheritanceHierarchy(IInheritanceHierarchy ih)
Description copied from interface: IContainmentHierarchy
Set InheritanceHierarchy instance.

Specified by:
setInheritanceHierarchy in interface IContainmentHierarchy
Parameters:
ih - The InheritanceHierarchy instance.

getTheRootNode

public IXholon getTheRootNode()
Description copied from interface: IContainmentHierarchy
Get the root node of the containment (composite structure) hierarchy.

Specified by:
getTheRootNode in interface IContainmentHierarchy
Returns:
The root node.

populateAllFromFile

public void populateAllFromFile(java.lang.String fileName)
Description copied from interface: IContainmentHierarchy
Populate all instances of Xholon from a file. The file must contain a composite structure hierarchy in XML format.

Specified by:
populateAllFromFile in interface IContainmentHierarchy
Parameters:
fileName - Name of the file. (ex: CompositeStructureHierarchy.xml)

printContainmentHierarchy

public void printContainmentHierarchy()
Description copied from interface: IContainmentHierarchy
Print out the Xholon names, in tree order.

Specified by:
printContainmentHierarchy in interface IContainmentHierarchy