org.primordion.xholon.base
Interface IInheritanceHierarchy

All Superinterfaces:
IXholon
All Known Implementing Classes:
InheritanceHierarchy

public interface IInheritanceHierarchy
extends IXholon

An InheritanceHierarchy represents a hierarchy (tree) of XholonClass nodes that inherit from other XholonClass nodes. It encapsulates the root node of a XholonClass hierarchy (rootNode). Primary roles of the InheritanceHierarchy are: (1) to read a XholonClass hierarchy in from a file (ex: InheritanceHierarchy.xml) and store the nodes in a tree, and (2) to read XholonClass details in from a file (ex: ClassDetails.txt).

Since:
0.6 (Created on April 16, 2007)
Author:
Ken Webb

Field Summary
static int CLASSID_NOT_FOUND
           
static int EOF
           
static int GETCLASSNODE_HASHTABLE
           
static int GETCLASSNODE_TREESEARCH
           
static char NAVINFO_SEPARATOR
           
static int NEXTIDLOCAL_INITIAL
           
 
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
 XholonClass getClassNode(int xhClassId)
          Get reference to a XholonClass node, specified by its numeric ID.
 XholonClass getClassNode(java.lang.String xhClassName)
          Get reference to a XholonClass node, specified by its name.
 XholonClass getTheRootNode()
          Get the root node of the inheritance hierarchy.
 void populateAttributesFromFile(java.lang.String fileName)
          Populate ports, attributes and other class details from file.
 void populateFromFile(java.lang.String fileName)
          Populate the tree by reading items from a file.
 void printInheritanceHierarchy()
          Print out the XholonClass names, in tree order.
 void setTreeNodeFactory(ITreeNodeFactory f)
          Set singleton TreeNodeFactory.
 
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
 

Field Detail

EOF

public static final int EOF
See Also:
Constant Field Values

CLASSID_NOT_FOUND

public static final int CLASSID_NOT_FOUND
See Also:
Constant Field Values

NAVINFO_SEPARATOR

public static final char NAVINFO_SEPARATOR
See Also:
Constant Field Values

NEXTIDLOCAL_INITIAL

public static final int NEXTIDLOCAL_INITIAL
See Also:
Constant Field Values

GETCLASSNODE_TREESEARCH

public static final int GETCLASSNODE_TREESEARCH
See Also:
Constant Field Values

GETCLASSNODE_HASHTABLE

public static final int GETCLASSNODE_HASHTABLE
See Also:
Constant Field Values
Method Detail

setTreeNodeFactory

public void setTreeNodeFactory(ITreeNodeFactory f)
Set singleton TreeNodeFactory.

Parameters:
f - The TreeNodeFactory instance.

getClassNode

public XholonClass getClassNode(int xhClassId)
Get reference to a XholonClass node, specified by its numeric ID.

Parameters:
xhClassId - The numeric ID.
Returns:
An instance of XholonClass.

getClassNode

public XholonClass getClassNode(java.lang.String xhClassName)
Get reference to a XholonClass node, specified by its name.

Parameters:
xhClassName - Name of the XholonClass (ex: "HelloWorld").
Returns:
An instance of XholonClass, or null.

getTheRootNode

public XholonClass getTheRootNode()
Get the root node of the inheritance hierarchy.

Returns:
The root node.

populateFromFile

public void populateFromFile(java.lang.String fileName)
Populate the tree by reading items from a file.

Parameters:
fileName - The name of the inheritance hierarchy file (ex: InheritanceHierarchy.xml).

populateAttributesFromFile

public void populateAttributesFromFile(java.lang.String fileName)
Populate ports, attributes and other class details from file.

Parameters:
fileName - Name of the file containing the XholonClass details (ex: ClassDetails.xml).

printInheritanceHierarchy

public void printInheritanceHierarchy()
Print out the XholonClass names, in tree order.