Class DatatypeFormatException

All Implemented Interfaces:
Serializable

public class DatatypeFormatException extends JenaException
Exception thrown when a lexical form does not match the stated datatype.
See Also:
  • Constructor Details

    • DatatypeFormatException

      public DatatypeFormatException(String lexicalForm, RDFDatatype dtype, Throwable cause)
      Constructs a new DatatypeFormatException with the specified illegal lexical form, datatype and cause. The detail message (for later retrieval by the Throwable.getMessage() method) is generated using the given datatype and illegal lexical form.
      Parameters:
      lexicalForm - the illegal lexical form discovered. The illegal lexical form is saved for later retrieval by the getLexicalForm() method.
      dtype - the datatype that found the problem. The datatype is saved for later retrieval by the getDataType() method.
      cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
    • DatatypeFormatException

      public DatatypeFormatException(String lexicalForm, RDFDatatype dtype, String message)
      Constructs a new DatatypeFormatException with the specified illegal lexical form, datatype and detail message.
      Parameters:
      lexicalForm - the illegal lexical form discovered. The illegal lexical form is saved for later retrieval by the getLexicalForm() method.
      dtype - the datatype that found the problem. The datatype is saved for later retrieval by the getDataType() method.
      message - the detail message (which is saved for later retrieval by the Throwable.getMessage() method).
    • DatatypeFormatException

      public DatatypeFormatException()
      Creates a new instance of DatatypeFormatException without detail message.
    • DatatypeFormatException

      public DatatypeFormatException(String message, Throwable cause)
      Constructs a new DatatypeFormatException with the specified detail message and cause.
      Parameters:
      message - the detail message (which is saved for later retrieval by the Throwable.getMessage() method).
      cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
    • DatatypeFormatException

      public DatatypeFormatException(String message)
      Constructs a new @code DatatypeFormatException} with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call to Throwable.initCause(java.lang.Throwable).
      Parameters:
      message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.
  • Method Details

    • getLexicalForm

      public String getLexicalForm()
      The invalid lexical form that caused this exception.
      Returns:
      the lexical form that caused the exception. Maybe null depending on how the exception was constructed.
    • getDataType

      public RDFDatatype getDataType()
      The datatype that has an invalid lexical form.
      Returns:
      the datatype that this exception is related to. Maybe null depending on how the exception was constructed.