From ac42bdf92cbee30291626f2f6ea7909aeb42a32a Mon Sep 17 00:00:00 2001
From: Pedro Paulo Favato Barcelos
Date: Sun, 3 Dec 2023 19:03:14 +0100
Subject: [PATCH] class_py.py and literal.py implemented with tests.
---
.../packageable/index.rst.txt | 2 +
.../abstract_classes/relation/index.rst.txt | 25 ++-
.../concrete_classes/anchor/index.rst.txt | 5 +-
.../binaryrelation/index.rst.txt | 22 ++-
.../concrete_classes/class/index.rst.txt | 118 --------------
.../concrete_classes/class_py/index.rst.txt | 139 +++++++++++++++++
.../classes/concrete_classes/index.rst.txt | 2 +-
.../concrete_classes/literal/index.rst.txt | 49 ++++--
.../naryrelation/index.rst.txt | 22 ++-
.../concrete_classes/package/index.rst.txt | 2 +
.../concrete_classes/property/index.rst.txt | 3 -
.../datatypes/cardinality/index.rst.txt | 16 +-
docs/autoapi/index.html | 2 +-
.../abstract_classes/packageable/index.html | 5 +-
.../abstract_classes/relation/index.html | 18 ++-
.../concrete_classes/anchor/index.html | 6 +-
.../binaryrelation/index.html | 22 +--
.../{class => class_py}/index.html | 102 +++++++-----
.../generalization/index.html | 4 +-
.../classes/concrete_classes/index.html | 2 +-
.../concrete_classes/literal/index.html | 64 +++++---
.../concrete_classes/naryrelation/index.html | 18 +--
.../concrete_classes/package/index.html | 5 +-
.../concrete_classes/property/index.html | 2 +-
.../classes/datatypes/cardinality/index.html | 6 +-
docs/autoapi/ontouml_py/classes/index.html | 2 +-
docs/autoapi/ontouml_py/index.html | 2 +-
docs/genindex.html | 36 +++--
docs/objects.inv | Bin 3386 -> 3409 bytes
docs/py-modindex.html | 2 +-
docs/searchindex.js | 2 +-
.../abstract_classes/ontoumlelement.py | 2 +
.../classes/abstract_classes/packageable.py | 3 +-
.../classes/abstract_classes/relation.py | 25 ++-
ontouml_py/classes/concrete_classes/anchor.py | 5 +-
.../concrete_classes/binaryrelation.py | 21 ++-
ontouml_py/classes/concrete_classes/class.py | 114 --------------
.../classes/concrete_classes/class_py.py | 146 ++++++++++++++++++
.../classes/concrete_classes/literal.py | 66 +++++---
.../classes/concrete_classes/naryrelation.py | 21 ++-
.../classes/concrete_classes/package.py | 7 +-
poetry.lock | 6 +-
requirements.txt | 6 +-
tests/concrete_classes/test_literal_class.py | 124 +++++++++++++++
44 files changed, 806 insertions(+), 445 deletions(-)
delete mode 100644 docs/_sources/autoapi/ontouml_py/classes/concrete_classes/class/index.rst.txt
create mode 100644 docs/_sources/autoapi/ontouml_py/classes/concrete_classes/class_py/index.rst.txt
rename docs/autoapi/ontouml_py/classes/concrete_classes/{class => class_py}/index.html (64%)
delete mode 100644 ontouml_py/classes/concrete_classes/class.py
create mode 100644 ontouml_py/classes/concrete_classes/class_py.py
create mode 100644 tests/concrete_classes/test_literal_class.py
diff --git a/docs/_sources/autoapi/ontouml_py/classes/abstract_classes/packageable/index.rst.txt b/docs/_sources/autoapi/ontouml_py/classes/abstract_classes/packageable/index.rst.txt
index 1447751..82b7792 100644
--- a/docs/_sources/autoapi/ontouml_py/classes/abstract_classes/packageable/index.rst.txt
+++ b/docs/_sources/autoapi/ontouml_py/classes/abstract_classes/packageable/index.rst.txt
@@ -41,6 +41,8 @@ Classes
:ivar _in_package: Reference to the Package instance this element is contained in. This is a private attribute.
:vartype _in_package: Optional[Package]
+ :cvar model_config: Configuration settings for the Pydantic model.
+ :vartype model_config: Dict[str, Any]
.. py:property:: in_package
:type: Optional[Package]
diff --git a/docs/_sources/autoapi/ontouml_py/classes/abstract_classes/relation/index.rst.txt b/docs/_sources/autoapi/ontouml_py/classes/abstract_classes/relation/index.rst.txt
index 8391c40..401f9ad 100644
--- a/docs/_sources/autoapi/ontouml_py/classes/abstract_classes/relation/index.rst.txt
+++ b/docs/_sources/autoapi/ontouml_py/classes/abstract_classes/relation/index.rst.txt
@@ -3,6 +3,16 @@
.. py:module:: ontouml_py.classes.abstract_classes.relation
+.. autoapi-nested-parse::
+
+ This module provides the `Relation` class, a subclass of `Classifier`, representing relations in an ontological model.
+ It supports various relation stereotypes as defined in the `RelationStereotype` enumeration.
+
+ The `Relation` class is an abstract base class and is intended to be subclassed by specific types of relations,
+ such as `BinaryRelation` and `NaryRelation`. It includes validation for these subclasses and allows for the
+ configuration of Pydantic model settings.
+
+
Module Contents
---------------
@@ -22,16 +32,15 @@ Classes
Bases: :py:obj:`ontouml_py.classes.abstract_classes.classifier.Classifier`
- Abstract base class for classifiers in an OntoUML model.
+ Abstract base class for representing different types of relations in an ontological model.
- Classifier represents a general concept in an OntoUML model. It extends Decoratable and Packageable, inheriting
- their features. This class maintains a list of properties and an 'is_abstract' flag, defining whether the classifier
- is abstract.
+ This class extends `Classifier` and adds support for relation stereotypes. It is designed to be subclassed
+ by more specific relation types, such as binary and n-ary relations.
- :ivar _properties: A list of Property instances associated with this classifier.
- :vartype _properties: list[Property]
- :ivar is_abstract: Indicates whether the classifier is abstract.
- :vartype is_abstract: bool
+ :ivar stereotype: The stereotype of the relation, defining its ontological nature.
+ :vartype stereotype: Optional[RelationStereotype]
+ :cvar model_config: Configuration settings for the Pydantic model.
+ :vartype model_config: Dict[str, Any]
.. py:attribute:: stereotype
:type: Optional[ontouml_py.classes.enumerations.relationstereotype.RelationStereotype]
diff --git a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/anchor/index.rst.txt b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/anchor/index.rst.txt
index c0d0282..8f66238 100644
--- a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/anchor/index.rst.txt
+++ b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/anchor/index.rst.txt
@@ -48,7 +48,7 @@ Classes
Bases: :py:obj:`ontouml_py.classes.abstract_classes.modelelement.ModelElement`
- Represents an anchor in an OntoUML model.
+ Represent an anchor in an OntoUML model.
An anchor is a specialized model element that links a note (note) to another model element (target). It
extends the ModelElement class, inheriting its attributes and methods, and adds specific relationships to both a
@@ -59,9 +59,6 @@ Classes
:ivar target: The model element that is being described or commented on by the note.
:vartype target: ModelElement
- :param data: Fields to be set on the model instance, including 'note' and 'target'.
- :type data: dict[str, Any]
-
.. py:attribute:: note
:type: ontouml_py.classes.concrete_classes.note.Note
diff --git a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/binaryrelation/index.rst.txt b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/binaryrelation/index.rst.txt
index d198568..23b4c0e 100644
--- a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/binaryrelation/index.rst.txt
+++ b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/binaryrelation/index.rst.txt
@@ -3,6 +3,15 @@
.. py:module:: ontouml_py.classes.concrete_classes.binaryrelation
+.. autoapi-nested-parse::
+
+ This module provides the `BinaryRelation` class, a specific implementation of the `Relation` class for representing
+ binary relations in an ontological model. A binary relation is a relation that involves exactly two distinct entities.
+
+ The `BinaryRelation` class inherits from `Relation` and maintains the same configuration settings, allowing for
+ customization and validation of attributes specific to binary relations.
+
+
Module Contents
---------------
@@ -22,16 +31,13 @@ Classes
Bases: :py:obj:`ontouml_py.classes.abstract_classes.relation.Relation`
- Abstract base class for classifiers in an OntoUML model.
+ Represent a binary relation in an ontological model.
- Classifier represents a general concept in an OntoUML model. It extends Decoratable and Packageable, inheriting
- their features. This class maintains a list of properties and an 'is_abstract' flag, defining whether the classifier
- is abstract.
+ A binary relation is a type of relation that involves exactly two distinct entities. This class extends the
+ `Relation` class and inherits its properties and methods.
- :ivar _properties: A list of Property instances associated with this classifier.
- :vartype _properties: list[Property]
- :ivar is_abstract: Indicates whether the classifier is abstract.
- :vartype is_abstract: bool
+ :cvar model_config: Configuration settings for the Pydantic model.
+ :vartype model_config: Dict[str, Any]
.. py:attribute:: model_config
diff --git a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/class/index.rst.txt b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/class/index.rst.txt
deleted file mode 100644
index 5ac225a..0000000
--- a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/class/index.rst.txt
+++ /dev/null
@@ -1,118 +0,0 @@
-:py:mod:`ontouml_py.classes.concrete_classes.class`
-===================================================
-
-.. py:module:: ontouml_py.classes.concrete_classes.class
-
-.. autoapi-nested-parse::
-
- This module defines classes and functionality for representing and manipulating ontological models.
-
- It includes the definition of the `Class` class, which is a key component in the ontological model,
- representing ontological classes with various attributes and behaviors. The module also includes
- definitions for handling literals associated with these classes, ensuring that operations on these
- classes adhere to certain ontological constraints.
-
-
-
-Module Contents
----------------
-
-Classes
-~~~~~~~
-
-.. autoapisummary::
-
- ontouml_py.classes.concrete_classes.class.Class
-
-
-
-
-.. py:class:: Class(**data)
-
-
- Bases: :py:obj:`ontouml_py.classes.abstract_classes.classifier.Classifier`
-
- Represent a class in an ontological model.
-
- This class extends the Classifier class and includes additional properties and methods specific to
- ontological classes. It supports operations like adding and removing literals, provided the class
- conforms to certain constraints based on its stereotype.
-
- :ivar is_powertype: Indicates if the class is a powertype.
- :vartype is_powertype: bool
- :ivar order: Represents the order of the class.
- :vartype order: str
- :ivar restricted_to: A set of ontological natures that the class is restricted to.
- :vartype restricted_to: set[OntologicalNature]
- :ivar stereotype: The stereotype of the class.
- :vartype stereotype: ClassStereotype
- :ivar literals: A set of literals associated with the class.
- :vartype literals: set[Literal]
- :ivar model_config: Pydantic's configuration settings for the class.
- :vartype model_config: dict
-
- .. py:attribute:: is_powertype
- :type: bool
-
-
-
- .. py:attribute:: order
- :type: str
-
-
-
- .. py:attribute:: restricted_to
- :type: set[ontouml_py.classes.enumerations.ontologicalnature.OntologicalNature]
-
-
-
- .. py:attribute:: stereotype
- :type: ontouml_py.classes.enumerations.classstereotype.ClassStereotype
-
-
-
- .. py:attribute:: literals
- :type: set[ontouml_py.classes.concrete_classes.literal.Literal]
-
-
-
- .. py:attribute:: model_config
-
-
-
- .. py:method:: validate_class()
-
- Validate the class based on its literals and stereotype.
-
- This method checks if the class conforms to the rules based on its stereotype. Specifically,
- it ensures that only classes with the Enumeration stereotype can have literals.
-
- :raises ValueError: If the class has literals but does not have an Enumeration stereotype.
-
-
- .. py:method:: add_literal(**data)
-
- Add a new literal to the class.
-
- This method creates and adds a new instance of Literal to the class's set of literals. It first
- checks if the class's stereotype is Enumeration, as only classes with this stereotype are allowed
- to have literals.
-
- :param data: A dictionary containing the data needed to create a new Literal.
- :type data: dict
- :raises ValueError: If the class's stereotype is not Enumeration.
-
-
- .. py:method:: remove_literal(remove_id)
-
- Remove a literal from the class based on its ID.
-
- This method iterates over the class's literals and removes the one with the matching ID.
- It validates that the class has an Enumeration stereotype before attempting removal.
-
- :param remove_id: The ID of the literal to be removed.
- :type remove_id: str
- :raises ValueError: If the class does not have an Enumeration stereotype.
-
-
-
diff --git a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/class_py/index.rst.txt b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/class_py/index.rst.txt
new file mode 100644
index 0000000..04536b1
--- /dev/null
+++ b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/class_py/index.rst.txt
@@ -0,0 +1,139 @@
+:py:mod:`ontouml_py.classes.concrete_classes.class_py`
+======================================================
+
+.. py:module:: ontouml_py.classes.concrete_classes.class_py
+
+.. autoapi-nested-parse::
+
+ This module defines classes and functionality for representing and manipulating ontological models.
+
+ It includes the definition of the `Class` class, which is a key component in the ontological model,
+ representing ontological classes with various attributes and behaviors. The module also includes
+ definitions for handling literals associated with these classes, ensuring that operations on these
+ classes adhere to certain ontological constraints.
+
+ In this library, a `Class` is initialized as an enumeration by providing a list of literals, which are integral to its
+ definition. These literals, typically dependent on their classes, represent the finite set of values for enumeration
+ instances. To enhance object manipulation flexibility, this library allows the creation of 'free' literals,
+ independent of any class. Users can create these literals separately and later insert them into the appropriate
+ classes, offering a dynamic approach to class and literal management.
+
+ The module is named class_py instead of class due to the fact that class is a reserved keyword in Python.
+ As reserved keywords cannot be used as module names, class_py was chosen to maintain clarity and consistency with the
+ module's purpose, while avoiding naming conflicts within the Python language."
+
+
+
+Module Contents
+---------------
+
+Classes
+~~~~~~~
+
+.. autoapisummary::
+
+ ontouml_py.classes.concrete_classes.class_py.Class
+
+
+
+
+.. py:class:: Class(**data)
+
+
+ Bases: :py:obj:`ontouml_py.classes.abstract_classes.classifier.Classifier`
+
+ Represent a class in an ontological model.
+
+ This class extends the Classifier class and includes additional properties and methods specific to
+ ontological classes. It supports operations like adding and removing literals, provided the class
+ conforms to certain constraints based on its stereotype.
+
+ :ivar is_powertype: Indicates if the class is a powertype.
+ :vartype is_powertype: bool
+ :ivar order: Represents the order of the class.
+ :vartype order: str
+ :ivar restricted_to: A set of ontological natures that the class is restricted to.
+ :vartype restricted_to: set[OntologicalNature]
+ :ivar stereotype: The stereotype of the class.
+ :vartype stereotype: ClassStereotype
+ :ivar literals: A set of literals associated with the class.
+ :vartype literals: set[Literal]
+
+ .. py:property:: literals
+ :type: set[ontouml_py.classes.concrete_classes.literal.Literal]
+
+ Provide a read-only view of the class's literals.
+
+ This property is a safeguard to prevent direct modification of the 'literals' set. To add or remove literals,
+ use the 'add_literal' and 'remove_literal' methods. This design ensures that the integrity of the class's
+ literals collection is maintained.
+
+ :return: A set of Literal objects that are part of the class.
+ :rtype: set[Literal]
+
+
+ .. py:attribute:: _literals
+ :type: set[ontouml_py.classes.concrete_classes.literal.Literal]
+
+
+
+ .. py:attribute:: is_powertype
+ :type: bool
+
+
+
+ .. py:attribute:: order
+ :type: str
+
+
+
+ .. py:attribute:: restricted_to
+ :type: set[ontouml_py.classes.enumerations.ontologicalnature.OntologicalNature]
+
+
+
+ .. py:attribute:: stereotype
+ :type: ontouml_py.classes.enumerations.classstereotype.ClassStereotype
+
+
+
+ .. py:attribute:: model_config
+
+
+
+ .. py:method:: validate_class()
+
+ Validate the class based on its literals and stereotype.
+
+ This method checks if the class conforms to the rules based on its stereotype. Specifically,
+ it ensures that only classes with the Enumeration stereotype can have literals.
+
+ :raises ValueError: If the class has literals but does not have an Enumeration stereotype.
+
+
+ .. py:method:: add_literal(new_literal)
+
+ Add a new literal to the class's collection of literals.
+
+ This method ensures that only instances of Literal or its subclasses are added to the class. It also
+ establishes a bidirectional relationship between the class and the literal.
+
+ :param new_literal: The Literal to be added.
+ :type new_literal: Literal
+ :raises TypeError: If the provided new_literal is not an instance of Literal or if a class attempts to add itself.
+
+
+ .. py:method:: remove_literal(old_literal)
+
+ Remove an existing content from the class's collection of literals.
+
+ This method ensures that the content to be removed is actually part of the class. It also updates the
+ content's 'in_class' attribute to None, effectively breaking the bidirectional relationship.
+
+ :param old_literal: The Literal content to be removed.
+ :type old_literal: Literal
+ :raises TypeError: If the content is not a valid Literal.
+ :raises ValueError: If the content is not part of the class.
+
+
+
diff --git a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/index.rst.txt b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/index.rst.txt
index b800b47..05a4016 100644
--- a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/index.rst.txt
+++ b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/index.rst.txt
@@ -12,7 +12,7 @@ Submodules
anchor/index.rst
binaryrelation/index.rst
- class/index.rst
+ class_py/index.rst
generalization/index.rst
generalizationset/index.rst
literal/index.rst
diff --git a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/literal/index.rst.txt b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/literal/index.rst.txt
index e55144f..9c9cafb 100644
--- a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/literal/index.rst.txt
+++ b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/literal/index.rst.txt
@@ -5,11 +5,13 @@
.. autoapi-nested-parse::
- This module is part of the ontouml_py package and defines the Literal class, a specialized type of ModelElement.
+ This module is part of the ontouml_py class and defines the Literal class, a specialized type of ModelElement. The Literal class represents literals in an ontological model, particularly for enumeration classes.
- The Literal class represents literals in an ontological model, particularly for enumeration classes. It ensures that
- literals are created and managed in a controlled manner, adhering to the constraints and structure of the ontological
- model.
+ Literals in this library traditionally exist as relational dependents of their classes, particularly in the context of
+ enumerations. However, to facilitate more versatile object manipulation, the library supports the creation of 'free'
+ literals, independent of any class. This feature allows users to define literals without the immediate need to
+ associate them with a specific class, providing a flexible workflow. These free literals can later be integrated into
+ classes as required, enhancing the dynamic interaction between literals and their associated classes.
@@ -26,7 +28,7 @@ Classes
-.. py:class:: Literal
+.. py:class:: Literal(**data)
Bases: :py:obj:`ontouml_py.classes.abstract_classes.modelelement.ModelElement`
@@ -34,25 +36,40 @@ Classes
Represent a literal in an ontological model, extending the ModelElement class.
This class is designed to represent literals, which are specific values or identifiers in an enumeration.
- It overrides the default constructor to prevent direct instantiation and provides a factory method for
- controlled creation of literal instances.
+
+ :cvar model_config: Configuration settings for the Pydantic model.
+ :vartype model_config: Dict[str, Any]
+
+ .. py:property:: in_class
+ :type: Optional[Class]
+
+ Provide a read-only view of the class this literal is part of.
+
+ This property allows access to the class that contains this literal, if any. It is designed to be read-only to
+ maintain the integrity of the relationship between the literal and its class.
+
+ :return: The class containing this literal, if it is part of one.
+ :rtype: Optional[Class]
+
+
+ .. py:attribute:: _in_class
+ :type: Optional[Class]
+
+
.. py:attribute:: model_config
- .. py:method:: _create_instance(**data)
- :classmethod:
+ .. py:method:: __set_in_class(new_class)
- Factory method to create a new instance of Literal.
+ Internally set the class this literal is part of.
- Creates a new instance of Literal, bypassing the overridden constructor. This method allows for the
- controlled instantiation of literals, ensuring they are created in accordance with the model's constraints.
+ This method is intended for internal use to establish or update the relationship between this literal and its
+ containing class. It should not be used directly in client code.
- :param data: A dictionary containing the data needed to initialize the Literal.
- :type data: dict
- :return: A new instance of Literal.
- :rtype: Literal
+ :param new_class: The class to associate with this literal. Pass None to dissociate the literal from any class.
+ :type new_class: Optional[Class]
diff --git a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/naryrelation/index.rst.txt b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/naryrelation/index.rst.txt
index 7071e1b..c38693d 100644
--- a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/naryrelation/index.rst.txt
+++ b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/naryrelation/index.rst.txt
@@ -3,6 +3,15 @@
.. py:module:: ontouml_py.classes.concrete_classes.naryrelation
+.. autoapi-nested-parse::
+
+ This module provides the `NaryRelation` class, a specific implementation of the `Relation` class for representing
+ n-ary relations in an ontological model. An n-ary relation is a relation that involves more than two entities.
+
+ The `NaryRelation` class inherits from `Relation` and maintains the same configuration settings, allowing for
+ customization and validation of attributes specific to n-ary relations.
+
+
Module Contents
---------------
@@ -22,16 +31,13 @@ Classes
Bases: :py:obj:`ontouml_py.classes.abstract_classes.relation.Relation`
- Abstract base class for classifiers in an OntoUML model.
+ Represent an n-ary relation in an ontological model.
- Classifier represents a general concept in an OntoUML model. It extends Decoratable and Packageable, inheriting
- their features. This class maintains a list of properties and an 'is_abstract' flag, defining whether the classifier
- is abstract.
+ An n-ary relation is a type of relation that involves more than two entities. This class extends the `Relation`
+ class and inherits its properties and methods.
- :ivar _properties: A list of Property instances associated with this classifier.
- :vartype _properties: list[Property]
- :ivar is_abstract: Indicates whether the classifier is abstract.
- :vartype is_abstract: bool
+ :cvar model_config: Configuration settings for the Pydantic model.
+ :vartype model_config: Dict[str, Any]
.. py:attribute:: model_config
diff --git a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/package/index.rst.txt b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/package/index.rst.txt
index 572d769..fb3d987 100644
--- a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/package/index.rst.txt
+++ b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/package/index.rst.txt
@@ -41,6 +41,8 @@ Classes
:ivar _contents: A private set of Packageable contents contained within the package.
:vartype _contents: set[Packageable]
+ :cvar model_config: Configuration settings for the Pydantic model.
+ :vartype model_config: Dict[str, Any]
.. py:property:: contents
:type: set[ontouml_py.classes.abstract_classes.packageable.Packageable]
diff --git a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/property/index.rst.txt b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/property/index.rst.txt
index f4f45e5..243ba3a 100644
--- a/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/property/index.rst.txt
+++ b/docs/_sources/autoapi/ontouml_py/classes/concrete_classes/property/index.rst.txt
@@ -57,9 +57,6 @@ Classes
:ivar property_of: Reference to the Classifier instance that owns this property. This is a private attribute.
:vartype property_of: Optional[Classifier]
- :param data: Fields to be set on the model instance.
- :type data: dict[str, Any]
-
.. py:property:: property_of
:type: Optional[object]
diff --git a/docs/_sources/autoapi/ontouml_py/classes/datatypes/cardinality/index.rst.txt b/docs/_sources/autoapi/ontouml_py/classes/datatypes/cardinality/index.rst.txt
index b10ce8f..2040cda 100644
--- a/docs/_sources/autoapi/ontouml_py/classes/datatypes/cardinality/index.rst.txt
+++ b/docs/_sources/autoapi/ontouml_py/classes/datatypes/cardinality/index.rst.txt
@@ -45,14 +45,14 @@ Classes
This class allows for the specification and validation of lower and upper bounds of cardinality,
along with properties indicating whether the elements are ordered and unique.
- :param lower_bound: The lower bound of the cardinality, either an integer as a string or '*'. Defaults to None.
- :type lower_bound: Optional[str]
- :param upper_bound: The upper bound of the cardinality, either an integer as a string or '*'. Defaults to None.
- :type upper_bound: Optional[str]
- :param is_ordered: Flag indicating if the elements are ordered. Defaults to False.
- :type is_ordered: bool
- :param is_unique: Flag indicating if the elements are unique. Defaults to True.
- :type is_unique: bool
+ :ivar lower_bound: The lower bound of the cardinality, either an integer as a string or '*'. Defaults to None.
+ :vartype lower_bound: Optional[str]
+ :ivar upper_bound: The upper bound of the cardinality, either an integer as a string or '*'. Defaults to None.
+ :vartype upper_bound: Optional[str]
+ :ivar is_ordered: Flag indicating if the elements are ordered. Defaults to False.
+ :vartype is_ordered: bool
+ :ivar is_unique: Flag indicating if the elements are unique. Defaults to True.
+ :vartype is_unique: bool
:raises ValueError: If the lower or upper bounds are not valid according to the multiplicity rules.
.. py:attribute:: lower_bound
diff --git a/docs/autoapi/index.html b/docs/autoapi/index.html
index a7163c7..0eb1470 100644
--- a/docs/autoapi/index.html
+++ b/docs/autoapi/index.html
@@ -100,7 +100,7 @@
- Variables:
-_in_package (Optional[Package]) – Reference to the Package instance this element is contained in. This is a private attribute.
+
+_in_package (Optional[Package]) – Reference to the Package instance this element is contained in. This is a private attribute.
+model_config (Dict[str, Any]) – Configuration settings for the Pydantic model.
+
- Parameters:
data (dict[str, Any]) –
diff --git a/docs/autoapi/ontouml_py/classes/abstract_classes/relation/index.html b/docs/autoapi/ontouml_py/classes/abstract_classes/relation/index.html
index b4cc8c6..44edce8 100644
--- a/docs/autoapi/ontouml_py/classes/abstract_classes/relation/index.html
+++ b/docs/autoapi/ontouml_py/classes/abstract_classes/relation/index.html
@@ -91,6 +91,11 @@
ontouml_py.classes.abstract_classes.relation
+This module provides the Relation class, a subclass of Classifier, representing relations in an ontological model.
+It supports various relation stereotypes as defined in the RelationStereotype enumeration.
+The Relation class is an abstract base class and is intended to be subclassed by specific types of relations,
+such as BinaryRelation and NaryRelation. It includes validation for these subclasses and allows for the
+configuration of Pydantic model settings.
Module Contents
@@ -98,7 +103,7 @@ Classes
Relation
|
-Abstract base class for classifiers in an OntoUML model. |
+Abstract base class for representing different types of relations in an ontological model. |
@@ -106,15 +111,14 @@ Classes