org.gcube.common
Class OAIException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.gcube.common.OAIException
All Implemented Interfaces:
Serializable

public class OAIException
extends Exception

This class implements an exception object that all OAI classes will throw in case of an error.

See Also:
Serialized Form

Field Summary
 short code
          Exception code
static short CRITICAL_ERR
          All the other critical system or network error
static short FAILED_REFRESH_ERR
          A failed attempt has been made to Refresh an OAIRecord.
static short HTTP_ERR
          The OAI provider returned an unexpected HTTP status code, such as 400.
static short ID_ONLY_ERR
          This error is currently unused.
static short INVALID_RESPONSE_ERR
          The XML response returned by the OAI provider is not valid, usually because it is missing a key element such as or .
static short INVALID_VERB_ERR
          An attempt to use a verb parameter value that is not supported by the OAI protocol has been made.
static short NO_BASE_URL_ERR
          A property or method which depends on contacting an OAI Provider site is being accessed without first setting the BaseURL property of the OAIRepository.
static short NO_MORE_SETS_ERR
          An attempt has been made to MoveNext past the end of a list of records.
static short NO_OAI_IDENTIFIER_ERR
          The Identify request did not return an oai-identifier description, so this property is not available.
static short NOT_INITIALIZED_ERR
          An attempt to use an uninitialized OAIResumptionStream has been made.
static short OAI_2_ONLY_ERR
          An attempt to use a feature not spported by OAI 1.x repositories
static short OAI_ERR
          An OAI error
static short RETRY_AFTER_ERR
          'value' is not a valid retry-after header
static short RETRY_LIMIT_ERR
          In the case of an HTTP 503 status, the maximum number of allowable retries has been exceeded.
static short UNKNOWN_ELEMENT_ERR
          An OAIRecordList contains elements which are not legal according to the OAI protocol.
static short XML_PARSE_ERR
          The XML parser has detected an XML error.
 
Constructor Summary
OAIException(short code, String msg)
           
 
Method Summary
 
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
 

Field Detail

code

public short code
Exception code


FAILED_REFRESH_ERR

public static final short FAILED_REFRESH_ERR
A failed attempt has been made to Refresh an OAIRecord. This could be because the metadataPrefix is not supported or other reasons.

See Also:
Constant Field Values

HTTP_ERR

public static final short HTTP_ERR
The OAI provider returned an unexpected HTTP status code, such as 400. The only HTTP status codes currently expected are 200 OK, 30x (redirects), or 503 Unavailable.

See Also:
Constant Field Values

ID_ONLY_ERR

public static final short ID_ONLY_ERR
This error is currently unused. It would occur if an attempt is made to access a property of an identifier-only OAIRecord; however, attempts to do this will currently automatically convert these types of records into complete records.

See Also:
Constant Field Values

INVALID_RESPONSE_ERR

public static final short INVALID_RESPONSE_ERR
The XML response returned by the OAI provider is not valid, usually because it is missing a key element such as or .

See Also:
Constant Field Values

INVALID_VERB_ERR

public static final short INVALID_VERB_ERR
An attempt to use a verb parameter value that is not supported by the OAI protocol has been made.

See Also:
Constant Field Values

NO_BASE_URL_ERR

public static final short NO_BASE_URL_ERR
A property or method which depends on contacting an OAI Provider site is being accessed without first setting the BaseURL property of the OAIRepository.

See Also:
Constant Field Values

NO_MORE_SETS_ERR

public static final short NO_MORE_SETS_ERR
An attempt has been made to MoveNext past the end of a list of records.

See Also:
Constant Field Values

NO_OAI_IDENTIFIER_ERR

public static final short NO_OAI_IDENTIFIER_ERR
The Identify request did not return an oai-identifier description, so this property is not available.

See Also:
Constant Field Values

NOT_INITIALIZED_ERR

public static final short NOT_INITIALIZED_ERR
An attempt to use an uninitialized OAIResumptionStream has been made.

See Also:
Constant Field Values

RETRY_AFTER_ERR

public static final short RETRY_AFTER_ERR
'value' is not a valid retry-after header

See Also:
Constant Field Values

RETRY_LIMIT_ERR

public static final short RETRY_LIMIT_ERR
In the case of an HTTP 503 status, the maximum number of allowable retries has been exceeded.

See Also:
Constant Field Values

UNKNOWN_ELEMENT_ERR

public static final short UNKNOWN_ELEMENT_ERR
An OAIRecordList contains elements which are not legal according to the OAI protocol. The only legal elements are or .

See Also:
Constant Field Values

XML_PARSE_ERR

public static final short XML_PARSE_ERR
The XML parser has detected an XML error. If Validation is Strict this will be a well-formedness error, possible an invalid Unicode character. If Validation is Very Strict it could also be that the response does not validate against the XML Schema. This error should never occur if Validation is Loose.

See Also:
Constant Field Values

CRITICAL_ERR

public static final short CRITICAL_ERR
All the other critical system or network error

See Also:
Constant Field Values

OAI_2_ONLY_ERR

public static final short OAI_2_ONLY_ERR
An attempt to use a feature not spported by OAI 1.x repositories

See Also:
Constant Field Values

OAI_ERR

public static final short OAI_ERR
An OAI error

See Also:
Constant Field Values
Constructor Detail

OAIException

public OAIException(short code,
                    String msg)


Copyright © 2013. All Rights Reserved.