org.w3c.ddr.simple.exception
Class ValueException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.w3c.ddr.simple.exception.DDRException
              extended by org.w3c.ddr.simple.exception.ValueException
All Implemented Interfaces:
java.io.Serializable

public class ValueException
extends DDRException

This exception represents an error with a value associated with a Property and would most likely be thrown when an error is detected during an attempt to retrieve the value of a Property.

Author:
Jo Rabin (dotMobi),
Jose Manuel Cantera Fonseca (Telefonica I+D),
Rotan Hanrahan (MobileAware),
Ignacio Marin (Fundacion CTIC)
Copyright © 2008 W3C® (MIT, ERCIM, Keio), All Rights Reserved.
W3C liability, trademark and document use rules apply.
See Also:
Serialized Form

Field Summary
static int INCOMPATIBLE_TYPES
          Code for 'Incompatible type'.
static int MULTIPLE_VALUES
          Code for 'Multiple values'.
static int NOT_KNOWN
          Code for 'Not known'.
 
Fields inherited from class org.w3c.ddr.simple.exception.DDRException
code, IMPLEMENTATION_ERROR
 
Constructor Summary
ValueException()
          Constructs a ValueException instance with a default exception code.
ValueException(int code, java.lang.String message)
          Constructs a ValueException instance with a code and human-readable diagnostic message.
ValueException(int code, java.lang.Throwable thr)
          Constructs a ValueException instance with a code and Throwable object that may indicate further details of the cause of the exception.
 
Method Summary
 
Methods inherited from class org.w3c.ddr.simple.exception.DDRException
getCode, getMessage
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INCOMPATIBLE_TYPES

public static int INCOMPATIBLE_TYPES
Code for 'Incompatible type'. This code indicates that an attempt was made to represent the value in a type that was incompatible with the semantics of the property. For example, an attempt to use an enumeration value as an integer.


NOT_KNOWN

public static int NOT_KNOWN
Code for 'Not known'. This code indicates that a value for a legitimate property could not be retrieved from the repository because a value for the property is not known to the repository. For a PropertyValue instance, this exception can be anticipated via the exists() method which would return False to indicate that the value is not known.


MULTIPLE_VALUES

public static int MULTIPLE_VALUES
Code for 'Multiple values'. This code indicates that there are more than one possible value for the Property instance. Such a situation may arise when a value is being obtained from the repository but multiple values are available in the repository and more than one of these values are applicable in the identified delivery context.

Constructor Detail

ValueException

public ValueException()
Constructs a ValueException instance with a default exception code.


ValueException

public ValueException(int code,
                      java.lang.String message)
Constructs a ValueException instance with a code and human-readable diagnostic message.

Parameters:
code - This should be a constant from this exception class.
message - Diagnostic message intended for human reading.

ValueException

public ValueException(int code,
                      java.lang.Throwable thr)
Constructs a ValueException instance with a code and Throwable object that may indicate further details of the cause of the exception.

Parameters:
code - This should be a constant from this exception class.
thr - A Throwable object that may contain further details on the exception.