org.w3c.ddr.simple.exception
Class NameException

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.NameException
All Implemented Interfaces:
java.io.Serializable

public class NameException
extends DDRException

This exception is thrown when an attempt is made to access a Property or Aspect when the name or vocabulary IRI is in error. The exception code, when set, indicates the nature of the error.

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 ASPECT_NOT_RECOGNIZED
          Code for 'Aspect not recognized'.
static int PROPERTY_NOT_RECOGNIZED
          Code for 'Property not recognized'.
static int VOCABULARY_NOT_RECOGNIZED
          Code for 'Vocabulary not recognized'.
 
Fields inherited from class org.w3c.ddr.simple.exception.DDRException
code, IMPLEMENTATION_ERROR
 
Constructor Summary
NameException()
          Constructs a NameException instance with default exception code.
NameException(int code, java.lang.String message)
          Constructs a NameException instance with a code and human-readable message.
NameException(int code, java.lang.Throwable thr)
          Constructs a NameException instance with a code and an instance of Throwable, which may contain additional information pertaining to 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

PROPERTY_NOT_RECOGNIZED

public static int PROPERTY_NOT_RECOGNIZED
Code for 'Property not recognized'. This exception code indicates that a given Property does not exist in the given vocabulary or is not syntactically correct.


VOCABULARY_NOT_RECOGNIZED

public static int VOCABULARY_NOT_RECOGNIZED
Code for 'Vocabulary not recognized'. This exception code indicates that the vocabulary of a given Property is not known or is not syntactically correct.


ASPECT_NOT_RECOGNIZED

public static int ASPECT_NOT_RECOGNIZED
Code for 'Aspect not recognized'. This exception code indicates that the Aspect is not known or is not syntactically correct. It is assumed in the Simple DDR API that the vocabulary of an Aspect derives from the vocabulary of the Property to which it is applied.

Constructor Detail

NameException

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


NameException

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

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

NameException

public NameException(int code,
                     java.lang.Throwable thr)
Constructs a NameException instance with a code and an instance of Throwable, which may contain additional information pertaining to 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.