fuzzy_dl_owl2.fuzzydl.query.instance_query
An abstract base class that defines a framework for querying the membership degree of a specific individual within a given concept.
Description
This class serves as a foundational component for determining how strongly a particular individual belongs to a specific concept within a fuzzy description logic system. By inheriting from the abstract query base, it enforces a strict validation during initialization to ensure that the target concept is abstract rather than concrete, raising an error if this constraint is violated. The design stores the provided concept and individual as core attributes while initializing a placeholder for the membership expression, which subclasses are expected to populate with specific logic for calculating or retrieving degrees. This structure allows for specialized implementations, such as finding minimum or maximum membership degrees, to build upon a consistent and validated data model.
Classes
This abstract base class defines a framework for querying specific instances of a concept relative to a particular individual, typically used to identify instances with minimum or maximum membership degrees. Upon initialization, it accepts a concept and an individual, validating that the concept is abstract and raising an error if a concrete concept is provided. It maintains an expression attribute to represent the degree of membership, which is intended to be populated by subclasses to facilitate the specific query logic. |
Module Contents
UML Class Diagram for InstanceQuery
- class InstanceQuery(
- concept: fuzzy_dl_owl2.fuzzydl.concept.concept.Concept,
- individual: fuzzy_dl_owl2.fuzzydl.individual.individual.Individual,
Bases:
fuzzy_dl_owl2.fuzzydl.query.query.Query,abc.ABC
This abstract base class defines a framework for querying specific instances of a concept relative to a particular individual, typically used to identify instances with minimum or maximum membership degrees. Upon initialization, it accepts a concept and an individual, validating that the concept is abstract and raising an error if a concrete concept is provided. It maintains an expression attribute to represent the degree of membership, which is intended to be populated by subclasses to facilitate the specific query logic.
- Parameters:
conc (Concept) – The concept for which to retrieve the instance.
ind (Individual) – The individual for which to retrieve the instance.
obj_expr (Expression) – Expression representing the degree of membership of the individual to the concept.
- obj_expr: fuzzy_dl_owl2.fuzzydl.milp.expression.Expression = None