org.semanticweb.owlapi.model
Class SetOntologyID

java.lang.Object
  extended by org.semanticweb.owlapi.model.OWLOntologyChange
      extended by org.semanticweb.owlapi.model.SetOntologyID

public class SetOntologyID
extends OWLOntologyChange

Author: Matthew Horridge
The University of Manchester
Information Management Group
Date: 01-Apr-2009


Constructor Summary
SetOntologyID(OWLOntology ont, OWLOntologyID ontologyID)
          Creates a set ontology URI change, which will set the URI of the ontology to the specified new URI.
 
Method Summary
 void accept(OWLOntologyChangeVisitor visitor)
           
 boolean equals(java.lang.Object obj)
           
 OWLAxiom getAxiom()
          If the change is an axiom change (i.e.
 OWLOntologyID getNewOntologyID()
          Gets the new URI - i.e.
 OWLOntologyID getOriginalOntologyID()
          Gets the original ID of the ontology whose URI was changed
 int hashCode()
           
 boolean isAxiomChange()
          Determines if the change will cause the addition or removal of an axiom from an ontology.
 boolean isImportChange()
          Determines if this change is an import change
 
Methods inherited from class org.semanticweb.owlapi.model.OWLOntologyChange
getOntology
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetOntologyID

public SetOntologyID(OWLOntology ont,
                     OWLOntologyID ontologyID)
Creates a set ontology URI change, which will set the URI of the ontology to the specified new URI.

Parameters:
ont - The ontology whose URI is to be changed
ontologyID - The ontology ID
Method Detail

isImportChange

public boolean isImportChange()
Determines if this change is an import change

Specified by:
isImportChange in class OWLOntologyChange
Returns:
true if this change is an import change, otherwise false.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

isAxiomChange

public boolean isAxiomChange()
Description copied from class: OWLOntologyChange
Determines if the change will cause the addition or removal of an axiom from an ontology.

Specified by:
isAxiomChange in class OWLOntologyChange
Returns:
true if the change is an OWLAddAxiomChange or OWLRemoveAxiomChange otherwise false.

getAxiom

public OWLAxiom getAxiom()
If the change is an axiom change (i.e. AddAxiom or RemoveAxiom) this method obtains the axiom.

Specified by:
getAxiom in class OWLOntologyChange
Returns:
The Axiom if this change is an axiom change
Throws:
java.lang.UnsupportedOperationException - If the change is not an axiom change (check with the isAxiomChange method first).

getOriginalOntologyID

public OWLOntologyID getOriginalOntologyID()
Gets the original ID of the ontology whose URI was changed

Returns:
The original ID

getNewOntologyID

public OWLOntologyID getNewOntologyID()
Gets the new URI - i.e. the URI of the ontology after the change was applied.


accept

public void accept(OWLOntologyChangeVisitor visitor)
Specified by:
accept in class OWLOntologyChange