|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.eng.spagobi.engines.qbe.crosstable.Node
public class Node
Field Summary | |
---|---|
static java.lang.String |
CROSSTAB_NODE_JSON_CHILDS
|
static java.lang.String |
CROSSTAB_NODE_JSON_DESCRIPTION
|
static java.lang.String |
CROSSTAB_NODE_JSON_KEY
|
Constructor Summary | |
---|---|
Node(java.lang.String value)
|
|
Node(java.lang.String value,
java.lang.String description)
|
Method Summary | |
---|---|
void |
addChild(Node child)
|
void |
addOrderedChild(Node child)
|
void |
buildSubTree(int height,
int branch)
For test |
Node |
clone()
Clone only the value and the children |
int |
compareTo(Node arg0)
|
boolean |
equals(java.lang.Object obj)
|
CrossTab.CellType |
getCellType()
|
java.util.List<Node> |
getChilds()
|
java.lang.String |
getDescription()
|
int |
getDistanceFromLeaves()
Returns the level distance between the node and its leaves (it is assumed that the tree is balanced, therefore every leaf has the same distance to this node). |
int |
getDistanceFromRoot()
Returns the depth level of the node: root is depth 0, its children are depth 1 and so on... |
int |
getLeafPosition()
|
java.util.List<java.lang.Integer> |
getLeafPositionsForCF()
|
java.util.List<Node> |
getLeafs()
Return the list of leafs of the subtree with this node as radix |
int |
getLeafsNumber()
Get the number of leafs in the tree |
java.util.List<Node> |
getLevel(int level)
return the list of nodes of the passed level |
int |
getRightMostLeafPositionCF()
|
int |
getSubTreeDepth()
|
java.lang.String |
getValue()
|
int |
hashCode()
|
boolean |
isChild(Node child)
|
void |
orderedSubtree()
|
void |
removeNodeFromTree()
Remove this node from the tree.. |
void |
setCellType(CrossTab.CellType cellType)
|
void |
setChilds(java.util.List<Node> childs)
|
void |
setLeafPositions()
Initialize the variable leafPosition |
void |
setLeafPositionsForCF(java.util.List<java.lang.Integer> leafPositionsForCF)
|
org.json.JSONObject |
toJSONObject()
Serialize the node and the subtree |
java.lang.String |
toString()
|
void |
updateFathers()
Update the fathers of this tree |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CROSSTAB_NODE_JSON_CHILDS
public static final java.lang.String CROSSTAB_NODE_JSON_KEY
public static final java.lang.String CROSSTAB_NODE_JSON_DESCRIPTION
Constructor Detail |
---|
public Node(java.lang.String value)
public Node(java.lang.String value, java.lang.String description)
Method Detail |
---|
public java.lang.String getValue()
public java.lang.String getDescription()
public java.util.List<Node> getChilds()
public void setChilds(java.util.List<Node> childs)
public void addOrderedChild(Node child)
public void addChild(Node child)
public boolean isChild(Node child)
public int getLeafsNumber()
public org.json.JSONObject toJSONObject() throws org.json.JSONException
org.json.JSONException
public int getLeafPosition()
public void setLeafPositions()
public java.util.List<java.lang.Integer> getLeafPositionsForCF()
public void setLeafPositionsForCF(java.util.List<java.lang.Integer> leafPositionsForCF)
public java.util.List<Node> getLevel(int level)
level
-
public int getDistanceFromRoot()
public int getDistanceFromLeaves()
public java.util.List<Node> getLeafs()
public void updateFathers()
public int getSubTreeDepth()
public void removeNodeFromTree()
public int getRightMostLeafPositionCF()
public Node clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void buildSubTree(int height, int branch)
height
- branch
- public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public CrossTab.CellType getCellType()
public void setCellType(CrossTab.CellType cellType)
public int compareTo(Node arg0)
compareTo
in interface java.lang.Comparable<Node>
public void orderedSubtree()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |