org.apache.cocoon.generation
Class BlogOverviewGenerator

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.BlogOverviewGenerator
All Implemented Interfaces:
org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.component.Component, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.cocoon.generation.Generator, org.apache.cocoon.sitemap.SitemapModelComponent, org.apache.cocoon.xml.XMLProducer

public class BlogOverviewGenerator
extends org.apache.cocoon.generation.ServiceableGenerator

BlogOverviewGenerator Builds an ordered tree from the blog entries in the repository, allows simple queries.


Field Summary
protected  java.lang.String area
          The Lenya-Area where the generator should work on
protected  org.xml.sax.helpers.AttributesImpl attributes
          Convenience object, so we don't need to create an AttributesImpl for every element.
protected static java.lang.String BLOG_NODE_NAME
          Node and attribute names
protected  int day
           
protected static java.lang.String DAY_NODE_NAME
           
protected static java.lang.String ENTRY_NODE_NAME
           
protected static java.lang.String ID_ATTR_NAME
           
protected static java.lang.String LASTMOD_ATTR_NAME
           
protected  int month
           
protected static java.lang.String MONTH_NODE_NAME
           
protected static java.lang.String PATH_ATTR_NAME
           
protected static java.lang.String PREFIX
          The namespace prefix for this namespace.
protected  org.apache.cocoon.environment.Request request
          The request
protected static java.lang.String STRUCT_ATTR_NAME
           
protected  java.lang.String structure
           
protected static java.lang.String TITLE_ATTR_NAME
           
protected static java.lang.String URI
          The URI of the namespace of this generator.
protected static java.lang.String URL_ATTR_NAME
           
protected  int year
          Request parameters
protected static java.lang.String YEAR_NODE_NAME
           
 
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
BlogOverviewGenerator()
           
 
Method Summary
 void generate()
          Generate XML data.
 void setup(org.apache.cocoon.environment.SourceResolver resolver, java.util.Map objectModel, java.lang.String src, org.apache.avalon.framework.parameters.Parameters par)
          Set the request parameters.
 
Methods inherited from class org.apache.cocoon.generation.ServiceableGenerator
dispose, service
 
Methods inherited from class org.apache.cocoon.generation.AbstractGenerator
recycle
 
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

URI

protected static final java.lang.String URI
The URI of the namespace of this generator.

See Also:
Constant Field Values

PREFIX

protected static final java.lang.String PREFIX
The namespace prefix for this namespace.

See Also:
Constant Field Values

BLOG_NODE_NAME

protected static final java.lang.String BLOG_NODE_NAME
Node and attribute names

See Also:
Constant Field Values

ENTRY_NODE_NAME

protected static final java.lang.String ENTRY_NODE_NAME
See Also:
Constant Field Values

PATH_ATTR_NAME

protected static final java.lang.String PATH_ATTR_NAME
See Also:
Constant Field Values

URL_ATTR_NAME

protected static final java.lang.String URL_ATTR_NAME
See Also:
Constant Field Values

TITLE_ATTR_NAME

protected static final java.lang.String TITLE_ATTR_NAME
See Also:
Constant Field Values

LASTMOD_ATTR_NAME

protected static final java.lang.String LASTMOD_ATTR_NAME
See Also:
Constant Field Values

STRUCT_ATTR_NAME

protected static final java.lang.String STRUCT_ATTR_NAME
See Also:
Constant Field Values

YEAR_NODE_NAME

protected static final java.lang.String YEAR_NODE_NAME
See Also:
Constant Field Values

MONTH_NODE_NAME

protected static final java.lang.String MONTH_NODE_NAME
See Also:
Constant Field Values

DAY_NODE_NAME

protected static final java.lang.String DAY_NODE_NAME
See Also:
Constant Field Values

ID_ATTR_NAME

protected static final java.lang.String ID_ATTR_NAME
See Also:
Constant Field Values

attributes

protected org.xml.sax.helpers.AttributesImpl attributes
Convenience object, so we don't need to create an AttributesImpl for every element.


area

protected java.lang.String area
The Lenya-Area where the generator should work on


year

protected int year
Request parameters


month

protected int month

day

protected int day

structure

protected java.lang.String structure

request

protected org.apache.cocoon.environment.Request request
The request

Constructor Detail

BlogOverviewGenerator

public BlogOverviewGenerator()
Method Detail

setup

public void setup(org.apache.cocoon.environment.SourceResolver resolver,
                  java.util.Map objectModel,
                  java.lang.String src,
                  org.apache.avalon.framework.parameters.Parameters par)
           throws org.apache.cocoon.ProcessingException,
                  org.xml.sax.SAXException,
                  java.io.IOException
Set the request parameters. Must be called before the generate method.

Specified by:
setup in interface org.apache.cocoon.sitemap.SitemapModelComponent
Overrides:
setup in class org.apache.cocoon.generation.AbstractGenerator
Parameters:
resolver - the SourceResolver object
objectModel - a Map containing model object
src - the source URI (ignored)
par - configuration parameters
Throws:
org.apache.cocoon.ProcessingException
org.xml.sax.SAXException
java.io.IOException

generate

public void generate()
              throws org.xml.sax.SAXException,
                     org.apache.cocoon.ProcessingException
Generate XML data.

Throws:
org.xml.sax.SAXException - if an error occurs while outputting the document
org.apache.cocoon.ProcessingException


Copyright $ Apache Software Foundation. All Rights Reserved.