Package org.apache.jena.datatypes
Class DatatypeFormatException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.jena.shared.JenaException
-
- org.apache.jena.datatypes.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 ofDatatypeFormatException
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 newDatatypeFormatException
with the specified detail message and cause.DatatypeFormatException(java.lang.String lexicalForm, RDFDatatype dtype, java.lang.String message)
Constructs a newDatatypeFormatException
with the specified illegal lexical form, datatype and detail message.DatatypeFormatException(java.lang.String lexicalForm, RDFDatatype dtype, java.lang.Throwable cause)
Constructs a newDatatypeFormatException
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.
-
-
-
Constructor Detail
-
DatatypeFormatException
public DatatypeFormatException(java.lang.String lexicalForm, RDFDatatype dtype, java.lang.Throwable cause)
Constructs a newDatatypeFormatException
with the specified illegal lexical form, datatype and cause. The detail message (for later retrieval by theThrowable.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 thegetLexicalForm()
method.dtype
- the datatype that found the problem. The datatype is saved for later retrieval by thegetDataType()
method.cause
- the cause (which is saved for later retrieval by theThrowable.getCause()
method). (Anull
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 newDatatypeFormatException
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 thegetLexicalForm()
method.dtype
- the datatype that found the problem. The datatype is saved for later retrieval by thegetDataType()
method.message
- the detail message (which is saved for later retrieval by theThrowable.getMessage()
method).
-
DatatypeFormatException
public DatatypeFormatException()
Creates a new instance ofDatatypeFormatException
without detail message.
-
DatatypeFormatException
public DatatypeFormatException(java.lang.String message, java.lang.Throwable cause)
Constructs a newDatatypeFormatException
with the specified detail message and cause.- Parameters:
message
- the detail message (which is saved for later retrieval by theThrowable.getMessage()
method).cause
- the cause (which is saved for later retrieval by theThrowable.getCause()
method). (Anull
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 toThrowable.initCause(java.lang.Throwable)
.- Parameters:
message
- the detail message. The detail message is saved for later retrieval by theThrowable.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.
-
-