|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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
fr.gouv.culture.sdx.oai.AbstractDocumentBaseOAIRepository
Abstract oai repository for DocumentBases providing common behaviors TODORefactor: bring appropriate methods up from sub-classes
Nested Class Summary |
Nested classes inherited from class fr.gouv.culture.sdx.oai.DocumentBaseOAIRepository |
DocumentBaseOAIRepository.ConfigurationNode |
Nested classes inherited from class fr.gouv.culture.oai.OAIObject |
OAIObject.Node |
Field Summary | |
protected Database |
_database
The database for this object |
protected org.apache.avalon.framework.context.DefaultContext |
context
The framework's context. |
protected DocumentBase |
documentBase
The underlying document base |
protected java.lang.String |
documentBaseId
The document base's id |
protected org.apache.avalon.framework.service.ServiceManager |
manager
The framework's service manager. |
protected int |
numRecordsPerResponse
The number of records for before issuing a resumption tokent |
static java.lang.String |
PARAMETER_NAME_SDX_FIELD
|
static java.lang.String |
PARAMETER_NAME_SET_NAME
|
static java.lang.String |
PARAMETER_NAME_SET_SPEC
|
protected IDGenerator |
resumptionTokenIdGen
|
Fields inherited from class fr.gouv.culture.oai.AbstractOAIRepository |
adminEmails, baseURL, compression, deletedRecord, description, earliestDatestamp, granularity, metadataFormats, protocolVersion, repositoryName |
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 | |
AbstractDocumentBaseOAIRepository()
|
Method Summary | |
protected java.lang.String |
buildExternalOaiId(OAIRequest request,
java.lang.String docId)
Builds an sdx/oai identifier for a document |
protected java.lang.String |
buildUrlLocator(OAIRequest request,
java.lang.String docId)
Builds a url locator for the document with the provided id |
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
Basic configuration |
protected void |
configureAdminEmails(org.apache.avalon.framework.configuration.Configuration configuration)
Configures (sets) the adminEmails class-field from a configuration object |
protected void |
configureBaseURL(org.apache.avalon.framework.configuration.Configuration configuration)
Configures (sets) the baseURL class-field from a configuration object |
protected void |
configureDatabase(org.apache.avalon.framework.configuration.Configuration configuration)
Configures (sets) the database class-field from a configuration object |
protected void |
configureDescription(org.apache.avalon.framework.configuration.Configuration configuration)
Configures (sets) the description class-field from a configuration object |
protected void |
configureResumptionTokenIDGenerator(org.apache.avalon.framework.configuration.Configuration configuration)
|
protected java.lang.String |
createResumptionToken(OAIRequest request)
Builds a resumption token for a request and the database entity to store needed informations. |
protected java.lang.String |
deriveInternalSdxId(OAIRequest request,
java.lang.String fullOaiId)
Retrieves an internal sdx identifier from a full oai identifier |
protected java.lang.String |
getRepositoryId()
Returns an id for this harvester based upon the underlying document base id |
protected java.lang.String |
getResumptionTokenCursor(java.lang.String resumptionToken)
Returns the cursor index of the provided resumption token |
protected java.lang.String |
getResumptionTokenProperty(java.lang.String resumptionToken,
java.lang.String propertyName)
Returns a property value for provided resumption token |
void |
service(org.apache.avalon.framework.service.ServiceManager serviceManager)
|
boolean |
verifyGranularity(java.lang.String paramVal)
Verifies values for the from and until request params |
Methods inherited from class fr.gouv.culture.oai.AbstractOAIRepository |
endVerbEvent, getAdminEmails, getBaseURL, getCompression, getDeletedRecord, getDescription, getEarliestDatestamp, getGranularity, getProtocolVersion, getRepositoryName, identify, sendNoSetHierarchyError, sendResumptionToken, sendResumptionToken, sendResumptionToken, sendResumptionTokensNotSupportedError, startVerbEvent, toSAX, verifyParameters |
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, getAdminEmails, getBaseURL, getCompression, getDeletedRecord, getDescription, getEarliestDatestamp, getGranularity, getProtocolVersion, getRecord, getRepositoryName, identify, listIdentifiers, listMetadataFormats, listRecords, listSets, purgeDeletedRecords, removeDeletedRecord, verifyParameters |
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.apache.excalibur.xml.sax.XMLizable |
toSAX |
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 |
Field Detail |
protected org.apache.avalon.framework.service.ServiceManager manager
protected org.apache.avalon.framework.context.DefaultContext context
protected DocumentBase documentBase
protected Database _database
protected java.lang.String documentBaseId
protected int numRecordsPerResponse
protected IDGenerator resumptionTokenIdGen
public static final java.lang.String PARAMETER_NAME_SDX_FIELD
public static final java.lang.String PARAMETER_NAME_SET_NAME
public static final java.lang.String PARAMETER_NAME_SET_SPEC
Constructor Detail |
public AbstractDocumentBaseOAIRepository()
Method Detail |
public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException
service
in interface org.apache.avalon.framework.service.Serviceable
org.apache.avalon.framework.service.ServiceException
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
org.apache.avalon.framework.configuration.ConfigurationException
protected void configureResumptionTokenIDGenerator(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
org.apache.avalon.framework.configuration.ConfigurationException
protected void configureBaseURL(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
org.apache.avalon.framework.configuration.ConfigurationException
protected void configureDescription(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
org.apache.avalon.framework.configuration.ConfigurationException
protected void configureAdminEmails(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
org.apache.avalon.framework.configuration.ConfigurationException
protected void configureDatabase(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
org.apache.avalon.framework.configuration.ConfigurationException
protected java.lang.String getRepositoryId()
protected java.lang.String buildExternalOaiId(OAIRequest request, java.lang.String docId)
request
- The request from which the url will be used for id constructiondocId
- The sdx document identifierdeconstruction of id's built with this method
protected java.lang.String deriveInternalSdxId(OAIRequest request, java.lang.String fullOaiId)
request
- The request from which the url will be used for id constructionfullOaiId
- The oai record identifierconstruction of id's passed as the fullOaiId
argument
protected java.lang.String buildUrlLocator(OAIRequest request, java.lang.String docId)
request
- The requestdocId
- The id of the document for which to build the locator
TODORemove: this is tightly coupled to the external sdx/sdx/sitemap.xmapprotected java.lang.String createResumptionToken(OAIRequest request) throws SDXException
request
- The request
SDXException
protected java.lang.String getResumptionTokenCursor(java.lang.String resumptionToken)
resumptionToken
-
protected java.lang.String getResumptionTokenProperty(java.lang.String resumptionToken, java.lang.String propertyName)
resumptionToken
- The resumption token in questionpropertyName
- The property name for which a value is desiredpublic boolean verifyGranularity(java.lang.String paramVal)
AbstractOAIRepository
from
and until
request params
verifyGranularity
in class AbstractOAIRepository
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |