org.dspace.app.xmlui.wing
Class IncludePageMeta

java.lang.Object
  extended by org.apache.cocoon.util.AbstractLogEnabled
      extended by org.apache.cocoon.xml.AbstractXMLProducer
          extended by org.apache.cocoon.xml.AbstractXMLPipe
              extended by org.apache.cocoon.transformation.AbstractTransformer
                  extended by org.dspace.app.xmlui.wing.AbstractWingTransformer
                      extended by org.dspace.app.xmlui.wing.IncludePageMeta
All Implemented Interfaces:
org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, org.apache.cocoon.caching.CacheableProcessingComponent, org.apache.cocoon.sitemap.SitemapModelComponent, org.apache.cocoon.transformation.Transformer, org.apache.cocoon.xml.XMLPipe, org.apache.cocoon.xml.XMLProducer, org.apache.excalibur.xml.sax.XMLConsumer, WingTransformer, ContentHandler, LexicalHandler

public class IncludePageMeta
extends AbstractWingTransformer
implements org.apache.cocoon.caching.CacheableProcessingComponent

Include metadata in the resulting DRI document as derived from the sitemap parameters. Parameters should consist of a dublin core name and value. The format for a parameter name must follow the form: "..#order" The qualifier, language, and order are all optional components. The order component is an integer and is needed to ensure that parameter names are unique. Since Cocoon's parameters are Hashes duplicate names are not allowed the order syntax allows the sitemap programer to specify an order in which these metadata values should be placed inside the document. The following are a valid examples:

Author:
Scott Phillips, Roel Van Reeth (roel at atmire dot com), Art Lowel (art dot lowel at atmire dot com), Ben Bosman (ben at atmire dot com)

Field Summary
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
 
Fields inherited from interface org.apache.cocoon.transformation.Transformer
ROLE
 
Constructor Summary
IncludePageMeta()
           
 
Method Summary
 void addPageMeta(PageMeta pageMeta)
          Include the metadata in the page metadata.
 Serializable getKey()
          Generate the unique key.
 org.apache.excalibur.source.SourceValidity getValidity()
          Generate the validity object.
 void setup(org.apache.cocoon.environment.SourceResolver resolver, Map objectModel, String src, org.apache.avalon.framework.parameters.Parameters parameters)
          Extract the metadata name value pairs from the sitemap parameters.
 
Methods inherited from class org.dspace.app.xmlui.wing.AbstractWingTransformer
addBody, addOptions, addUserMeta, createWingDocument, dispose, endDocument, endElement, endPrefixMapping, getComponentName, getDefaultMessageCatalogue, getObjectManager, handleException, message, message, recycle, setupWing, startDocument, startElement, startPrefixMapping
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe
characters, comment, endCDATA, endDTD, endEntity, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDTD, startEntity
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
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, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity
 
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
 

Constructor Detail

IncludePageMeta

public IncludePageMeta()
Method Detail

getKey

public Serializable getKey()
Generate the unique key. This key must be unique inside the space of this component.

Specified by:
getKey in interface org.apache.cocoon.caching.CacheableProcessingComponent
Returns:
The generated key hashes the src

getValidity

public org.apache.excalibur.source.SourceValidity getValidity()
Generate the validity object.

Specified by:
getValidity in interface org.apache.cocoon.caching.CacheableProcessingComponent
Returns:
The generated validity object or null if the component is currently not cacheable.

setup

public void setup(org.apache.cocoon.environment.SourceResolver resolver,
                  Map objectModel,
                  String src,
                  org.apache.avalon.framework.parameters.Parameters parameters)
           throws org.apache.cocoon.ProcessingException,
                  SAXException,
                  IOException
Extract the metadata name value pairs from the sitemap parameters.

Specified by:
setup in interface org.apache.cocoon.sitemap.SitemapModelComponent
Throws:
org.apache.cocoon.ProcessingException
SAXException
IOException

addPageMeta

public void addPageMeta(PageMeta pageMeta)
                 throws WingException
Include the metadata in the page metadata.

Specified by:
addPageMeta in interface WingTransformer
Overrides:
addPageMeta in class AbstractWingTransformer
Throws:
WingException


Copyright © 2012 DuraSpace. All Rights Reserved.