pycrap.ontology_wrapper
=======================

.. py:module:: pycrap.ontology_wrapper


Classes
-------

.. autoapisummary::

   pycrap.ontology_wrapper.OntologyWrapper


Module Contents
---------------

.. py:class:: OntologyWrapper

   Wrapper class for user-friendly access of the owlready2 ontology class.

   This class spawns a temporary file that is used to store the ontology.
   This has to be done whenever several PyCRAP ontologies are needed that store different individuals.


   .. py:attribute:: ontology
      :type:  owlready2.Ontology

      The owlready2 ontology that is used for reasoning.



   .. py:attribute:: file
      :type:  tempfile.NamedTemporaryFile

      The file that the ontology is stored in.



   .. py:attribute:: python_objects
      :type:  typing_extensions.Dict[pycrap.ontologies.base.Base, typing_extensions.Any]

      A dictionary that maps ontology individuals to python objects.



   .. py:property:: path
      :type: str



   .. py:method:: individuals()


   .. py:method:: destroy_individuals()

      Destroys all individuals in the ontology.



   .. py:method:: classes()
      :staticmethod:


      :return: All classes of the PyCRAP ontology.



   .. py:method:: search(*args, **kwargs)

      Check https://owlready2.readthedocs.io/en/latest/onto.html#simple-queries for details.

      :return: The search results of the ontology.



   .. py:method:: search_one(*args, **kwargs)


   .. py:method:: __enter__()


   .. py:method:: __exit__(exc_type, exc_val, exc_tb)


   .. py:method:: reason()

      Reason over the ontology. This may take a long time.



   .. py:method:: add_individual(individual: pycrap.ontologies.base.Base, python_object: typing_extensions.Any)


