ontouml_py.model.namedelement
Module for the abstract NamedElement class within an OntoUML model.
This module defines the NamedElement class, an abstract class representing elements with names in an OntoUML model. It extends the OntoumlElement class and includes additional attributes and validation for managing named elements’ details such as their preferred name, alternative names, descriptions, editorial notes, as well as lists of creators and contributors.
Module Contents
Classes
Abstract base class representing a generic element within an OntoUML model. |
- class ontouml_py.model.namedelement.NamedElement(**data)
Bases:
ontouml_py.model.ontoumlelement.OntoumlElement
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:
data (dict[str, Any]) –
- names: set[langstring.LangString]
- alt_names: set[langstring.LangString]
- description: langstring.LangString | None
- editorial_notes: set[langstring.LangString]
- creators: set[str]
- contributors: set[str]
- model_config