xbrl.oim.OIM

class xbrl.oim.OIM

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

Class methods

classmethod xbrl.oim.OIM.create_from_csv(type cls, url, *, catalog=None, taxonomy_package=None, **kargs)

Returns a tuple with an xbrl.oim.OIM and xml.ErrorLog object. Constructs a new xbrl.oim.OIM object after parsing the JSON [metadata file] (https://www.xbrl.org/Specification/xbrl-csv/REC-2021-10-13+errata-2023-04-19/xbrl-csv-REC-2021-10-13+corrected-errata-2023-04-19.html#metadata-file) for xBRL-CSV content retrieved from the given url. 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 at oim-csv for a list of available options. Any errors and warnings reported during the validation can be accessed through the returned xml.ErrorLog object.

classmethod xbrl.oim.OIM.create_from_json(type cls, url, *, catalog=None, taxonomy_package=None, **kargs)

Returns a tuple with an xbrl.oim.OIM and xml.ErrorLog object. Constructs a new xbrl.oim.OIM object after parsing the xBRL-JSON content retrieved from the given url. 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 at oim-json for a list of available options. Any errors and warnings reported during the validation can be accessed through the returned xml.ErrorLog object.

classmethod xbrl.oim.OIM.create_from_xml(type cls, url, *, catalog=None, taxonomy_package=None, **kargs)

Returns a tuple with an xbrl.oim.OIM and xml.ErrorLog object. Constructs a new xbrl.oim.OIM object after parsing the xBRL-XML content retrieved from the given url. 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 at oim-xml for a list of available options. Any errors and warnings reported during the validation can be accessed through the returned xml.ErrorLog object.

classmethod xbrl.oim.OIM.detect_document_type(type cls, url)

If the url specifies a xBRL-CSV metadata file or xBRL-JSON file then the value from the /documentInfo/documentType property is returned. For an xBRL-XML instance the non-standard type https://xbrl.org/2021/xbrl-xml is returned. Otherwise the empty string.

classmethod xbrl.oim.OIM.detect_dts_references(type cls, url, *, catalog=None, taxonomy_package=None, **kwargs)

If the url specifies a xBRL-CSV metadata file or xBRL-JSON file then the list from the /documentInfo/taxonomy property is returned. If the url specifies an xBRL-XML instance document then xbrl.Instance.detect_dts_references is returned.

Methods

xbrl.oim.OIM.dump()
xbrl.oim.OIM.to_csv(url, *, catalog=None, taxonomy_package=None, **kargs)

Serialize the current OIM to xBRL-CSV. The url specifies the location of the JSON metadata file. Returns True for success, False otherwise.

xbrl.oim.OIM.to_json(**kwargs)

Serialize the current OIM to xBRL-JSON. The serialized JSON is returned as a string.

xbrl.oim.OIM.to_xml(*, catalog=None, taxonomy_package=None, **kargs)

Serialize the current OIM to xBRL-XML. In case of success the xml.DocumentInformationItem for the xbrl instance is returned.

Special methods

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