project.biota.util
Class DiGIRProvError

java.lang.Object
  extended byproject.biota.util.DiGIRProvError

public class DiGIRProvError
extends Object

DiGIRProvError holds the code and messages for a diagnostic occurred while processing a DiGIR request. It also defines the error codes for this provider.

Author:
Kimmy Lin

Field Summary
static int CONCEPT_NOT_DEFINED
          This code indicates that a concept used in the DiGIR request is not defined in the conceptual schema.
static int CONCEPT_NOT_RETURNABLE
          This code indicates that a concept used as a record concept in a DiGIR search response or the inventory concept in a DiGIR inventory response is not returnable.
static int CONCEPT_NOT_SEARCHABLE
          This code indicates that a concept used in the filter element of the DiGIR request is not searchable for the specified resource.
static int CONCEPT_NOT_SUPPORTED
          This code indicates that a concept used in the DiGIR request is not supported by the specified resource.
static int INVALID_ELEMENT_VALUE
          This code indicates that the value for a xml element in the request is not valid.
static int INVALID_REQEUST_OPERATION
          This code indicates the request operation is not valid.
static int OK
          This code indicates that no error has occured
static int RESOURCE_FAILURE
          This code indicates that either the resource is not initialized correctly or the provider failed to connect to the resource.
static int RESOURCE_NOT_FOUND
          This code indicates that the resource specified in the DiGIR request is not found in this provider.
static int RESOURCE_NOT_SPECIFIED
          This code indicates that the resource is not specified in the DiGIR search/inventory request.
static int SCHEMA_NOT_SUPPORTED
          This code indicates that the conceptual schema used in the DiGIR request is not supported by the specified resource.
static int UNKNOWN
          This code indicates that the source of the error is unknown.
 
Constructor Summary
DiGIRProvError(int errorCode, String msg)
          Constructs a DiGIRProvError object to represent an error occured while processing the DiGIR request.
 
Method Summary
 String getErrorCodeString()
          Gets the string representation of an error code.
 String getErrorMessage()
          Gets the message for this error.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OK

public static final int OK
This code indicates that no error has occured

See Also:
Constant Field Values

UNKNOWN

public static final int UNKNOWN
This code indicates that the source of the error is unknown. Mostly due to error occured while parsing an xml document.

See Also:
Constant Field Values

RESOURCE_NOT_FOUND

public static final int RESOURCE_NOT_FOUND
This code indicates that the resource specified in the DiGIR request is not found in this provider.

See Also:
Constant Field Values

RESOURCE_NOT_SPECIFIED

public static final int RESOURCE_NOT_SPECIFIED
This code indicates that the resource is not specified in the DiGIR search/inventory request.

See Also:
Constant Field Values

RESOURCE_FAILURE

public static final int RESOURCE_FAILURE
This code indicates that either the resource is not initialized correctly or the provider failed to connect to the resource.

See Also:
Constant Field Values

INVALID_ELEMENT_VALUE

public static final int INVALID_ELEMENT_VALUE
This code indicates that the value for a xml element in the request is not valid. For example, the value for the start attribute of the records element should be an integer. When a non-integer value is provided, this error code will show up in a diagnostic element of the DiGIR response.

See Also:
Constant Field Values

INVALID_REQEUST_OPERATION

public static final int INVALID_REQEUST_OPERATION
This code indicates the request operation is not valid. It should be one of the following: search, inventory, metadata.

See Also:
Constant Field Values

SCHEMA_NOT_SUPPORTED

public static final int SCHEMA_NOT_SUPPORTED
This code indicates that the conceptual schema used in the DiGIR request is not supported by the specified resource. Issue a metadata request to check the schemas supported by the resource.

See Also:
Constant Field Values

CONCEPT_NOT_DEFINED

public static final int CONCEPT_NOT_DEFINED
This code indicates that a concept used in the DiGIR request is not defined in the conceptual schema.

See Also:
Constant Field Values

CONCEPT_NOT_SUPPORTED

public static final int CONCEPT_NOT_SUPPORTED
This code indicates that a concept used in the DiGIR request is not supported by the specified resource.

See Also:
Constant Field Values

CONCEPT_NOT_SEARCHABLE

public static final int CONCEPT_NOT_SEARCHABLE
This code indicates that a concept used in the filter element of the DiGIR request is not searchable for the specified resource.

See Also:
Constant Field Values

CONCEPT_NOT_RETURNABLE

public static final int CONCEPT_NOT_RETURNABLE
This code indicates that a concept used as a record concept in a DiGIR search response or the inventory concept in a DiGIR inventory response is not returnable.

See Also:
Constant Field Values
Constructor Detail

DiGIRProvError

public DiGIRProvError(int errorCode,
                      String msg)
Constructs a DiGIRProvError object to represent an error occured while processing the DiGIR request.

Parameters:
errorCode - the
Method Detail

getErrorCodeString

public String getErrorCodeString()
Gets the string representation of an error code. For example, for error code DiGIRProvError.SCHEMA_NOT_SUPPORTED, this method returns "SCHEMA_NOT_SUPPORTED".

Returns:
the string representation of an error code.

getErrorMessage

public String getErrorMessage()
Gets the message for this error.

Returns:
the error message of this error


Copyright © 2004 University of Massachusetts at Boston. All Rights Reserved.