gemd.entity.template.has_condition_templates module

For entities that have a condition template.

class gemd.entity.template.has_condition_templates.HasConditionTemplates(conditions: Iterable[Union[ConditionTemplate, LinkByUID, Tuple[Union[ConditionTemplate, LinkByUID], Optional[BaseBounds]]]])

Bases: HasDependencies

Mixin-trait for entities that include condition templates.

Parameters

conditions (List[(ConditionTemplate, BaseBounds)]) – A list of tuples containing this entity’s condition templates as well as any restrictions on those templates’ bounds.

validate_condition(condition: ConditionType) bool

Check if the condition is consistent w/ this template.

property conditions: List[Union[ConditionTemplate, LinkByUID]]

Get the list of condition template/bounds tuples.

Returns

List of this entity’s condition template/bounds pairs

Return type

List[(ConditionTemplate, BaseBounds)]