gemd.entity.template.has_property_templates module

For entities that have a property template.

class gemd.entity.template.has_property_templates.HasPropertyTemplates(properties: Iterable[Union[PropertyTemplate, LinkByUID, Tuple[Union[PropertyTemplate, LinkByUID], Optional[BaseBounds]]]])

Bases: HasDependencies

Mixin-trait for entities that include property templates.

Parameters

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

validate_property(prop: Union[PropertyType, PropertyAndConditionsType]) bool

Check if the property is consistent w/ this template.

property properties: List[Tuple[Union[PropertyTemplate, LinkByUID], Optional[BaseBounds]]]

Get the list of property template/bounds tuples.

Returns

List of this entity’s property template/bounds pairs

Return type

List[(PropertyTemplate, BaseBounds)]