ontouml_py.model.property

Module Contents

Classes

Property

Abstract base class representing a generic element within an OntoUML model.

class ontouml_py.model.property.Property(classifier, **data)

Bases: ontouml_py.model.decoratable.Decoratable

Abstract base class representing a generic element within an OntoUML model.

This class provides foundational attributes and methods for all OntoUML elements, including unique identification and timestamps for creation and modification. It enforces constraints on certain attributes and includes validation logic to maintain their integrity.

Variables:
  • id (str) – A unique identifier for the element, automatically generated upon instantiation.

  • created (datetime) – Timestamp when the element was created, defaults to the current time.

  • modified (Optional[datetime]) – Timestamp when the element was last modified, can be None if not modified.

  • model_config (Dict[str, Any]) – Configuration settings for the Pydantic model.

Parameters:
  • classifier (Classifier) –

  • data (dict[str, Any]) –

property classifier: Classifier

Get the owning classifier of this property.

Returns:

The Classifier instance that owns this property, if any.

Return type:

Optional[Classifier]

_classifier: Classifier
is_read_only: bool
aggregation_kind: ontouml_py.model.enumerations.aggregationkind.AggregationKind
stereotype: ontouml_py.model.enumerations.propertystereotype.PropertyStereotype | None
cardinality: ontouml_py.model.cardinality.Cardinality
property_type: object | None
subsetted_by: set[Property]
redefined_by: set[Property]
model_config
classmethod __validate_cardinality_type(checked_value)
Parameters:

checked_value (object) –

Return type:

ontouml_py.model.cardinality.Cardinality