xbrl.Resource

The Resource class represents an XLink resource element within an extended link.

class xbrl.Resource(DTS dts, Element elem)

Attributes

xbrl.Resource.element

Returns an xml.Element object representing the XML element in the extended link.

xbrl.Resource.id

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

xbrl.Resource.labels

Returns a generator object of xbrl.LabelResource objects for each generic label that has an element-label (http://xbrl.org/arcrole/2008/element-label) relationship to this resource.

xbrl.Resource.references

Returns a generator object of xbrl.ReferenceResource objects for each generic reference that has an element-reference (http://xbrl.org/arcrole/2008/element-reference) relationship to this resource.

xbrl.Resource.role

Returns the xlink:role attribute value as a string, or None if the XML element doesn’t have an xlink:role attribute.

Methods

xbrl.Resource.select_labels(label_role=None, link_role=None, lang=None)

Returns a generator object of xbrl.LabelResource objects for each generic label that has an element-label relationship (http://xbrl.org/arcrole/2008/element-label) to this resource and also matches the given parameters.

xbrl.Resource.select_references(reference_role=None, link_role=None)

Returns a generator object of xbrl.ReferenceResource objects for each generic reference that has an element-reference relationship (http://xbrl.org/arcrole/2008/element-reference) to this resource and also matches the given parameters.

Special methods

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