org.ontoware.rdf2go.util
Class ConversionException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.ontoware.rdf2go.util.ConversionException
All Implemented Interfaces:
java.io.Serializable

public class ConversionException
extends java.lang.RuntimeException

Thrown when an rdf2go adapter cannot convert from one class to another. The source object that cannot be conveted and the target class that was the goal of the conversion are passed.

Author:
sauermann
See Also:
Serialized Form

Constructor Summary
ConversionException()
          default constructor
ConversionException(java.lang.String message)
          constructor, with an injected message
ConversionException(java.lang.String message, java.lang.Object sourceObject, java.lang.Class<?> targetClass)
          Generate a new conversion exception.
ConversionException(java.lang.String message, java.lang.Throwable cause)
           
ConversionException(java.lang.Throwable cause)
           
 
Method Summary
protected static java.lang.String generateMessage(java.lang.String message, java.lang.Object sourceObject2, java.lang.Class<?> targetClass2)
          generate the error message
 java.lang.Object getSourceObject()
           
 java.lang.Class<?> getTargetClass()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConversionException

public ConversionException()
default constructor


ConversionException

public ConversionException(java.lang.String message)
constructor, with an injected message

Parameters:
message -

ConversionException

public ConversionException(java.lang.Throwable cause)
Parameters:
cause -

ConversionException

public ConversionException(java.lang.String message,
                           java.lang.Throwable cause)
Parameters:
message -
cause -

ConversionException

public ConversionException(java.lang.String message,
                           java.lang.Object sourceObject,
                           java.lang.Class<?> targetClass)
Generate a new conversion exception. The exception will start with a string automatically generated from using the toString of the source object and the targetclass. You can give a message or leave it empty.

Parameters:
message -
sourceObject -
targetClass -
Method Detail

generateMessage

protected static java.lang.String generateMessage(java.lang.String message,
                                                  java.lang.Object sourceObject2,
                                                  java.lang.Class<?> targetClass2)
generate the error message


getSourceObject

public java.lang.Object getSourceObject()
Returns:
the source object that could not be converted.

getTargetClass

public java.lang.Class<?> getTargetClass()
Returns:
the target class that should be converted to


Copyright © 2005-2008 FZI - Forschungszentrum Informatik | Karlsruhe | Germany. All Rights Reserved.