Class OntJenaException

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:
  • Constructor Details

    • OntJenaException

      public OntJenaException()
    • OntJenaException

      public OntJenaException(String message)
    • OntJenaException

      public OntJenaException(Throwable cause)
    • OntJenaException

      public OntJenaException(String message, Throwable cause)
  • Method Details

    • notNull

      public static <T> T notNull(T obj)
    • notNull

      public static <T> T notNull(T obj, String message)
    • TODO

      public static <X> X TODO(String message)
      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 - if X is null
      See Also:
    • checkNotNull

      public static <X> X checkNotNull(X object, String message)
      Type Parameters:
      X - any
      Parameters:
      object - any
      message - error description
      Returns:
      the specified object
      Throws:
      IllegalStateException - if X is null
      See Also:
    • checkFalse

      public static void checkFalse(Boolean mustBeFalse, String message)
      Parameters:
      mustBeFalse - condition, if true and exception is expected
      message - error description
      Throws:
      IllegalStateException - if parameter condition is true
    • checkTrue

      public static void checkTrue(Boolean mustBeTrue, String message)
      Parameters:
      mustBeTrue - condition, if false and exception is expected
      message - error description
      Throws:
      IllegalStateException - if parameter condition is false
    • checkSupported

      public static void checkSupported(boolean feature)
      Parameters:
      feature - boolean
      Throws:
      OntJenaException.Unsupported - if feature is false
    • checkSupported

      public static void checkSupported(boolean feature, String message)
      Parameters:
      feature - boolean
      message - error description
      Throws:
      OntJenaException.Unsupported - if feature is false