|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmaspack.properties.PropTreeCell
public class PropTreeCell
Container class for organizing property information into a tree.
Constructor Summary | |
---|---|
PropTreeCell()
|
|
PropTreeCell(PropertyInfo info,
java.lang.Object value)
|
|
PropTreeCell(PropTreeCell cell)
|
|
PropTreeCell(PropTreeData data)
|
Method Summary | |
---|---|
PropTreeCell |
addChild(PropertyInfo info,
java.lang.Object value)
|
void |
addChild(PropTreeCell child)
|
void |
addChildren(PropTreeCell root)
Adds the children of root to this cell. |
void |
addCopyOfChildrenAndData(PropTreeCell cell)
Add to this node's children a copy of all the children (and their data objects) of cell. |
void |
addExplicitPropertyTree(HasProperties host)
Recursively populates this cell with all the explicitly set inheritable properties accessible from a given host. |
void |
addLeafProperties(HasProperties host)
|
void |
addNonexplicitPropertyTree(HasProperties host)
Recursively populates this cell with all the non-explicitly set inheritable properties accessible from a given host. |
PropTreeCell |
copyChildren()
Make a copy of this cell and it's first level of children that share's the same data cells as this cell. |
PropTreeCell |
copyTree()
Returns a copy of the property tree whose root is this cell, while preserving the original data objects. |
static PropTreeCell |
copyTree(PropTreeCell cell)
|
PropTreeCell |
copyTreeAndData()
Returns a complete copy of the property tree whose root is this cell, including copies of all data objects. |
PropTreeCell |
copyTreeChanges(PropTreeCell oldTree)
|
static PropTreeCell |
copyTreeUntil(PropTreeCell cell,
PropTreeCell end)
|
PropTreeCell |
createPathToRoot()
Creates a new path of property cells from this cell all the way back to the root cell. |
void |
detachFromParent()
|
PropTreeCell |
extendToHierarchyNode(HasProperties host)
Extends this property tree all the way back to the hierarchy node associated with a particular host. |
java.lang.Object |
findInheritedValue(HierarchyNode node)
Climbs a hierarchy to find the inherited value for the property path defined by this cell. |
PropTreeCell |
findMatchingChild(PropertyInfo info)
Finds the child of this cell whose property matches the specified property information. |
static PropertyInfo |
findMatchingProperty(HasProperties host,
PropertyInfo info)
Finds the property contained by a host that matches a specified property. |
PropTreeCell |
getChild(java.lang.String name)
|
PropTreeCell |
getDescendant(java.lang.String path)
|
java.lang.Object |
getExplicitValue(HasProperties host)
Gets the explicit value, if possible, within a specfic host for the property path defined by this cell. |
PropTreeCell |
getFirstChild()
|
int |
getIndex()
Returns the index of this cell with respect to its parent, or -1 if it has no parent. |
int[] |
getIndexPath()
Returns a path of indices that locate this cell starting from the root of the hierarchy. |
PropertyInfo |
getInfo()
|
PropertyMode |
getMode()
|
PropTreeCell |
getNext()
|
PropTreeCell |
getParent()
|
java.lang.Object |
getValue()
|
boolean |
hasChildren()
|
void |
inheritTreeValuesFromHierachy(HierarchyNode node)
Climbs a hierarchy to determine all inherited values for the property tree defined by this cell. |
void |
inheritTreeValuesFromHost(HasProperties host)
Sets cell values within this property tree from any explicitly-set matching properties in a specific host. |
int |
numChildren()
|
int |
numLeafCells()
|
java.lang.String |
pathString()
|
void |
printTree(java.io.PrintStream ps)
|
void |
removeAllChildren()
|
void |
removeChild(PropTreeCell child)
|
void |
removeDescendant(PropTreeCell cell)
|
boolean |
removeDescendant(java.lang.String path)
|
void |
setData(PropertyInfo info,
java.lang.Object value)
|
void |
setData(PropTreeData data)
|
void |
setLeafValuesVoid()
|
void |
setMode(PropertyMode mode)
|
boolean |
setSingleEditDefaultValues()
Rescursively descends this tree and, for any property whose editing property is Single, sets its value to the default value. |
void |
setTreeSingleEditDefaultValuesInHost(HasProperties dstHost,
HasProperties srcHost)
Uses the values contained with this property tree to set any matching properties within a specific destinate host. |
void |
setTreeValuesInHost(HasProperties dstHost,
HasProperties srcHost)
Uses the values contained with this property tree to set any matching properties within a specific destinate host. |
void |
setValue(java.lang.Object value)
|
java.lang.String |
treeString()
|
PropTreeCell |
updateTreeValuesInHost(HasProperties host,
boolean reduce)
Uses the values contained with this property tree to update any matching non-explicit properties within a specific host. |
void |
validate()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropTreeCell(PropertyInfo info, java.lang.Object value)
public PropTreeCell(PropTreeData data)
public PropTreeCell()
public PropTreeCell(PropTreeCell cell)
Method Detail |
---|
public PropertyMode getMode()
public void setMode(PropertyMode mode)
public java.lang.Object getValue()
public void setValue(java.lang.Object value)
public PropertyInfo getInfo()
public PropTreeCell addChild(PropertyInfo info, java.lang.Object value)
public void addChildren(PropTreeCell root)
public void setData(PropertyInfo info, java.lang.Object value)
public void setData(PropTreeData data)
public void addChild(PropTreeCell child)
public boolean hasChildren()
public PropTreeCell getFirstChild()
public PropTreeCell getNext()
public void removeChild(PropTreeCell child)
public void removeAllChildren()
public void setLeafValuesVoid()
public void addCopyOfChildrenAndData(PropTreeCell cell)
public PropTreeCell copyChildren()
public static PropTreeCell copyTree(PropTreeCell cell)
public PropTreeCell copyTree()
public PropTreeCell copyTreeAndData()
public static PropTreeCell copyTreeUntil(PropTreeCell cell, PropTreeCell end)
public void detachFromParent()
public void printTree(java.io.PrintStream ps)
public PropTreeCell getChild(java.lang.String name)
public int getIndex()
public int[] getIndexPath()
public PropTreeCell getDescendant(java.lang.String path)
public PropTreeCell getParent()
public boolean removeDescendant(java.lang.String path)
public void removeDescendant(PropTreeCell cell)
public int numChildren()
public void addLeafProperties(HasProperties host)
public void addExplicitPropertyTree(HasProperties host)
host
- property hostpublic PropTreeCell extendToHierarchyNode(HasProperties host)
host
- property host associated with the target hierarchy node
public PropTreeCell createPathToRoot()
extendToHierarchyNode
in that this cell is assumed
to belong to an existing tree and therefore should not be modified.
public void addNonexplicitPropertyTree(HasProperties host)
host
- property hostpublic PropTreeCell copyTreeChanges(PropTreeCell oldTree)
public PropTreeCell findMatchingChild(PropertyInfo info)
public static PropertyInfo findMatchingProperty(HasProperties host, PropertyInfo info)
host
- property host in which to searchinfo
- information for specified property
public PropTreeCell updateTreeValuesInHost(HasProperties host, boolean reduce)
This method will also return a property tree which is suitable for
propagation to descendant nodes within the hierarchy. The returned tree
may be this tree or a modified copy of this tree. In particular, if
reduce
is true and the host contains matching non-explicit
properties, then a copy of this tree is made with the associated property
cells removed A returned value of null
indicates an empty
tree and implies that propagation should stop.
host
- property host to updatereduce
- if true, creates a copy of this tree with matching properties removed
public void setTreeValuesInHost(HasProperties dstHost, HasProperties srcHost)
If the tree contains any unexpanded composite properties, the source host is used to provide these instead.
dstHost
- property host to updatesrcHost
- source for undefined property valuespublic void inheritTreeValuesFromHost(HasProperties host)
host
- property hostpublic java.lang.Object getExplicitValue(HasProperties host)
host
- property host
public void inheritTreeValuesFromHierachy(HierarchyNode node)
node
- base node whose ancestors are to supply the inheritancepublic java.lang.Object findInheritedValue(HierarchyNode node)
node
- base node whose ancestors are to supply the inheritancepublic boolean setSingleEditDefaultValues()
public void setTreeSingleEditDefaultValuesInHost(HasProperties dstHost, HasProperties srcHost)
If the tree contains any unexpanded composite properties, the source host is used to provide these instead.
dstHost
- property host to updatesrcHost
- source for undefined property valuespublic int numLeafCells()
public java.lang.String treeString()
public java.lang.String pathString()
public void validate()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |