The entire contents of the ontology in terms of axioms are immutable objects, so a deep copy only needs to add all the axioms from OWLOntology to another - you only need to create OWLOntology with the same OWLOntologyID in another OWLOntologyManager and add all the axioms. Since axioms, entities, and expressions are immutable, their references, referred to by two OWLOntologies, do not lead to the fact that the changes propagate from one to the other or to the conditions of the race.
Adding all the axioms can be done as in the loopasam answer, which is really correct.
source share