java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.jena.shared.JenaException
org.apache.jena.ontapi.OntJenaException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
OntJenaException.Conversion
,OntJenaException.Creation
,OntJenaException.IllegalArgument
,OntJenaException.IllegalCall
,OntJenaException.IllegalState
,OntJenaException.Recursion
,OntJenaException.Unsupported
public class OntJenaException
extends org.apache.jena.shared.JenaException
A base ONT-API jena exception.
The class also contains some exception-related utilities.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Exception that is thrown when an ontology resource is converted to another facet, usually usingas()
, and the requested conversion is not possible.static class
Exception, which may happen while creation of ont-object.static class
A Jena exception that indicates wrong input.static class
An exception to indicate that a feature is not supported right now or by design for current conditions.static class
A Jena exception that indicates that Jena-object state is broken, which may happen in multithreading or in other uncommon situations.static class
An exception that is thrown if a recursion is found in the graph.static class
Exception that is raised when an ontology operation is attempted that is not present in the configuration (e.g. language profile) for the current ontology model. -
Constructor Summary
ConstructorDescriptionOntJenaException
(String message) OntJenaException
(String message, Throwable cause) OntJenaException
(Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkFalse
(Boolean mustBeFalse, String message) static <X> X
checkNotNull
(X object) static <X> X
checkNotNull
(X object, String message) static void
checkSupported
(boolean feature) static void
checkSupported
(boolean feature, String message) static void
static <T> T
notNull
(T obj) static <T> T
static <X> X
Stub for TO-DO.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
OntJenaException
public OntJenaException() -
OntJenaException
-
OntJenaException
-
OntJenaException
-
-
Method Details
-
notNull
public static <T> T notNull(T obj) -
notNull
-
TODO
Stub for TO-DO.- Type Parameters:
X
- any- Parameters:
message
- error description- Returns:
- X
-
checkNotNull
public static <X> X checkNotNull(X object) - Type Parameters:
X
- any- Parameters:
object
- any- Returns:
- the specified
object
- Throws:
IllegalStateException
- ifX
isnull
- See Also:
-
checkNotNull
- Type Parameters:
X
- any- Parameters:
object
- anymessage
- error description- Returns:
- the specified
object
- Throws:
IllegalStateException
- ifX
isnull
- See Also:
-
checkFalse
- Parameters:
mustBeFalse
- condition, iftrue
and exception is expectedmessage
- error description- Throws:
IllegalStateException
- if parameter condition istrue
-
checkTrue
- Parameters:
mustBeTrue
- condition, iffalse
and exception is expectedmessage
- error description- Throws:
IllegalStateException
- if parameter condition isfalse
-
checkSupported
public static void checkSupported(boolean feature) - Parameters:
feature
- boolean- Throws:
OntJenaException.Unsupported
- iffeature
isfalse
-
checkSupported
- Parameters:
feature
- booleanmessage
- error description- Throws:
OntJenaException.Unsupported
- iffeature
isfalse
-