xbrl.taxonomy.RelationshipNetworkNode

An xbrl.taxonomy.RelationshipNetworkNode class represents a node in the network of relationships. The interface can be used to traverse the network of relationships in various directions. Each xbrl.taxonomy.RelationshipNetworkNode object stores an additional reference to the relationship that was traversed to arrive at this node and can be queried for relevant attributes including preferred_label_role, target_role and weight.

class xbrl.taxonomy.RelationshipNetworkNode

Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a NotImplementedError exception.

Attributes

xbrl.taxonomy.RelationshipNetworkNode.children

Returns an iterator of xbrl.taxonomy.RelationshipNetworkNode objects which represent all child nodes in the network of relationships. The returned list of nodes corresponds to the child axis. In the case of circular relationships the returned list may again contain this node.

xbrl.taxonomy.RelationshipNetworkNode.concept

Returns a xbrl.taxonomy.Concept object if the current node represents a XBRL concept, otherwise None.

xbrl.taxonomy.RelationshipNetworkNode.depth

Returns the depth of the current node relative to the initial starting node returned by xbrl.taxonomy.RelationshipNetwork.node().

xbrl.taxonomy.RelationshipNetworkNode.element

Returns a xml.ElementInformationItem object which represents the current node in the relationship of networks.

xbrl.taxonomy.RelationshipNetworkNode.label

Returns an xbrl.taxonomy.Label object which represents a label in the standard linkrole with either the standard or if specified the preferred label role, otherwise None. In case of mulitple labels (e.g. in different languages) only the first label (according to the order attribute on the labelArc) is returned.

xbrl.taxonomy.RelationshipNetworkNode.parents

Returns an iterator of xbrl.taxonomy.RelationshipNetworkNode objects which represent all parent nodes in the network of relationships. The returned list of nodes corresponds to the parent axis. In the case of circular relationships the returned list may again contain this node.

xbrl.taxonomy.RelationshipNetworkNode.preferred_label_role

Returns a string with the preferred label role if the relationship (represented by an XLink arc) leading to this node has a ‘preferredLabel’ or ‘gpl:preferredLabel’ attribute, otherwise None.

xbrl.taxonomy.RelationshipNetworkNode.relationship

Returns a xbrl.taxonomy.Relationship object which represents the relationship that was traversed to arrive at this node.

xbrl.taxonomy.RelationshipNetworkNode.resource

Returns a xbrl.taxonomy.Resource object if the current node represents a XLink resource, otherwise None.

xbrl.taxonomy.RelationshipNetworkNode.siblings

Returns an iterator of xbrl.taxonomy.RelationshipNetworkNode objects which represent all sibling nodes in the network of relationships. The returned list of nodes corresponds to the sibling-or-self axis. The returned list will amongst others contain this node.

xbrl.taxonomy.RelationshipNetworkNode.target_role

Returns a string with the target role if the relationship (represented by an XLink arc) leading to this node has a ‘xbrldt:targetRole’ attribute, otherwise None.

xbrl.taxonomy.RelationshipNetworkNode.weight

Returns a string with the target role if the relationship (represented by an XLink arc) leading to this node has a ‘xbrldt:targetRole’ attribute, otherwise None.

Methods

xbrl.taxonomy.RelationshipNetworkNode.labels(label_role=None, link_role=None, lang=None)

Returns an iterator of xbrl.taxonomy.Label objects. If called without any arguments, all assigned labels will be returned. Use label_role, link_role and lang arguments to constrain the returned labels. The label_role argument is ignored and overwritten by the preferred label role if present.

xbrl.taxonomy.RelationshipNetworkNode.walk(*, axis=xbrl_formula.AxisType.DESCENDANT_OR_SELF, generations=None)

Returns an iterator of xbrl.taxonomy.RelationshipNetworkNode objects which represent the nodes on the given axis. If generations is specified with a value greater than zero, the iterator will stop after the specified number of transitions.

Special methods

__bool__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__