xbrl.ConstraintSet¶
The ConstraintSet class represents a set of constraints for the aspects in the dimensional aspect model. For each aspect, zero or one aspect can be specified.
-
class
xbrl.ConstraintSet(context=None)¶ Creates a new empty
xbrl.ConstraintSetobject. It takes anxbrl.DTSorxbrl.Instanceobject as as a parameter.
Attributes¶
-
xbrl.ConstraintSet.allow_additional_dimensions¶ Read/write of type Boolean value. If set to false, restricts the facts returned by Instance.select_facts() and FactSet.filter() methods to contain only facts whose assigned contexts don’t contain any additional dimensions.
-
xbrl.ConstraintSet.concept_aspect¶ Returns an
xbrl.ConceptAspectValueobject representing the constraint for the concept aspect, or None if no constraint was specified. Is also writable.
-
xbrl.ConstraintSet.dimension_aspects¶ Returns a generator object of
xbrl.ExplicitDimensionAspectValueandxbrl.TypedDimensionAspectValueobjects representing the constraints for the dimension aspect.
-
xbrl.ConstraintSet.entity_identifier_aspect¶ Returns an
xbrl.EntityIdentifierAspectValueobject representing the constraint for the entity identifier aspect, or None if no constraint was specified. Is also writable.
-
xbrl.ConstraintSet.period_aspect¶ Returns an
xbrl.PeriodAspectValueobject representing the constraint for the period aspect, or None if no constraint was specified. Is also writable.
-
xbrl.ConstraintSet.scenario_aspect¶ Returns an
xbrl.ScenarioAspectValueobject representing the constraint for the non-XDT scenario aspect, or None if no constraint was specified. Is also writable.
-
xbrl.ConstraintSet.segment_aspect¶ Returns an
xbrl.SegmentAspectValueobject representing the constraint for the non-XDT segment aspect, or None if no constraint was specified. Is also writable.
-
xbrl.ConstraintSet.unit_aspect¶ Returns an
xbrl.UnitAspectValueobject representing the constraint for the unit aspect, or None if no constraint was specified. Is also writable.
Methods¶
-
xbrl.ConstraintSet.append(aspect)¶ Adds a new constraint. Any existing constraint for this aspect will be overwritten.
-
xbrl.ConstraintSet.clear()¶ Removes any constraints for all aspects.
-
xbrl.ConstraintSet.copy()¶ Returns a new
xbrl.ConstraintSetobject containing the same constraints.
-
xbrl.ConstraintSet.dimension_aspect(dimension)¶ Returns an
xbrl.ExplicitDimensionAspectValueorxbrl.TypedDimensionAspectValueobject for the given dimension aspect, or None if no constraint was specified.
-
xbrl.ConstraintSet.extend(constraintset)¶ Adds all the constraints from
xbrl.ConstraintSetconstraint-set. Any existing constraints will be overwritten.
-
xbrl.ConstraintSet.set_dimension_aspect(aspect)¶ Sets a constraint for the dimension aspect. Any existing constraint for this aspect will be overwritten.
Special methods¶
__eq__, __ge__, __gt__, __le__, __lt__, __ne__