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
Nested ClassesModifier and TypeClassDescriptionstatic classException that is thrown when an ontology resource is converted to another facet, usually usingas(), and the requested conversion is not possible.static classException, which may happen while creation of ont-object.static classA Jena exception that indicates wrong input.static classAn exception to indicate that a feature is not supported right now or by design for current conditions.static classA Jena exception that indicates that Jena-object state is broken, which may happen in multithreading or in other uncommon situations.static classAn exception that is thrown if a recursion is found in the graph.static classException 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
ConstructorsConstructorDescriptionOntJenaException(String message) OntJenaException(String message, Throwable cause) OntJenaException(Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckFalse(Boolean mustBeFalse, String message) static <X> XcheckNotNull(X object) static <X> XcheckNotNull(X object, String message) static voidcheckSupported(boolean feature) static voidcheckSupported(boolean feature, String message) static voidstatic <T> TnotNull(T obj) static <T> Tstatic <X> XStub 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- ifXisnull- See Also:
-
checkNotNull
- Type Parameters:
X- any- Parameters:
object- anymessage- error description- Returns:
- the specified
object - Throws:
IllegalStateException- ifXisnull- See Also:
-
checkFalse
- Parameters:
mustBeFalse- condition, iftrueand exception is expectedmessage- error description- Throws:
IllegalStateException- if parameter condition istrue
-
checkTrue
- Parameters:
mustBeTrue- condition, iffalseand exception is expectedmessage- error description- Throws:
IllegalStateException- if parameter condition isfalse
-
checkSupported
public static void checkSupported(boolean feature) - Parameters:
feature- boolean- Throws:
OntJenaException.Unsupported- iffeatureisfalse
-
checkSupported
- Parameters:
feature- booleanmessage- error description- Throws:
OntJenaException.Unsupported- iffeatureisfalse
-