org.semanticweb.owlapi.model
Class OWLOntologyAlreadyExistsException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.semanticweb.owlapi.model.OWLException
              extended by org.semanticweb.owlapi.model.OWLOntologyCreationException
                  extended by org.semanticweb.owlapi.model.OWLOntologyAlreadyExistsException
All Implemented Interfaces:
java.io.Serializable

public class OWLOntologyAlreadyExistsException
extends OWLOntologyCreationException

Author: Matthew Horridge
The University of Manchester
Information Management Group
Date: 18-Jan-2009

Indicates that an ontology with the given ontology IRI (and possible version IRI) exists.

See Also:
Serialized Form

Constructor Summary
OWLOntologyAlreadyExistsException(OWLOntologyID id)
          Constructs an OWLOntologyAlreadyExistsException to describe the situation where an attempt to create an ontology failed because the manager already contained an ontology with specified ontology ID.
OWLOntologyAlreadyExistsException(OWLOntologyID ontologyID, IRI documentIRI)
          Constructs an OWLOntologyAlreadyExistsException to describe the situation where an attempt to load an ontology failed because the manager already contained an ontology with the ID that was the same as the ontology being loaded
 
Method Summary
 IRI getDocumentIRI()
          Gets the document IRI where the ontology was loaded from
 OWLOntologyID getOntologyID()
          Gets the ID of the ontology that already exists
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OWLOntologyAlreadyExistsException

public OWLOntologyAlreadyExistsException(OWLOntologyID id)
Constructs an OWLOntologyAlreadyExistsException to describe the situation where an attempt to create an ontology failed because the manager already contained an ontology with specified ontology ID.

Parameters:
id - The ID of the ontology (not null) that was already contained in the manager.

OWLOntologyAlreadyExistsException

public OWLOntologyAlreadyExistsException(OWLOntologyID ontologyID,
                                         IRI documentIRI)
Constructs an OWLOntologyAlreadyExistsException to describe the situation where an attempt to load an ontology failed because the manager already contained an ontology with the ID that was the same as the ontology being loaded

Parameters:
ontologyID - The ontology ID
documentIRI - The IRI of the document where the load attempt occurred from
Method Detail

getOntologyID

public OWLOntologyID getOntologyID()
Gets the ID of the ontology that already exists

Returns:
The ontology ID.

getDocumentIRI

public IRI getDocumentIRI()
Gets the document IRI where the ontology was loaded from

Returns:
The IRI of the document where the ontology was loaded from. If the ontology was created without loading it from an ontology document then the return value will be null.