se.kb.oai.pmh
Class ErrorResponseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
se.kb.oai.OAIException
se.kb.oai.pmh.ErrorResponseException
- All Implemented Interfaces:
- Serializable
public class ErrorResponseException
- extends OAIException
Exception that is thrown when the response from the OAI-PMH server
has <error>
elements in it.
There are eight different error codes that can be returned:
- badArgument
- badResumptionToken
- badVerb
- cannotDisseminateFormat
- idDoesNotExist
- noRecordsMatch
- noMetadataFormats
- noSetHierarchy
- Author:
- Oskar Grenholm, National Library of Sweden
- See Also:
- Serialized Form
BAD_ARGUMENT
public static final String BAD_ARGUMENT
- See Also:
- Constant Field Values
BAD_RESUMPTION_TOKEN
public static final String BAD_RESUMPTION_TOKEN
- See Also:
- Constant Field Values
BAD_VERB
public static final String BAD_VERB
- See Also:
- Constant Field Values
CANNOT_DISSEMINATE_FORMAT
public static final String CANNOT_DISSEMINATE_FORMAT
- See Also:
- Constant Field Values
ID_DOES_NOT_EXIST
public static final String ID_DOES_NOT_EXIST
- See Also:
- Constant Field Values
NO_RECORDS_MATCH
public static final String NO_RECORDS_MATCH
- See Also:
- Constant Field Values
NO_METADATA_FORMATS
public static final String NO_METADATA_FORMATS
- See Also:
- Constant Field Values
NO_SET_HIERARCHY
public static final String NO_SET_HIERARCHY
- See Also:
- Constant Field Values
ErrorResponseException
public ErrorResponseException(Element error)
- Creates an
ErrorResponseException
with
the returned error code and error message.
- Parameters:
error
- the <error>
element
getCode
public String getCode()
- Get the error code.
- Returns:
- the error code
getMessage
public String getMessage()
- Get the error message.
- Overrides:
getMessage
in class Throwable
- Returns:
- the error message
Copyright © 2008. All Rights Reserved.