Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## fr.gouv.culture.oai
Class AbstractOAIRepository

    java.lang.Object
      org.apache.avalon.framework.logger.AbstractLogEnabled
          org.apache.cocoon.xml.AbstractXMLProducer
              org.apache.cocoon.xml.AbstractXMLPipe
                  fr.gouv.culture.oai.OAIObjectImpl
                      fr.gouv.culture.oai.AbstractOAIRepository

All Implemented Interfaces:
  org.apache.avalon.framework.configuration.Configurable, org.xml.sax.ContentHandler, org.apache.avalon.framework.context.Contextualizable, org.xml.sax.ext.LexicalHandler, org.apache.avalon.framework.logger.LogEnabled, OAIObject, OAIRepository, org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, org.apache.excalibur.xml.sax.XMLConsumer, org.apache.cocoon.xml.XMLConsumer, org.apache.excalibur.xml.sax.XMLizable, org.apache.cocoon.xml.XMLPipe, org.apache.cocoon.xml.XMLProducer

Direct Known Subclasses:
  AbstractDocumentBaseOAIRepository

public abstract class AbstractOAIRepository
extends OAIObjectImpl
implements OAIRepository

This class represents an OAI repository.

Nested Class Summary

Nested classes inherited from class fr.gouv.culture.oai.OAIObject
`OAIObject.Node`

Field Summary
`protected java.lang.String[]` | `adminEmails` Email address of the administrator of this OAI Repository
`protected java.lang.String` | `baseURL` The base url of this repository
`protected java.lang.String` | `compression` Compression supported by this OAI repository - optional as per OAI spec
`protected java.lang.String` | `deletedRecord` String value of yes/no indicating if deleted records are supported deletedRecord : the manner in which the repository supports the notion of deleted records .
`protected org.apache.excalibur.source.impl.FileSource` | `description` Description of this repository - optional as per OAI spec
`protected java.lang.String` | `earliestDatestamp` String value indicating the earliest _datestamp of this repository
`protected java.lang.String` | `granularity` The granularity of datestamps supported by this repository
`protected java.util.Hashtable` | `metadataFormats` Hashtable containing supported OAIMetadataFormat objects
`protected java.lang.String` | `protocolVersion` String value of the version number of the oai protocol supported in this
`protected java.lang.String` | `repositoryName` A human readable name for this repository

Fields inherited from class fr.gouv.culture.oai.OAIObjectImpl
`_context, logger`

Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
`contentHandler, 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
`AbstractOAIRepository()`

Method Summary
`protected void` | `endVerbEvent(OAIRequest request)` Sends the end event corresponding to the verb of the request
`java.lang.String[]` | `getAdminEmails()` Required element within a response from a repository queried with the "Identify" verb
`java.lang.String` | `getBaseURL()`
`java.lang.String` | `getCompression()`
`java.lang.String` | `getDeletedRecord()`
`void` | `getDescription(org.xml.sax.ContentHandler handler)` Send's the description file to the current consumer
`java.lang.String` | `getEarliestDatestamp()`
`java.lang.String` | `getGranularity()`
`java.lang.String` | `getProtocolVersion()`
`java.lang.String` | `getRepositoryName()`
`void` | `identify(OAIRequest request)` Sends SAX events for the OAI-PMH "identify" request
`protected void` | `sendNoSetHierarchyError()` Sends the oai error specifying that a set hierarchy is NOT supported by this oai repository
`void` | `sendResumptionToken(java.lang.String resumptionToken)` Send's the resumption token element to the consumer
`void` | `sendResumptionToken(java.lang.String resumptionToken, java.lang.String cursor)` Send's the resumption token element to the consumer
`void` | `sendResumptionToken(java.lang.String resumptionToken, java.lang.String cursor, java.lang.String completeListSize)` Send's the resumption token element to the consumer
`protected void` | `sendResumptionTokensNotSupportedError()` Sends the oai error specifying that resumptionTokens are NOT supported by this oai repository
`protected void` | `startVerbEvent(OAIRequest request)` Sends the start event corresponding to the verb of the request
`void` | `toSAX(org.xml.sax.ContentHandler contentHandler)` Calls the identify method and sends the SAX flow to the provided content handler
`abstract boolean` | `verifyGranularity(java.lang.String paramVal)` Verifies values for the `from` and `until` request params
`boolean` | `verifyParameters(OAIRequest request)` Verifies the request parameters respective of the verb provided in the request and the repository's level of support for certain optional features like "resumptionToken"s and "set"s note this method should return SAX events to any XMLConsumer set if errors exist within the request parameters

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 fr.gouv.culture.oai.OAIRepository
`addDeletedRecord, getRecord, listIdentifiers, listMetadataFormats, listRecords, listSets, purgeDeletedRecords, removeDeletedRecord`

Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled
`enableLogging`

Methods inherited from interface org.apache.avalon.framework.context.Contextualizable
`contextualize`

Methods inherited from interface org.xml.sax.ContentHandler
`characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, 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`

Methods inherited from interface org.apache.avalon.framework.configuration.Configurable
`configure`

Field Detail

### adminEmails

    protected java.lang.String[] adminEmails

  Email address of the administrator of this OAI Repository

### protocolVersion

    protected java.lang.String protocolVersion

  String value of the version number of the oai protocol supported in this

### repositoryName

    protected java.lang.String repositoryName

  A human readable name for this repository

### baseURL

    protected java.lang.String baseURL

  The base url of this repository

### granularity

    protected java.lang.String granularity

  The granularity of datestamps supported by this repository

### deletedRecord

    protected java.lang.String deletedRecord

  String value of yes/no indicating if deleted records are supported deletedRecord : the manner in which the repository supports the notion of deleted records . Legitimate values are no ; transient ; persistent with meanings defined in the section on deletion (from oai spec) .

### earliestDatestamp

    protected java.lang.String earliestDatestamp

  String value indicating the earliest _datestamp of this repository

### compression

    protected java.lang.String compression

  Compression supported by this OAI repository - optional as per OAI spec

### description

    protected org.apache.excalibur.source.impl.FileSource description

  Description of this repository - optional as per OAI spec

### metadataFormats

    protected java.util.Hashtable metadataFormats

  Hashtable containing supported OAIMetadataFormat objects

Constructor Detail

### AbstractOAIRepository

    public AbstractOAIRepository()

Method Detail

### identify

    public void identify(OAIRequest request)
                  throws org.xml.sax.SAXException

  Sends SAX events for the OAI-PMH "identify" request

  Specified by:
    `identify` in interface `OAIRepository`
  Parameters:
    `request` - The request
  Throws:
    `org.xml.sax.SAXException`

### getDeletedRecord

    public java.lang.String getDeletedRecord()

  Specified by:
    `getDeletedRecord` in interface `OAIRepository`

### getGranularity

    public java.lang.String getGranularity()

  Specified by:
    `getGranularity` in interface `OAIRepository`

### getRepositoryName

    public java.lang.String getRepositoryName()

  Specified by:
    `getRepositoryName` in interface `OAIRepository`

### getEarliestDatestamp

    public java.lang.String getEarliestDatestamp()

  Specified by:
    `getEarliestDatestamp` in interface `OAIRepository`

### getProtocolVersion

    public java.lang.String getProtocolVersion()

  Specified by:
    `getProtocolVersion` in interface `OAIRepository`

### getBaseURL

    public java.lang.String getBaseURL()

  Specified by:
    `getBaseURL` in interface `OAIRepository`

### getAdminEmails

    public java.lang.String[] getAdminEmails()

  Description copied from interface: `OAIRepository`
  Required element within a response from a repository queried with the "Identify" verb

  Specified by:
    `getAdminEmails` in interface `OAIRepository`

### getCompression

    public java.lang.String getCompression()

  Specified by:
    `getCompression` in interface `OAIRepository`

### getDescription

    public void getDescription(org.xml.sax.ContentHandler handler)
                        throws org.xml.sax.SAXException

  Send's the description file to the current consumer

  Specified by:
    `getDescription` in interface `OAIRepository`
  Parameters:
    `handler` -
  Throws:
    `org.xml.sax.SAXException`

### verifyParameters

    public boolean verifyParameters(OAIRequest request)
                             throws org.xml.sax.SAXException

  Verifies the request parameters respective of the verb provided in the request and the repository's level of support for certain optional features like "resumptionToken"s and "set"s note this method should return SAX events to any XMLConsumer set if errors exist within the request parameters

  Specified by:
    `verifyParameters` in interface `OAIRepository`
  Parameters:
    `request` - The request objec
  Throws:
    `org.xml.sax.SAXException`

### verifyGranularity

    public abstract boolean verifyGranularity(java.lang.String paramVal)

  Verifies values for the `from` and `until` request params

### sendNoSetHierarchyError

    protected void sendNoSetHierarchyError()
                                    throws org.xml.sax.SAXException

  Sends the oai error specifying that a set hierarchy is NOT supported by this oai repository

  Throws:
    `org.xml.sax.SAXException`

### sendResumptionTokensNotSupportedError

    protected void sendResumptionTokensNotSupportedError()
                                                  throws org.xml.sax.SAXException

  Sends the oai error specifying that resumptionTokens are NOT supported by this oai repository

  Throws:
    `org.xml.sax.SAXException`

### startVerbEvent

    protected void startVerbEvent(OAIRequest request)
                           throws org.xml.sax.SAXException

  Sends the start event corresponding to the verb of the request

  Throws:
    `org.xml.sax.SAXException`

### endVerbEvent

    protected void endVerbEvent(OAIRequest request)
                         throws org.xml.sax.SAXException

  Sends the end event corresponding to the verb of the request

  Throws:
    `org.xml.sax.SAXException`

### toSAX

    public void toSAX(org.xml.sax.ContentHandler contentHandler)
               throws org.xml.sax.SAXException

  Calls the identify method and sends the SAX flow to the provided content handler

  Specified by:
    `toSAX` in interface `org.apache.excalibur.xml.sax.XMLizable`
  Parameters:
    `contentHandler` - The event receiver
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `identify(fr.gouv.culture.oai.OAIRequest)`

### sendResumptionToken

    public void sendResumptionToken(java.lang.String resumptionToken)
                             throws org.xml.sax.SAXException

  Send's the resumption token element to the consumer

  Parameters:
    `resumptionToken` - The resumption token
  Throws:
    `org.xml.sax.SAXException`

### sendResumptionToken

    public void sendResumptionToken(java.lang.String resumptionToken,
                                    java.lang.String cursor)
                             throws org.xml.sax.SAXException

  Send's the resumption token element to the consumer

  Parameters:
    `resumptionToken` - The resumption token
    `cursor` - The cursor position
  Throws:
    `org.xml.sax.SAXException`

### sendResumptionToken

    public void sendResumptionToken(java.lang.String resumptionToken,
                                    java.lang.String cursor,
                                    java.lang.String completeListSize)
                             throws org.xml.sax.SAXException

  Send's the resumption token element to the consumer

  Parameters:
    `resumptionToken` - The resumption token
    `cursor` - The cursor position
    `completeListSize` - The size of the complete list
  Throws:
    `org.xml.sax.SAXException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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