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 msg)
      Constructs an instance of DatatypeFormatException with the specified detail message.
      DatatypeFormatException​(java.lang.String lexicalForm, RDFDatatype dtype, java.lang.String msg)
      Preferred constructor.
    • 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.String msg)
        Preferred constructor.
        Parameters:
        lexicalForm - the illegal string discovered
        dtype - the datatype that found the problem
        msg - additional context for the error
      • DatatypeFormatException

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

        public DatatypeFormatException​(java.lang.String msg)
        Constructs an instance of DatatypeFormatException with the specified detail message.
        Parameters:
        msg - the detail message.
    • 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.