ontouml_py.model.generalization

This module defines the Generalization class, a component of the ontouml_py library.

The Generalization class represents a generalization relationship in an ontological model, linking two classifiers in a hierarchy where one (classifier) is a generalization of the other. This module includes the necessary validations to ensure the integrity of the generalization relationship, such as preventing a classifier from being a generalization of itself.

Module Contents

Classes

Generalization

Represent a generalization relationship between two classifiers in an ontological model.

class ontouml_py.model.generalization.Generalization(project, **data)

Bases: ontouml_py.model.modelelement.ModelElement, ontouml_py.model.packageable.Packageable

Represent a generalization relationship between two classifiers in an ontological model.

This class extends ModelElement and is used to define a generalization, where one classifier (the general) is a generalization of another classifier (the specific).

Variables:
  • general (Classifier) – The general classifier in the generalization relationship.

  • specific (Classifier) – The specific classifier in the generalization relationship.

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

Parameters:
  • project (Project) –

  • data (dict[str, Any]) –

general: ontouml_py.model.classifier.Classifier
specific: ontouml_py.model.classifier.Classifier
model_config