Package org.semanticweb.owlapi.util
Class OWLEntityRemover
java.lang.Object
org.semanticweb.owlapi.util.OWLEntityRemover
- All Implemented Interfaces:
OWLClassVisitorBase
,OWLDataEntityVisitorBase
,OWLEntityVisitor
,OWLIndividualEntityVisitorBase
,OWLPropertyEntityVisitorBase
,OWLVisitorBase
A convenience object that generates the changes which are necessary to remove
an entity from a set of ontologies. This is accomplished by removing all
axioms that refer to the entity. The entity remover follows the visitor
design pattern, entities that need to be removed from an ontology should
accept visits from the entity remover. Changes are accumulated as the entity
remover visits various entities.
- Since:
- 2.0.0
- Author:
- Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
-
Constructor Summary
ConstructorsConstructorDescriptionOWLEntityRemover
(Collection<OWLOntology> ontologies) Creates an entity remover, which will remove entities (axioms referring to the entities from the specified ontologies).OWLEntityRemover
(Stream<OWLOntology> ontologies) Creates an entity remover, which will remove entities (axioms referring to the entities from the specified ontologies).OWLEntityRemover
(OWLOntology ontology) Creates an entity remover, which will remove entities (axioms referring to the entities from the specified ontologies). -
Method Summary
Modifier and TypeMethodDescriptionvoid
reset()
Clears any changes which have accumulated over the course of visiting different entities.void
visit
(OWLAnnotationProperty property) visit OWLAnnotationProperty typevoid
visit OWLClass typevoid
visit
(OWLDataProperty property) visit OWLDataProperty typevoid
visit
(OWLDatatype datatype) visit OWLDatatype typevoid
visit
(OWLNamedIndividual individual) visit OWLNamedIndividual typevoid
visit
(OWLObjectProperty property) visit OWLObjectProperty typeMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.semanticweb.owlapi.model.OWLVisitorBase
doDefault, getDefaultReturnValue, handleDefault
-
Constructor Details
-
OWLEntityRemover
Creates an entity remover, which will remove entities (axioms referring to the entities from the specified ontologies).- Parameters:
ontologies
- The set of ontologies that contain references to axioms to be removed.
-
OWLEntityRemover
Creates an entity remover, which will remove entities (axioms referring to the entities from the specified ontologies).- Parameters:
ontologies
- The stream of ontologies that contain references to axioms to be removed.
-
OWLEntityRemover
Creates an entity remover, which will remove entities (axioms referring to the entities from the specified ontologies).- Parameters:
ontology
- The ontology that contain references to axioms to be removed.
-
-
Method Details
-
getChanges
- Returns:
- the list of ontology changes that are required in order to remove visited entities from the set of ontologies.
-
reset
public void reset()Clears any changes which have accumulated over the course of visiting different entities. -
visit
Description copied from interface:OWLClassVisitorBase
visit OWLClass type- Specified by:
visit
in interfaceOWLClassVisitorBase
- Parameters:
cls
- ce to visit
-
visit
Description copied from interface:OWLDataEntityVisitorBase
visit OWLDatatype type- Specified by:
visit
in interfaceOWLDataEntityVisitorBase
- Parameters:
datatype
- node to visit
-
visit
Description copied from interface:OWLIndividualEntityVisitorBase
visit OWLNamedIndividual type- Specified by:
visit
in interfaceOWLIndividualEntityVisitorBase
- Parameters:
individual
- individual to visit
-
visit
Description copied from interface:OWLPropertyEntityVisitorBase
visit OWLDataProperty type- Specified by:
visit
in interfaceOWLPropertyEntityVisitorBase
- Parameters:
property
- property to visit
-
visit
Description copied from interface:OWLPropertyEntityVisitorBase
visit OWLObjectProperty type- Specified by:
visit
in interfaceOWLPropertyEntityVisitorBase
- Parameters:
property
- property to visit
-
visit
Description copied from interface:OWLPropertyEntityVisitorBase
visit OWLAnnotationProperty type- Specified by:
visit
in interfaceOWLPropertyEntityVisitorBase
- Parameters:
property
- property to visit
-