org.semanticweb.owlapi.util
Class OWLEntityRemover

java.lang.Object
  extended by org.semanticweb.owlapi.util.OWLEntityRemover
All Implemented Interfaces:
OWLEntityVisitor

public class OWLEntityRemover
extends java.lang.Object
implements OWLEntityVisitor

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 11-Dec-2006

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.


Constructor Summary
OWLEntityRemover(OWLOntologyManager owlOntologyManager, java.util.Set<OWLOntology> ontologies)
          Creates an entity remover, which will remove entities (axioms referring to the entities from the specified ontologies).
 
Method Summary
 java.util.List<OWLOntologyChange> getChanges()
          Gets the list of ontology changes that are required in order to remove visited entities from the set of ontologies.
 void reset()
          Clears any changes which have accumulated over the course of visiting different entities.
 void visit(OWLAnnotationProperty property)
           
 void visit(OWLClass cls)
           
 void visit(OWLDataProperty property)
           
 void visit(OWLDatatype datatype)
           
 void visit(OWLNamedIndividual individual)
           
 void visit(OWLObjectProperty property)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OWLEntityRemover

public OWLEntityRemover(OWLOntologyManager owlOntologyManager,
                        java.util.Set<OWLOntology> ontologies)
Creates an entity remover, which will remove entities (axioms referring to the entities from the specified ontologies).

Parameters:
owlOntologyManager - The OWLOntologyManager which contains the ontologies that contain entities to be removed.
ontologies - The set of ontologies that contain references to axioms to be removed.
Method Detail

getChanges

public java.util.List<OWLOntologyChange> getChanges()
Gets 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

public void visit(OWLClass cls)
Specified by:
visit in interface OWLEntityVisitor

visit

public void visit(OWLDatatype datatype)
Specified by:
visit in interface OWLEntityVisitor

visit

public void visit(OWLNamedIndividual individual)
Specified by:
visit in interface OWLEntityVisitor

visit

public void visit(OWLDataProperty property)
Specified by:
visit in interface OWLEntityVisitor

visit

public void visit(OWLObjectProperty property)
Specified by:
visit in interface OWLEntityVisitor

visit

public void visit(OWLAnnotationProperty property)
Specified by:
visit in interface OWLEntityVisitor