fr.gouv.culture.oai
Class AbstractOAIMetadataFormat

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.AbstractOAIMetadataFormat
All Implemented Interfaces:
OAIMetadataFormat, OAIObject, org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, org.apache.avalon.framework.configuration.Configurable, 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
Direct Known Subclasses:
BasicOAIMetadataFormat

public abstract class AbstractOAIMetadataFormat
extends OAIObjectImpl
implements OAIMetadataFormat


Nested Class Summary
 
Nested classes/interfaces inherited from interface fr.gouv.culture.oai.OAIObject
OAIObject.Node
 
Field Summary
protected  java.lang.String formatName
          Format name string
protected  org.apache.avalon.framework.parameters.Parameters metadataMappings
           
protected  java.lang.String namespace
          The namespace of the metadata format
protected  java.lang.String prefix
          The metadataPrefix
protected  java.lang.String rootElement
          The root element for metadata
protected  java.lang.String schemaUrl
          The schema url of the metadata format
 
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
AbstractOAIMetadataFormat()
           
 
Method Summary
 void endMetadataFormatRootElement()
          Sends END of the root element for this metadata format
 org.apache.avalon.framework.parameters.Parameters getMappings()
          Retrieves a Parameters object with mappings for element sent via this object
 java.lang.String getName()
          Retrieves the human readable name of the metadata format
 java.lang.String getNamespace()
          Retrieves the namespace uri of this metadata format
 java.lang.String getPrefix()
          Retrieves the prefix of this metadata format
 java.lang.String getSchemaUrl()
          Retrieves the schema url of this metadata format
protected  void prepareAndSendElement(java.lang.String origName, java.lang.String value)
          Sends an element to this object's consumer passing through any specified mappings
 void sendElement(java.lang.String origName, java.lang.String value)
          Sends an element to this object's consumer
 void setMappings(org.apache.avalon.framework.parameters.Parameters mappings)
          Establishes a Parameters object with mappings for element sent via this object
 void setName(java.lang.String formatName)
          Establishes the human readable name of the metadata format
 void setNamespace(java.lang.String namespace)
          Establishes the namespace uri of this metadata format
 void setPrefix(java.lang.String prefix)
          Establishes the prefix of this metadata format
 void setSchemaUrl(java.lang.String schemaUrl)
          Establishes the schema url of this metadata format
 void startMetadataFormatRootElement()
          Sends START of the root element for this metadata format
 void toSAX(org.xml.sax.ContentHandler contentHandler)
          Sends SAX events to the provided content handler, describing the metadata format in the syntax of the oai repository ListMetadataFormats verb response.
 
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.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

formatName

protected java.lang.String formatName
Format name string


prefix

protected java.lang.String prefix
The metadataPrefix


schemaUrl

protected java.lang.String schemaUrl
The schema url of the metadata format


namespace

protected java.lang.String namespace
The namespace of the metadata format


rootElement

protected java.lang.String rootElement
The root element for metadata


metadataMappings

protected org.apache.avalon.framework.parameters.Parameters metadataMappings
Constructor Detail

AbstractOAIMetadataFormat

public AbstractOAIMetadataFormat()
Method Detail

getName

public java.lang.String getName()
Retrieves the human readable name of the metadata format

Specified by:
getName in interface OAIMetadataFormat

setName

public void setName(java.lang.String formatName)
Establishes the human readable name of the metadata format

Specified by:
setName in interface OAIMetadataFormat

getPrefix

public java.lang.String getPrefix()
Retrieves the prefix of this metadata format

Specified by:
getPrefix in interface OAIMetadataFormat

setPrefix

public void setPrefix(java.lang.String prefix)
Establishes the prefix of this metadata format

Specified by:
setPrefix in interface OAIMetadataFormat

getSchemaUrl

public java.lang.String getSchemaUrl()
Retrieves the schema url of this metadata format

Specified by:
getSchemaUrl in interface OAIMetadataFormat

setSchemaUrl

public void setSchemaUrl(java.lang.String schemaUrl)
Establishes the schema url of this metadata format

Specified by:
setSchemaUrl in interface OAIMetadataFormat

getNamespace

public java.lang.String getNamespace()
Retrieves the namespace uri of this metadata format

Specified by:
getNamespace in interface OAIMetadataFormat

setNamespace

public void setNamespace(java.lang.String namespace)
Establishes the namespace uri of this metadata format

Specified by:
setNamespace in interface OAIMetadataFormat

getMappings

public org.apache.avalon.framework.parameters.Parameters getMappings()
Retrieves a Parameters object with mappings for element sent via this object

Specified by:
getMappings in interface OAIMetadataFormat
See Also:
metadataMappings

setMappings

public void setMappings(org.apache.avalon.framework.parameters.Parameters mappings)
Establishes a Parameters object with mappings for element sent via this object

Specified by:
setMappings in interface OAIMetadataFormat
See Also:
metadataMappings

toSAX

public void toSAX(org.xml.sax.ContentHandler contentHandler)
           throws org.xml.sax.SAXException
Sends SAX events to the provided content handler, describing the metadata format in the syntax of the oai repository ListMetadataFormats verb response.

Specified by:
toSAX in interface org.apache.excalibur.xml.sax.XMLizable
Parameters:
contentHandler -
Throws:
org.xml.sax.SAXException

startMetadataFormatRootElement

public void startMetadataFormatRootElement()
                                    throws org.xml.sax.SAXException
Sends START of the root element for this metadata format

Specified by:
startMetadataFormatRootElement in interface OAIMetadataFormat
Throws:
org.xml.sax.SAXException

endMetadataFormatRootElement

public void endMetadataFormatRootElement()
                                  throws org.xml.sax.SAXException
Sends END of the root element for this metadata format

Specified by:
endMetadataFormatRootElement in interface OAIMetadataFormat
Throws:
org.xml.sax.SAXException

prepareAndSendElement

protected void prepareAndSendElement(java.lang.String origName,
                                     java.lang.String value)
                              throws org.xml.sax.SAXException
Sends an element to this object's consumer passing through any specified mappings

Parameters:
origName -
value -
Throws:
org.xml.sax.SAXException
See Also:
metadataMappings

sendElement

public void sendElement(java.lang.String origName,
                        java.lang.String value)
                 throws org.xml.sax.SAXException
Sends an element to this object's consumer

Specified by:
sendElement in interface OAIMetadataFormat
Parameters:
origName -
value -
Throws:
org.xml.sax.SAXException
See Also:
prepareAndSendElement(java.lang.String, java.lang.String)


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