fuzzy_dl_owl2.fuzzydl.query.instance_query

An abstract base class provides a framework for querying the membership degree of a specific individual within a given concept.

Description

Extending the generic Query interface, this abstract class establishes a structural foundation for evaluating how strongly a specific individual belongs to a particular concept. It enforces a strict design constraint by validating that the provided concept is abstract, raising an error if a concrete concept is supplied, which ensures that only appropriate data types are processed during instance retrieval. During initialization, the component stores the target concept and individual as attributes while initializing an expression placeholder intended to represent the degree of membership. This architecture allows subclasses to focus on populating the expression with specific logic for identifying instances with minimum or maximum membership degrees without needing to re-implement the validation or storage mechanisms.

Classes

InstanceQuery

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

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

Inheritance diagram of fuzzy_dl_owl2.fuzzydl.query.instance_query.InstanceQuery

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.

conc: fuzzy_dl_owl2.fuzzydl.concept.concept.Concept
ind: fuzzy_dl_owl2.fuzzydl.individual.individual.Individual
obj_expr: fuzzy_dl_owl2.fuzzydl.milp.expression.Expression = None