xbrl.Tuple

An xbrl.Tuple class represents a tuple in an XBRL instance document.

Base class: xbrl.Fact

class xbrl.Tuple

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

Attributes

xbrl.Fact.aspect_values

Returns an xbrl.ConstraintSet object with aspect values of the XBRL fact for all aspects in the dimensional aspect model.

xbrl.Tuple.child_facts

Returns an xbrl.FactSet object containing all XBRL facts which are direct children of this XBRL fact (both items and tuples).

xbrl.Tuple.child_items

Returns an xbrl.FactSet object containing all XBRL items which are direct children of this XBRL fact.

xbrl.Tuple.child_tuples

Returns an xbrl.FactSet object containing all XBRL tuples which are direct children of this XBRL fact.

xbrl.Fact.concept

Returns an xbrl.taxonomy.Concept object which represents the XBRL concept associated with this XBRL fact.

xbrl.Fact.concept_aspect_value

Returns an xbrl.ConceptAspectValue object which represents the concept aspect value of the XBRL fact.

xbrl.Fact.contextRef

Returns the value of the ‘contextRef’ attribute as a string, or None if the XML element information item doesn’t have a ‘contextRef’ attribute.

xbrl.Fact.element

Returns an xml.ElementInformationItem object which represents the XML element information item of the XBRL fact.

xbrl.Fact.id

Returns the value of the ‘id’ attribute as a string, or None if the XML element information item doesn’t have an ‘id’ attribute.

xbrl.Fact.inline_is_hidden

Returns a boolean if the fact is hidden in an inline document.

xbrl.Fact.instance

Returns an xbrl.Instance object which represents the containing XBRL instance document.

xbrl.Fact.location_aspect_value

Returns an xbrl.LocationAspectValue object which represents the location aspect value of the XBRL fact.

xbrl.Fact.parent

Returns an xbrl.Tuple object if the fact is contained within a tuple or an xbrl.Instance object if the fact is at the top level (contained in <xbrli:xbrl>).

xbrl.Fact.qname

Returns an xml.QName object which represents the XML qualified name of the XBRL fact element information item.

xbrl.Fact.unitRef

Returns the value of the ‘unitRef’ attribute as a string, or None if the XML element information item doesn’t have an ‘unitRef’ attribute.

xbrl.Fact.xsi_nil

Returns True if the XBRL fact’s element information item has the xsi:nil attribute set to True, otherwise False.

Methods

xbrl.Fact.duplicate(Fact fact, aspect_based=False)

Returns true if both facts are duplicates as defined by the XBRL 2.1 equality predicates.

xbrl.Fact.footnote_relationships(arc_role=None, link_role=None)

Returns an iterator of xbrl.taxonomy.FootnoteRelationship objects. If called without any arguments, all <footnoteArc> relationships starting from this fact will be returned. Use arc_role and link_role arguments to constrain the returned relationships.

xbrl.Fact.footnotes(footnote_role=None, arc_role=None, link_role=None, lang=None)

Returns an iterator of xbrl.taxonomy.Footnote objects. If called without any arguments, all assigned fact-footnote footnotes will be returned. Use foonote_role, arc_role, link_role and lang arguments to constrain the returned footnotes. If arc_role is not specified, only footnotes connected by fact-footnotes <footnoteArc> arcs are considered.

xbrl.Fact.has_ancestor(Tuple tuple)

Returns true if the give tuple is an ancestor of this fact.

xbrl.Tuple.has_child(Fact fact)

Returns true if the give fact is a direct child of this tuple.

xbrl.Tuple.has_descendant(Fact fact)

Returns true if the give fact is a descendant of this tuple.

xbrl.Fact.identical(Fact fact)

Returns true if both facts are identical as defined by the XBRL 2.1 equality predicates.

xbrl.Fact.p_equal(Fact fact)

Returns true if both facts are P-Equal as defined by the XBRL 2.1 equality predicates.

xbrl.Fact.s_equal(Fact fact)

Returns true if both facts are S-Equal as defined by the XBRL 2.1 equality predicates.

xbrl.Fact.xpointer(force_element_scheme=False)

Returns an URI with XPointer fragment that points to this XML element as a string. If the XML element information item has an id attribute, a shorthand pointer with the id attribute value will be generated, otherwise the XPointer element scheme will be used. Set force_element_scheme to True to prevent generation of shorthand pointers.

Special methods

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