Class DatatypeFormatException

  • All Implemented Interfaces:
    java.io.Serializable

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

      Constructors 
      Constructor Description
      DatatypeFormatException()
      Creates a new instance of DatatypeFormatException without detail message.
      DatatypeFormatException​(java.lang.String message)
      Constructs a new @code DatatypeFormatException} with the specified detail message.
      DatatypeFormatException​(java.lang.String message, java.lang.Throwable cause)
      Constructs a new DatatypeFormatException with the specified detail message and cause.
      DatatypeFormatException​(java.lang.String lexicalForm, RDFDatatype dtype, java.lang.String message)
      Constructs a new DatatypeFormatException with the specified illegal lexical form, datatype and detail message.
      DatatypeFormatException​(java.lang.String lexicalForm, RDFDatatype dtype, java.lang.Throwable cause)
      Constructs a new DatatypeFormatException with the specified illegal lexical form, datatype and cause.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      RDFDatatype getDataType()
      The datatype that has an invalid lexical form.
      java.lang.String getLexicalForm()
      The invalid lexical form that caused this exception.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DatatypeFormatException

        public DatatypeFormatException​(java.lang.String lexicalForm,
                                       RDFDatatype dtype,
                                       java.lang.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​(java.lang.String lexicalForm,
                                       RDFDatatype dtype,
                                       java.lang.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​(java.lang.String message,
                                       java.lang.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​(java.lang.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 Detail

      • getLexicalForm

        public java.lang.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.