fr.gouv.culture.oai
Class OAIError

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.xml.AbstractXMLProducer
          extended by org.apache.cocoon.xml.AbstractXMLPipe
              extended by fr.gouv.culture.oai.OAIObjectImpl
                  extended by fr.gouv.culture.oai.OAIError
All Implemented Interfaces:
OAIObject, org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, org.apache.cocoon.xml.XMLPipe, org.apache.cocoon.xml.XMLProducer, org.apache.excalibur.xml.sax.XMLConsumer, org.apache.excalibur.xml.sax.XMLizable, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler

public class OAIError
extends OAIObjectImpl
implements org.apache.excalibur.xml.sax.XMLizable

This class represents an OAI Error see section 3.6 of OAI spec for more info.


Nested Class Summary
 
Nested classes/interfaces inherited from interface fr.gouv.culture.oai.OAIObject
OAIObject.Node
 
Field Summary
static int ERROR_BAD_ARGUMENT
           
static int ERROR_BAD_DATE
           
static int ERROR_BAD_RESUMPTION_TOKEN
           
static int ERROR_BAD_VERB
           
static int ERROR_CANNOT_DISSEMINATE_FORMAT
           
static int ERROR_ID_DOES_NOT_EXIST
           
static int ERROR_NO_METADATA_FORMATS
           
static int ERROR_NO_RECORDS_MATCH
           
static int ERROR_NO_SET_HIERARCHY
           
static java.lang.String ERROR_STRING_BAD_ARGUMENT
           
static java.lang.String ERROR_STRING_BAD_DATE
           
static java.lang.String ERROR_STRING_BAD_RESUMPTION_TOKEN
           
static java.lang.String ERROR_STRING_BAD_VERB
           
static java.lang.String ERROR_STRING_CANNOT_DISSEMINATE_FORMAT
           
static java.lang.String ERROR_STRING_ID_DOES_NOT_EXIST
           
static java.lang.String ERROR_STRING_NO_METADATA_FORMATS
           
static java.lang.String ERROR_STRING_NO_RECORDS_MATCH
           
static java.lang.String ERROR_STRING_NO_SET_HIERARCHY
           
static java.lang.String ERROR_STRING_UNKNOWN
           
static int ERROR_UNKNOWN
           
 
Fields inherited from class fr.gouv.culture.oai.OAIObjectImpl
_context, logger
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
 
Fields inherited from interface fr.gouv.culture.oai.OAIObject
HTTP_HEADER_NAME_FROM, HTTP_HEADER_NAME_USER_AGENT, NUMBER_RECORDS_PER_RESPONSE, STRING_DATEFORMAT_GRANULARITY_DAY, STRING_DATEFORMAT_GRANULARITY_SECOND
 
Constructor Summary
OAIError(int errorCode)
          Construct a empty object.
OAIError(int errorCode, java.lang.String reason)
          Simple constructor
 
Method Summary
protected  void setUp(int errorCode)
          Establishes the error state and its String name
 void toSAX(org.xml.sax.ContentHandler contentHandler)
          Send the error events to the provided content handler while respecting the oai pmh format for error evetns
 
Methods inherited from class fr.gouv.culture.oai.OAIObjectImpl
contextualize, enableLogging, endElement, getContext, sendElement, sendElementContent, startElement
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startPrefixMapping
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
recycle, setConsumer, setContentHandler, setLexicalHandler
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping
 
Methods inherited from interface org.xml.sax.ext.LexicalHandler
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity
 
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
 

Field Detail

ERROR_UNKNOWN

public static final int ERROR_UNKNOWN
See Also:
Constant Field Values

ERROR_BAD_ARGUMENT

public static final int ERROR_BAD_ARGUMENT
See Also:
Constant Field Values

ERROR_BAD_RESUMPTION_TOKEN

public static final int ERROR_BAD_RESUMPTION_TOKEN
See Also:
Constant Field Values

ERROR_BAD_VERB

public static final int ERROR_BAD_VERB
See Also:
Constant Field Values

ERROR_CANNOT_DISSEMINATE_FORMAT

public static final int ERROR_CANNOT_DISSEMINATE_FORMAT
See Also:
Constant Field Values

ERROR_ID_DOES_NOT_EXIST

public static final int ERROR_ID_DOES_NOT_EXIST
See Also:
Constant Field Values

ERROR_NO_RECORDS_MATCH

public static final int ERROR_NO_RECORDS_MATCH
See Also:
Constant Field Values

ERROR_NO_METADATA_FORMATS

public static final int ERROR_NO_METADATA_FORMATS
See Also:
Constant Field Values

ERROR_NO_SET_HIERARCHY

public static final int ERROR_NO_SET_HIERARCHY
See Also:
Constant Field Values

ERROR_BAD_DATE

public static final int ERROR_BAD_DATE
See Also:
Constant Field Values

ERROR_STRING_UNKNOWN

public static final java.lang.String ERROR_STRING_UNKNOWN
See Also:
Constant Field Values

ERROR_STRING_BAD_ARGUMENT

public static final java.lang.String ERROR_STRING_BAD_ARGUMENT
See Also:
Constant Field Values

ERROR_STRING_BAD_RESUMPTION_TOKEN

public static final java.lang.String ERROR_STRING_BAD_RESUMPTION_TOKEN
See Also:
Constant Field Values

ERROR_STRING_BAD_VERB

public static final java.lang.String ERROR_STRING_BAD_VERB
See Also:
Constant Field Values

ERROR_STRING_CANNOT_DISSEMINATE_FORMAT

public static final java.lang.String ERROR_STRING_CANNOT_DISSEMINATE_FORMAT
See Also:
Constant Field Values

ERROR_STRING_ID_DOES_NOT_EXIST

public static final java.lang.String ERROR_STRING_ID_DOES_NOT_EXIST
See Also:
Constant Field Values

ERROR_STRING_NO_RECORDS_MATCH

public static final java.lang.String ERROR_STRING_NO_RECORDS_MATCH
See Also:
Constant Field Values

ERROR_STRING_NO_METADATA_FORMATS

public static final java.lang.String ERROR_STRING_NO_METADATA_FORMATS
See Also:
Constant Field Values

ERROR_STRING_NO_SET_HIERARCHY

public static final java.lang.String ERROR_STRING_NO_SET_HIERARCHY
See Also:
Constant Field Values

ERROR_STRING_BAD_DATE

public static final java.lang.String ERROR_STRING_BAD_DATE
See Also:
Constant Field Values
Constructor Detail

OAIError

public OAIError(int errorCode)
Construct a empty object.


OAIError

public OAIError(int errorCode,
                java.lang.String reason)
Simple constructor

Parameters:
errorCode -
reason -
Method Detail

setUp

protected void setUp(int errorCode)
Establishes the error state and its String name

Parameters:
errorCode -

toSAX

public void toSAX(org.xml.sax.ContentHandler contentHandler)
           throws org.xml.sax.SAXException
Send the error events to the provided content handler while respecting the oai pmh format for error evetns

Specified by:
toSAX in interface org.apache.excalibur.xml.sax.XMLizable
Parameters:
contentHandler - The handler to feed with events
Throws:
org.xml.sax.SAXException


Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.