from typing import Optional

from .model import IRI, AnnotatedAxiom, Axiom, Annotation

class PyIndexedOntology:
    def get_id_for_iri(self, iri: IRI) -> Optional[str]: ...
    def get_iri_for_id(self, id: str) -> Optional[str]: ...
    def add_prefix_mapping(self, iriprefix: str, mappedid: str) -> None: ...
    def set_label(self, iri: str, label: str) -> None: ...
    def get_iri_for_label(self, label: str) -> Optional[str]: ...
    def get_iri(self) -> Optional[str]: ...
    def get_version_iri(self) -> Optional[str]: ...
    def get_subclasses(self, iri: str) -> set[str]: ...
    def get_superclasses(self, iri: str) -> set[str]: ...
    def get_classes(self) -> set[str]: ...
    def get_object_properties(self) -> set[str]: ...
    def get_annotation(self, class_iri: str, ann_iri: str) -> Optional[str]: ...
    def get_annotations(self, class_iri: str, ann_iri: str) -> list[str]: ...
    def save_to_file(self, file_name: str) -> None: ...
    def get_axioms_for_iri(self, iri: str) -> list[str]: ...
    def get_axioms(self) -> list[AnnotatedAxiom]: ...
    def add_axiom(self, ax: Axiom, annotations: Optional[set[Annotation]] = None) -> None: ...
    def remove_axiom(self, ax: Axiom) -> None: ...
    def iri(self, iri: str) -> IRI: ...


def open_ontology(path: str) -> PyIndexedOntology: ...
def get_descendants(onto: PyIndexedOntology, parent: str) -> set[str]: ...
def get_ancestors(onto: PyIndexedOntology, child: str) -> set[str]: ...