xbrl.taxonomy.DTS
¶
An xbrl.taxonomy.DTS
class represents an XBRL Discoverable Taxonomy Set (DTS).
-
class
xbrl.taxonomy.
DTS
¶ Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a
NotImplementedError
exception.
Class methods¶
-
classmethod
xbrl.taxonomy.DTS.
create_from_url
(type cls, url, *, catalog=None, taxonomy_package=None, **kargs)¶ Returns a tuple with an
xbrl.taxonomy.DTS
andxml.ErrorLog
object. Constructs a newxbrl.taxonomy.DTS
object after parsing the XML content retrieved from the given url or list of urls (multiple entry points). Optional user XML catalogs can be specified with the catalog argument. Optional taxonomy packages can be specified with the taxonomy_package argument. Other validation options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_xbrl_valxbrltaxonomy.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returnedxml.ErrorLog
object.
-
classmethod
xbrl.taxonomy.DTS.
validate_url
(type cls, url, *, catalog=None, taxonomy_package=None, **kargs)¶ Validates the XBRL Taxonomy document at the given url or list of urls (multiple entry points) according to the XBRL 2.1, Dimensions 1.0, Formula 1.0 and Table Linkbase 1.0 specification and returns an
xml.ErrorLog
object with the results. Optional user XML catalogs can be specified with the catalog argument. Optional taxonomy packages can be specified with the taxonomy_package argument. Other validation options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_xbrl_valxbrltaxonomy.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returnedxml.ErrorLog
object.
Attributes¶
-
xbrl.taxonomy.DTS.
arcrole_types
¶ Returns an iterator of
xbrl.taxonomy.ArcroleType
objects which represent XBRL arcroleType elements.
-
xbrl.taxonomy.DTS.
assertion_sets
¶ Returns an iterator of
xbrl.formula.AssertionSet
objects which represent all <validation:assertionSet> resources in the Formula linkbase.
-
xbrl.taxonomy.DTS.
assertions
¶ Returns an iterator of
xbrl.formula.Assertion
objects which represent all <validation:assertion> and <validation:variableSetAssertion> resources in the Formula linkbase.
-
xbrl.taxonomy.DTS.
base_sets
¶ Returns an iterator of
xbrl.taxonomy.BaseSet
objects which represent base sets in the DTS.
-
xbrl.taxonomy.DTS.
concepts
¶ Returns an iterator of
xbrl.taxonomy.Concept
objects which represent all XBRL concepts in the DTS.
-
xbrl.taxonomy.DTS.
dimensions
¶ Returns an iterator of
xbrl.xdt.Dimension
objects which represent all XBRL concepts in the DTS that are in the substitution group of xbrldt:dimension.
-
xbrl.taxonomy.DTS.
documents
¶ Returns an iterator of
xml.Document
objects which represent all XBRL taxonomy schema and linkbase documents in the DTS.
-
xbrl.taxonomy.DTS.
entry_points
¶ Returns an iterator of
xml.Document
objects which represent the set of documents used as a starting point for the DTS discovery.
-
xbrl.taxonomy.DTS.
equality_definitions
¶ Returns an iterator of
xbrl.formula.EqualityDefinition
objects which represent all <variable:equalityDefinition> resources in the Formula linkbase.
-
xbrl.taxonomy.DTS.
filters
¶ Returns an iterator of
xbrl.formula.Filter
objects which represent all <variable:filter> resources in the Formula linkbase.
-
xbrl.taxonomy.DTS.
formulas
¶ Returns an iterator of
xbrl.formula.Formula
objects which represent all <formula:formula> resources in the Formula linkbase.
-
xbrl.taxonomy.DTS.
hypercubes
¶ Returns an iterator of
xbrl.xdt.Hypercube
objects which represent all XBRL concepts in the DTS that are in the substitution group of xbrldt:hypercube.
-
xbrl.taxonomy.DTS.
items
¶ Returns an iterator of
xbrl.taxonomy.Item
objects which represent all XBRL concepts in the DTS that are in the substitution group of xbrli:item.
-
xbrl.taxonomy.DTS.
linkbases
¶ Returns an iterator of
xbrl.taxonomy.Linkbase
objects which represent all XBRL linkbases in the DTS.
-
xbrl.taxonomy.DTS.
parameters
¶ Returns an iterator of
xbrl.formula.Parameter
objects which represent all <variable:parameter> resources in the Formula linkbase.
-
xbrl.taxonomy.DTS.
role_types
¶ Returns an iterator of
xbrl.taxonomy.RoleType
objects which represent XBRL roleType elements.
-
xbrl.taxonomy.DTS.
schema
¶ Returns an
xsd.Schema
object which represents the XML schema component of the underlying DTS.
-
xbrl.taxonomy.DTS.
tables
¶ Returns an iterator of
xbrl.table.Table
objects which represent all <table:table> resources in the Table linkbase.
-
xbrl.taxonomy.DTS.
taxonomy_schemas
¶ Returns an iterator of
xbrl.taxonomy.TaxonomySchema
objects which represent all XBRL taxonomy schemas in the DTS.
-
xbrl.taxonomy.DTS.
tuples
¶ Returns an iterator of
xbrl.taxonomy.Tuple
objects which represent all XBRL concepts in the DTS that are in the substitution group of xbrli:tuple.
Methods¶
-
xbrl.taxonomy.DTS.
arcrole_definition
(arcrole)¶ Returns the value of the arcroleType <definition> child element as a string for the given arcrole. Returns None if the arcroleType has no <definition> child element.
-
xbrl.taxonomy.DTS.
arcrole_type
(arcrole)¶ Returns an
xbrl.taxonomy.ArcroleType
object which represents XBRL arcroleType element for the given custom arcrole URI, or None if no arcroleType element was found.
-
xbrl.taxonomy.DTS.
base_set
(linkname, linkrole, arcname, arcrole)¶ Returns an
xbrl.taxonomy.BaseSet
object which represents the base set of arcs for the given extended link name and role URI and the given arc name and arcrole URI.
-
xbrl.taxonomy.DTS.
calculation_base_set
(linkrole, arcrole=None)¶ Returns an
xbrl.taxonomy.BaseSet
object which represents the base set of calculation arcs for the given linkrole and arcrole URI. If arcrole was not specified, the default summation-item arcrole is used.
-
xbrl.taxonomy.DTS.
calculation_link_roles
(arcrole=None)¶ Returns a set with link role URIs for each calculationLink extended link that contains arcs with the given arcrole. If arcrole was not specified, the default summation-item arcrole is used.
-
xbrl.taxonomy.DTS.
calculation_network
(linkrole, arcrole=None)¶ Returns an
xbrl.taxonomy.RelationshipNetwork
object which represents the network of relationships of calculation arcs for the given linkrole and arcrole URI. If arcrole was not specified, the default summation-item arcrole is used.
-
xbrl.taxonomy.DTS.
definition_base_set
(linkrole, arcrole)¶ Returns an
xbrl.taxonomy.BaseSet
object which represents the base set of definition arcs for the given linkrole and arcrole URI.
-
xbrl.taxonomy.DTS.
definition_link_roles
(arcrole=None)¶ Returns a set with link role URIs for each definitionLink extended link that contains arcs with the given arcrole.
-
xbrl.taxonomy.DTS.
definition_network
(linkrole, arcrole)¶ Returns an
xbrl.taxonomy.RelationshipNetwork
object which represents the network of relationships of definition arcs for the given linkrole and arcrole URI.
-
xbrl.taxonomy.DTS.
dimensional_relationship_set
()¶ Returns an
xbrl.xdt.DRS
object which represents the dimensional relationship networks in the DTS.
-
xbrl.taxonomy.DTS.
find_assertion_sets
(id)¶ Returns an iterator of
xbrl.formula.AssertionSet
objects which represent the <validation:assertionSet> resources in the Formula linkbase which match the given id.
-
xbrl.taxonomy.DTS.
find_assertions
(id)¶ Returns an iterator of
xbrl.formula.Assertion
objects which represent the <validation:assertion> or <validation:variableSetAssertion> resources in the Formula linkbase which match the given id.
-
xbrl.taxonomy.DTS.
find_document
(uri)¶ Returns an object of
xml.Document
which represents the XBRL taxonomy schema or linkbase document with the given uri in the DTS, or None if no such document exists within the DTS.
-
xbrl.taxonomy.DTS.
find_equality_definition
(ElementDeclaration decl)¶ Returns an
xbrl.formula.EqualityDefinition
object which represents the target of an equality-definition relationship starting from the given typed dimension domain definition, or None if no such <variable:equalityDefinition> resource was found.
-
xbrl.taxonomy.DTS.
find_filters
(id)¶ Returns an iterator of
xbrl.formula.Filter
objects which represent the <variable:filter> resources in the Formula linkbase which match the given id.
-
xbrl.taxonomy.DTS.
find_formulas
(id)¶ Returns an iterator of
xbrl.formula.Formula
objects which represent the <formula:formula> resources in the Formula linkbase which match the given id.
-
xbrl.taxonomy.DTS.
find_parameter
(qname)¶ [Deprecated: Use resolve_parameter() instead!]. Returns an
xbrl.formula.Parameter
object which represents the <variable:paramter> resource with the given XML qualified name in the Formula linkbase, or None if no parameter was found.
-
xbrl.taxonomy.DTS.
find_parameters
(id)¶ Returns an iterator of
xbrl.formula.Parameter
objects which represent the <variable:parameter> resources in the Formula linkbase which match the given id.
-
xbrl.taxonomy.DTS.
find_tables
(id)¶ Returns an iterator of
xbrl.table.Table
objects which represent the <table:table> resources in the Table linkbase which match the given id.
-
xbrl.taxonomy.DTS.
generate_layout_model
(Instance instance=None, **kargs)¶ Generates the layout model for all tables defined in the supporting DTS by table resolution and layout against the given XBRL instance and returns an
xbrl.table.layout.TableModel
,xml.ErrorLog
tuple. Formula parameters can be set using the ‘formula_parameters’ argument by supplying a dict with the user-supplied parameter values. Use the same JSON format as accepted by the –formula-parameters CLI option. The ordering of layout nodes generated by an aspect node can be specified with the ‘aspect_node_order’ parameter which can be either ‘lexical’ or ‘instance’. When ‘preserve_empty_aspect_nodes’ is set to True, a placeholder structural node will created when the aspect node expands to the empty set. When ‘preserve_empty_relationship_nodes’ is set to True, a placeholder structural node will created when the relationship node expands to the empty set. When ‘preserve_merged_rule_nodes’ is set to True, a distinct structural node will be always created even if that node should be merged. When ‘table_elimination’ is set to True, any unpopulated slices (table rows or colulmns) are eliminated from the table.
-
xbrl.taxonomy.DTS.
generate_structural_model
(**kargs)¶ Generates the structural model for all tables defined in the supporting DTS by table resolution and returns an
xbrl.table.structural.TableModel
,xml.ErrorLog
tuple. Formula parameters can be set using the ‘formula_parameters’ argument by supplying a dict with the user-supplied parameter values. Use the same JSON format as accepted by the –formula-parameters CLI option. When ‘preserve_empty_relationship_nodes’ is set to True, a placeholder structural node will created when the relationship node expands to the empty set. When ‘preserve_merged_rule_nodes’ is set to True, a distinct structural node will be always created even if that node should be merged.
-
xbrl.taxonomy.DTS.
generic_base_set
(linkrole, arcrole)¶ Returns an
xbrl.taxonomy.BaseSet
object which represents the base set of generic arcs for the given linkrole and arcrole URI.
-
xbrl.taxonomy.DTS.
generic_link_roles
(arcrole=None)¶ Returns a set with link role URIs for each <gen:link> extended link that contains <gen:arc> arcs with the given arcrole.
-
xbrl.taxonomy.DTS.
generic_network
(linkrole, arcrole)¶ Returns an
xbrl.taxonomy.RelationshipNetwork
object which represents the network of relationships of generic arcs for the given linkrole and arcrole URI.
-
xbrl.taxonomy.DTS.
items_by_type
(TypeDefinition typeDef, match_derived_types=True)¶ Returns an iterator of
xbrl.taxonomy.Item
objects which represent XBRL items in the DTS that have the given type. If match_derived_types is False, the type definitions must match excactly, otherwise items with types that are derived from the given type will be returned.
-
xbrl.taxonomy.DTS.
label_base_set
(linkrole, arcrole=None)¶ Returns an
xbrl.taxonomy.BaseSet
object which represents the base set of label arcs for the given linkrole and arcrole URI. If arcrole was not specified, the default concept-label arcrole is used.
-
xbrl.taxonomy.DTS.
label_link_roles
(arcrole=None)¶ Returns a set with link role URIs for each labelLink extended link that contains arcs with the given arcrole. If arcrole was not specified, the default concept-label arcrole is used.
-
xbrl.taxonomy.DTS.
link_roles
(arcname=None, arcrole=None)¶ Returns a set with link role URIs for each extended link that contains arcs with the given arcname and/or arcrole.
-
xbrl.taxonomy.DTS.
network_of_relationships
(linkname, linkrole, arcname, arcrole)¶ Returns an
xbrl.taxonomy.RelationshipNetwork
object which represents the network of relationships for the base set of arcs for the given extended link name and role URI and the given arc name and arcrole URI.
-
xbrl.taxonomy.DTS.
presentation_base_set
(linkrole, arcrole=None)¶ Returns an
xbrl.taxonomy.BaseSet
object which represents the base set of presentation arcs for the given linkrole and arcrole URI. If arcrole was not specified, the default parent-child arcrole is used.
-
xbrl.taxonomy.DTS.
presentation_link_roles
(arcrole=None)¶ Returns a set with link role URIs for each presentationLink extended link that contains arcs with the given arcrole. If arcrole was not specified, the default parent-child arcrole is used.
-
xbrl.taxonomy.DTS.
presentation_network
(linkrole, arcrole=None)¶ Returns an
xbrl.taxonomy.RelationshipNetwork
object which represents the network of relationships of presentation arcs for the given linkrole and arcrole URI. If arcrole was not specified, the default parent-child arcrole is used.
-
xbrl.taxonomy.DTS.
reference_base_set
(linkrole, arcrole=None)¶ Returns an
xbrl.taxonomy.BaseSet
object which represents the base set of reference arcs for the given linkrole and arcrole URI. If arcrole was not specified, the default concept-reference arcrole is used.
-
xbrl.taxonomy.DTS.
reference_link_roles
(arcrole=None)¶ Returns a set with link role URIs for each referenceLink extended link that contains arcs with the given arcrole. If arcrole was not specified, the default concept-reference arcrole is used.
-
xbrl.taxonomy.DTS.
resolve_concept
(qname)¶ Returns an
xbrl.taxonomy.Concept
object which represents the XBRL concept with the given XML qualified name in the DTS, or None if no concept was found.
-
xbrl.taxonomy.DTS.
resolve_parameter
(qname)¶ Returns an
xbrl.formula.Parameter
object which represents the <variable:paramter> resource with the given XML qualified name in the Formula linkbase, or None if no parameter was found.
-
xbrl.taxonomy.DTS.
role_definition
(role)¶ Returns the value of the roleType <definition> child element as a string for the given role. Returns None if the roleType has no <definition> child element.
-
xbrl.taxonomy.DTS.
role_type
(role)¶ Returns an
xbrl.taxonomy.RoleType
object which represents XBRL roleType element for the given custom role URI, or None if no roleType element was found.
Special methods¶
__bool__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__