org.apache.cocoon.generation
Class TraversableSourceDescriptionGenerator

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.xml.AbstractXMLProducer
          extended by org.apache.cocoon.generation.AbstractGenerator
              extended by org.apache.cocoon.generation.ServiceableGenerator
                  extended by org.apache.cocoon.generation.TraversableGenerator
                      extended by org.apache.cocoon.generation.TraversableSourceDescriptionGenerator
All Implemented Interfaces:
Poolable, Recyclable, Disposable, Component, LogEnabled, Serviceable, CacheableProcessingComponent, Generator, SitemapModelComponent, XMLProducer

public class TraversableSourceDescriptionGenerator
extends TraversableGenerator

This Generator augments the output of the TraversableGenerator.

It adds:

Sitemap parameters that can be specified to control processing are:

Version:
$Id: TraversableSourceDescriptionGenerator.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Stephan Michels, Unico Hommes

Field Summary
protected static String MIME_TYPE_ATTR_NAME
           
 
Fields inherited from class org.apache.cocoon.generation.TraversableGenerator
attributes, cacheKeyParList, COL_NODE_NAME, DATE_ATTR_NAME, dateFormatter, depth, excludeRE, includeRE, isRequestedSource, LASTMOD_ATTR_NAME, PREFIX, refreshDelay, RES_NAME_ATTR_NAME, RESOURCE_NODE_NAME, reverse, rootRE, SIZE_ATTR_NAME, sort, URI, URI_ATTR_NAME, validity
 
Fields inherited from class org.apache.cocoon.generation.ServiceableGenerator
manager
 
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, source
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
 
Fields inherited from interface org.apache.cocoon.generation.Generator
ROLE
 
Constructor Summary
TraversableSourceDescriptionGenerator()
           
 
Method Summary
protected  void addContent(TraversableSource source)
          Augments source nodes with additional information.
 void pushSourceLocks(LockableSource source)
          Push a XML description about all locks of a source.
protected  void setNodeAttributes(TraversableSource source)
          Augments source node elements with additional attributes describing the Source.
 void setup(SourceResolver resolver, Map objectModel, String location, Parameters parameters)
          Set the SourceResolver, objectModel Map, the source and sitemap Parameters used to process the request.
 
Methods inherited from class org.apache.cocoon.generation.TraversableGenerator
addAncestorPath, addPath, endNode, generate, getAncestors, getKey, getValidity, isExcluded, isIncluded, isRoot, recycle, startNode
 
Methods inherited from class org.apache.cocoon.generation.ServiceableGenerator
dispose, service
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, 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.cocoon.xml.XMLProducer
setConsumer
 

Field Detail

MIME_TYPE_ATTR_NAME

protected static final String MIME_TYPE_ATTR_NAME
See Also:
Constant Field Values
Constructor Detail

TraversableSourceDescriptionGenerator

public TraversableSourceDescriptionGenerator()
Method Detail

setup

public void setup(SourceResolver resolver,
                  Map objectModel,
                  String location,
                  Parameters parameters)
           throws ProcessingException,
                  SAXException,
                  IOException
Set the SourceResolver, objectModel Map, the source and sitemap Parameters used to process the request.

Specified by:
setup in interface SitemapModelComponent
Overrides:
setup in class TraversableGenerator
Parameters:
resolver - Source Resolver
objectModel - Object model.
location - Location of the source.
parameters - Parameters for the generator.
Throws:
ProcessingException
SAXException
IOException

addContent

protected final void addContent(TraversableSource source)
                         throws SAXException,
                                ProcessingException
Augments source nodes with additional information.

Overrides:
addContent in class TraversableGenerator
Parameters:
source - the Source to describe.
Throws:
SAXException
ProcessingException

setNodeAttributes

protected void setNodeAttributes(TraversableSource source)
                          throws SAXException,
                                 ProcessingException
Augments source node elements with additional attributes describing the Source. The additional attributes are a mimeType attribute, and iff the Source is an instance of VersionableSource and the generator is configured to output versioning information two attributes: revision and branch.

Overrides:
setNodeAttributes in class TraversableGenerator
Parameters:
source - the Source to describe.
Throws:
SAXException
ProcessingException

pushSourceLocks

public void pushSourceLocks(LockableSource source)
                     throws SAXException,
                            SourceException
Push a XML description about all locks of a source.

Parameters:
source - the Source to describe.
Throws:
SAXException
SourceException


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.