Skip to content

Commit

Permalink
save can except IRI or str
Browse files Browse the repository at this point in the history
  • Loading branch information
Demirrr committed Sep 16, 2024
1 parent 250807e commit c1eab4b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion owlapy/owl_ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,9 @@ def remove_axiom(self, axiom: Union[OWLAxiom, Iterable[OWLAxiom]]):
for ax in axiom:
_remove_axiom(ax, self, self._world)

def save(self, path: str = None, rdf_format = "rdfxml"):
def save(self, path: Union[str,IRI] = None, rdf_format = "rdfxml"):
if isinstance(path, IRI):
path=path.as_str()
ont_x:owlready2.namespace.Ontology
assert isinstance(path,str), f"path must be string. Currently it is {type(path)}"
ont_x = self._world.get_ontology(self.get_ontology_id().get_ontology_iri().as_str())
Expand Down

0 comments on commit c1eab4b

Please sign in to comment.