public abstract class XBRLStructuralNode extends java.lang.Object implements StructuralNodeInterface
| Constructor and Description |
|---|
XBRLStructuralNode(XBRLDefinitionNodeUse base,
XBRLStructuralNode parent,
java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.Object,AspectAndDistanceToLeaf>> mergeAspects,
java.lang.String mergeTagSelectors)
Creates an instance of a TableStructuralNode and collects all aspects indicated
in the definition node indicated in the base parameter.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addChild(XBRLStructuralNode child)
Append a new children to this tree node.
|
void |
addMergeAspect(Aspect<?> as)
Adds the merge aspect.
|
java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.Object,AspectAndDistanceToLeaf>> |
collectAspects()
Collect aspects on this node and returns a structure with aspects indexed by tag.
|
static XBRLStructuralNode[] |
create(XBRLDefinitionNodeUse dnu,
XBRLStructuralNode parent,
java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.Object,AspectAndDistanceToLeaf>> mergeAspects,
java.lang.String mergeTagSelectors,
XBRLStructuralTable xbrlTable,
HasParentChildAttribute.ParentChildEnum parentChildValue)
Factory method to create either an open structural node or a closed structural node depending
on the definition node.
|
static XBRLStructuralNode |
create(XBRLDefinitionNodeUse dnu,
XBRLStructuralNode parent,
java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.Object,AspectAndDistanceToLeaf>> mergeAspects,
java.lang.String mergeTagSelectors,
XBRLStructuralTable xbrlTable,
RelationshipGraphNode.Node<?> node)
Creates the.
|
static XBRLStructuralNode |
createRollup(XBRLStructuralNode parent,
java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.Object,AspectAndDistanceToLeaf>> mergeAspects,
java.lang.String mergeTagSelectors)
Factory method to create a roll-up structural node.
|
java.util.Iterator<AspectAndDistanceToLeaf> |
getAspects(java.lang.String tag)
Allows to iterate all aspects on this node.
|
XBRLDefinitionNodeUse |
getBase()
Access to the XBRLDefinitionNodeUse element that is the source of this
TableStructuralNode.
|
java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.Object,AspectAndDistanceToLeaf>> |
getConsolidatedAspects()
Gets the consolidated aspects.
|
int |
getDistanceToLeaf()
Gets the distance to leaf.
|
abstract java.lang.String |
getLabel(CellHeader cell)
Returns a label that represents the structural node.
|
java.util.Iterator<AspectAndDistanceToLeaf> |
getLocalAspects(java.lang.String tag)
Allows to iterate all aspects on this node.
|
java.util.Iterator<java.lang.String> |
getLocalTags()
Gets the local tags.
|
java.lang.String |
getMergeTagSelector()
Gets the merge tag selector.
|
XBRLStructuralNode |
getNodeAt(int index)
Access a specific TableStructuralNode by index.
|
int |
getNodeCount()
Number of children nodes.
|
java.util.Iterator<XBRLStructuralNode> |
getNodes()
Allows to iterate all nodes in the right representation order.
|
XBRLStructuralNode |
getParent()
Access to the parent node of this StructuralNodeInterface.
|
java.util.Iterator<java.lang.String> |
getTags()
Gets the tags.
|
java.util.HashSet<java.lang.String> |
getTagSelector()
if a tag selector exists in the surrounding definition node.
|
abstract int |
getValueCount()
Returns the number of nodes for this structural node at this level (does not count children nodes)
For closed nodes, the returned value is most likely 1.
|
boolean |
hasAspect(Aspect<?> aspect)
if this structural node contains the aspect passed in as a parameter, then the
cell header in header is returned.
|
abstract boolean |
isAbstract()
Returns true if this is a rule node and it is marked as abstract.
|
boolean |
isLeaf()
last node in a tree is leaf node.
|
boolean |
isRollUp()
Returns true if this structural node is a roll-up node.
|
void |
resetDistanceToLeaf()
Reset distance to lead for all aspects.
|
void |
resetMergeTagSelector()
Reset merge tag selector.
|
java.lang.String |
toString() |
public XBRLStructuralNode(XBRLDefinitionNodeUse base, XBRLStructuralNode parent, java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.Object,AspectAndDistanceToLeaf>> mergeAspects, java.lang.String mergeTagSelectors)
base - the XBRLDefinitionNodeUse that is the source of this TableStructuralNodeparent - the parent TableStructuralNode to allow navigation up on the tree. This is null for root nodesmergeAspects - the merge aspectsmergeTagSelectors - the merge tag selectorspublic java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.Object,AspectAndDistanceToLeaf>> getConsolidatedAspects()
public java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.Object,AspectAndDistanceToLeaf>> collectAspects()
public java.util.Iterator<java.lang.String> getTags()
public java.util.Iterator<java.lang.String> getLocalTags()
public java.util.Iterator<AspectAndDistanceToLeaf> getAspects(java.lang.String tag)
tag - the tagpublic java.util.Iterator<AspectAndDistanceToLeaf> getLocalAspects(java.lang.String tag)
tag - the tagpublic XBRLStructuralNode getParent()
StructuralNodeInterfacegetParent in interface StructuralNodeInterfacepublic XBRLDefinitionNodeUse getBase()
public boolean addChild(XBRLStructuralNode child)
child - node to add at the end of the collectionpublic boolean isLeaf()
StructuralNodeInterfaceisLeaf in interface StructuralNodeInterfacepublic boolean isRollUp()
public abstract java.lang.String getLabel(CellHeader cell)
cell - the cellpublic abstract boolean isAbstract()
public java.util.Iterator<XBRLStructuralNode> getNodes()
StructuralNodeInterfacegetNodes in interface StructuralNodeInterfacepublic XBRLStructuralNode getNodeAt(int index)
StructuralNodeInterfacegetNodeAt in interface StructuralNodeInterfaceindex - integerpublic int getNodeCount()
StructuralNodeInterfacegetNodeCount in interface StructuralNodeInterfacepublic static XBRLStructuralNode[] create(XBRLDefinitionNodeUse dnu, XBRLStructuralNode parent, java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.Object,AspectAndDistanceToLeaf>> mergeAspects, java.lang.String mergeTagSelectors, XBRLStructuralTable xbrlTable, HasParentChildAttribute.ParentChildEnum parentChildValue) throws XTValidationException
dnu - definition nodeparent - is the parent of this structural node or null for root nodesmergeAspects - the merge aspectsmergeTagSelectors - the merge tag selectorsxbrlTable - the xbrl tableparentChildValue - the parent child valueXTValidationException - the XT validation exceptionpublic static XBRLStructuralNode create(XBRLDefinitionNodeUse dnu, XBRLStructuralNode parent, java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.Object,AspectAndDistanceToLeaf>> mergeAspects, java.lang.String mergeTagSelectors, XBRLStructuralTable xbrlTable, RelationshipGraphNode.Node<?> node)
dnu - the dnuparent - the parentmergeAspects - the merge aspectsmergeTagSelectors - the merge tag selectorsxbrlTable - the xbrl tablenode - the nodepublic static XBRLStructuralNode createRollup(XBRLStructuralNode parent, java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.Object,AspectAndDistanceToLeaf>> mergeAspects, java.lang.String mergeTagSelectors)
parent - the parentmergeAspects - the merge aspectsmergeTagSelectors - the merge tag selectorspublic abstract int getValueCount()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.HashSet<java.lang.String> getTagSelector()
public void addMergeAspect(Aspect<?> as)
as - the aspublic int getDistanceToLeaf()
public void resetDistanceToLeaf()
public boolean hasAspect(Aspect<?> aspect)
aspect - the aspectpublic void resetMergeTagSelector()
public java.lang.String getMergeTagSelector()