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 msg)
Constructs an instance ofDatatypeFormatException
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.
-
-
-
Constructor Detail
-
DatatypeFormatException
public DatatypeFormatException(java.lang.String lexicalForm, RDFDatatype dtype, java.lang.String msg)
Preferred constructor.- Parameters:
lexicalForm
- the illegal string discovereddtype
- the datatype that found the problemmsg
- additional context for the error
-
DatatypeFormatException
public DatatypeFormatException()
Creates a new instance ofDatatypeFormatException
without detail message.
-
DatatypeFormatException
public DatatypeFormatException(java.lang.String msg)
Constructs an instance ofDatatypeFormatException
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.
-
-