org.semanticweb.owlapi.io
Class UnparsableOntologyException

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.io.UnparsableOntologyException
All Implemented Interfaces:
java.io.Serializable

public class UnparsableOntologyException
extends OWLOntologyCreationException

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 11-Apr-2008

A class that describes how ontology parsing failed. This class collects parse errors and the parsers that generated the errors.

See Also:
Serialized Form

Constructor Summary
UnparsableOntologyException(IRI documentIRI, java.util.Map<OWLParser,OWLParserException> exceptions)
           
 
Method Summary
 IRI getDocumentIRI()
          Gets the ontology document IRI from which there was an attempt to parse an ontology
 java.util.Map<OWLParser,OWLParserException> getExceptions()
          Gets a map that lists the parsers (that were used to parse an ontology) and the errors that they generated.
 java.lang.String getMessage()
           
static boolean isIncludeStackTraceInMessage()
          Determines if the stack trace for each parse exception is included in the getMessage() method.
static void setIncludeStackTraceInMessage(boolean includeStackTraceInMessage)
          Specifies whether the stack trace for each parser exception should be included in the message generated by this exception - this can be useful for debugging purposes, but can bloat the message for end user usage.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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

UnparsableOntologyException

public UnparsableOntologyException(IRI documentIRI,
                                   java.util.Map<OWLParser,OWLParserException> exceptions)
Method Detail

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable

getDocumentIRI

public IRI getDocumentIRI()
Gets the ontology document IRI from which there was an attempt to parse an ontology

Returns:
The ontology document IRI

isIncludeStackTraceInMessage

public static boolean isIncludeStackTraceInMessage()
Determines if the stack trace for each parse exception is included in the getMessage() method.

Returns:
true if the stack trace is included in the message for this exception, other wise false.

setIncludeStackTraceInMessage

public static void setIncludeStackTraceInMessage(boolean includeStackTraceInMessage)
Specifies whether the stack trace for each parser exception should be included in the message generated by this exception - this can be useful for debugging purposes, but can bloat the message for end user usage.

Parameters:
includeStackTraceInMessage - Set to true to indicate that the stack trace for each parser exception should be included in the message for this exception, otherwise set to false.

getExceptions

public java.util.Map<OWLParser,OWLParserException> getExceptions()
Gets a map that lists the parsers (that were used to parse an ontology) and the errors that they generated.

Returns:
The map of parsers and their errors.