com.hp.hpl.jena.rdf.model
Class RDFException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended bycom.hp.hpl.jena.shared.JenaException
                  extended bycom.hp.hpl.jena.rdf.model.RDFException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DoesNotReifyException, JenaAltHasNoDefaultException, JenaHasNoModelException, JenaLiteralRequiredException, JenaResourceRequiredException, JenaSeqIndexBoundsException

public class RDFException
extends com.hp.hpl.jena.shared.JenaException

LEGACY Generic RDF Exception class. This class is preserved to allow users moving from Jena 1 to Jena 2 to continue to use the magic numbers for Jena exceptions. The codebase no longer uses these numbers directly, but instead uses particular Jena exceptions. Those exceptions presently subclass RDFException and set the magic numbers, but This Will Change.

Version:
$Name: $ $Revision: 1.9 $ $Date: 2003/06/16 11:20:28 $
Author:
bwm
See Also:
Serialized Form

Field Summary
static int ALTHASNODEFAULT
          An Alt resource has no default value.
static int ASSERTIONFAILURE
          Internal Error - an assertion has failed.
static int INVALIDBOOLEANFORMAT
          A literal did not represent a boolean value.
static int INVALIDERRORCODE
          The error code is invalid.
static int INVALIDPROPERTYURI
          The URI supplied for a Property is invalid.
static int ITERATORCLOSED
          The iterator is closed.
static int LITERALNOTCHAR
          A literal did not contain a valid char.
static int NESTEDEXCEPTION
          This exception contains another which has been caught and encapsulated as an RDF exception.
static int NOREADERFORLANG
          No reader is know for that lanaguage
static int NORESOURCECONSTRUCTOR
          An enhanced resource does not have a constructor of the form foo(Resource r)
static int NOSUCHELEMENT
          A required element does not exist.
static int NOTANONRESOURCE
          The resource is no anonymous.
static int NOTRELATEDTOMODEL
          A method which would access a model has been invoked on an object with no associated model.
static int NOWRITERFORLANG
          No Writer is known for that language
static int OBJECTNOTLITERAL
          The object of a Statement is not a Literal.
static int OBJECTNOTRESOURCE
          The object of a statement is not a Resource.
static int OBJECTWRONGTYPE
          The object of a statement is not of the expected type.
static int PROPERTYNOTFOUND
          A property was not found in the model.
static int SELECTOREXCEPTION
          An application supplied Selector has raised an exception, which is encapsulated in this exception.
static int SEQINDEXBOUNDS
          A sequence index is out of the valid range for that sequence.
static int STATEMENTNOTPRESENT
          Statement not present
static int SYNTAXERROR
          Syntax Errors in input stream
static int UNKNOWNPROPERTY
          Unknown Property
static int UNSUPPORTEDOPERATION
          A method which is unsupported has been called.
 
Constructor Summary
RDFException(java.lang.Exception e)
          Encapsulate an exception in an RDFException.
RDFException(int errorCode)
          Create an RDF exception with the given error code.
RDFException(int errorCode, java.lang.String message)
          Create a new RDFException with a given error code and message
RDFException(java.lang.String s)
           
 
Method Summary
 java.lang.Throwable getCause()
          changed by Chris, because "use this if we haven't one" caused a recursive failure of test cases that exported DoesNotReifyException.
 int getErrorCode()
           
 java.lang.String getMessage()
           
 java.lang.Exception getNestedException()
           
 java.lang.String toString()
          Return an error message describing the exception.
 
Methods inherited from class com.hp.hpl.jena.shared.JenaException
printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NOTRELATEDTOMODEL

public static final int NOTRELATEDTOMODEL
A method which would access a model has been invoked on an object with no associated model.

See Also:
Constant Field Values

INVALIDPROPERTYURI

public static final int INVALIDPROPERTYURI
The URI supplied for a Property is invalid.

See Also:
Constant Field Values

UNSUPPORTEDOPERATION

public static final int UNSUPPORTEDOPERATION
A method which is unsupported has been called.

See Also:
Constant Field Values

OBJECTNOTRESOURCE

public static final int OBJECTNOTRESOURCE
The object of a statement is not a Resource.

See Also:
Constant Field Values

OBJECTNOTLITERAL

public static final int OBJECTNOTLITERAL
The object of a Statement is not a Literal.

See Also:
Constant Field Values

PROPERTYNOTFOUND

public static final int PROPERTYNOTFOUND
A property was not found in the model.

See Also:
Constant Field Values

NOTANONRESOURCE

public static final int NOTANONRESOURCE
The resource is no anonymous.

See Also:
Constant Field Values

ITERATORCLOSED

public static final int ITERATORCLOSED
The iterator is closed.

See Also:
Constant Field Values

INVALIDERRORCODE

public static final int INVALIDERRORCODE
The error code is invalid.

See Also:
Constant Field Values

NESTEDEXCEPTION

public static final int NESTEDEXCEPTION
This exception contains another which has been caught and encapsulated as an RDF exception.

See Also:
Constant Field Values

INVALIDBOOLEANFORMAT

public static final int INVALIDBOOLEANFORMAT
A literal did not represent a boolean value.

See Also:
Constant Field Values

LITERALNOTCHAR

public static final int LITERALNOTCHAR
A literal did not contain a valid char.

See Also:
Constant Field Values

ALTHASNODEFAULT

public static final int ALTHASNODEFAULT
An Alt resource has no default value.

See Also:
Constant Field Values

SELECTOREXCEPTION

public static final int SELECTOREXCEPTION
An application supplied Selector has raised an exception, which is encapsulated in this exception.

See Also:
Constant Field Values

OBJECTWRONGTYPE

public static final int OBJECTWRONGTYPE
The object of a statement is not of the expected type.

See Also:
Constant Field Values

NOSUCHELEMENT

public static final int NOSUCHELEMENT
A required element does not exist.

See Also:
Constant Field Values

ASSERTIONFAILURE

public static final int ASSERTIONFAILURE
Internal Error - an assertion has failed.

See Also:
Constant Field Values

SEQINDEXBOUNDS

public static final int SEQINDEXBOUNDS
A sequence index is out of the valid range for that sequence.

See Also:
Constant Field Values

NORESOURCECONSTRUCTOR

public static final int NORESOURCECONSTRUCTOR
An enhanced resource does not have a constructor of the form foo(Resource r)

See Also:
Constant Field Values

NOREADERFORLANG

public static final int NOREADERFORLANG
No reader is know for that lanaguage

See Also:
Constant Field Values

NOWRITERFORLANG

public static final int NOWRITERFORLANG
No Writer is known for that language

See Also:
Constant Field Values

UNKNOWNPROPERTY

public static final int UNKNOWNPROPERTY
Unknown Property

See Also:
Constant Field Values

STATEMENTNOTPRESENT

public static final int STATEMENTNOTPRESENT
Statement not present

See Also:
Constant Field Values

SYNTAXERROR

public static final int SYNTAXERROR
Syntax Errors in input stream

See Also:
Constant Field Values
Constructor Detail

RDFException

public RDFException(int errorCode)
Create an RDF exception with the given error code.

Parameters:
errorCode - The code number of the error which has occurred.

RDFException

public RDFException(java.lang.Exception e)
Encapsulate an exception in an RDFException.

Parameters:
e - The exception to be encapsulated.

RDFException

public RDFException(int errorCode,
                    java.lang.String message)
Create a new RDFException with a given error code and message

Parameters:
errorCode - The code number of the error which has occurred.
message - The message associated with the error

RDFException

public RDFException(java.lang.String s)
Method Detail

toString

public java.lang.String toString()
Return an error message describing the exception.

Returns:
the error message

getMessage

public java.lang.String getMessage()

getErrorCode

public int getErrorCode()

getCause

public java.lang.Throwable getCause()
changed by Chris, because "use this if we haven't one" caused a recursive failure of test cases that exported DoesNotReifyException.


getNestedException

public java.lang.Exception getNestedException()


Copyright © 2001-2003 Hewlett-Packard. All Rights Reserved.