|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.cocoon.util.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLConsumer
org.apache.cocoon.xml.ContentHandlerWrapper
org.apache.cocoon.sitemap.DefaultContentAggregator
This generator implements the sitemap content aggregation. It combines several parts into one big XML document which is streamed into the pipeline.
| Nested Class Summary | |
protected class |
DefaultContentAggregator.Element
This object holds an element definition |
protected class |
DefaultContentAggregator.Part
This object holds the part parts :) |
| Field Summary | |
protected DefaultContentAggregator.Element |
currentElement
The element used for the current part |
protected ServiceManager |
manager
The service manager |
protected ArrayList |
parts
The aggregated parts |
protected org.apache.cocoon.environment.SourceResolver |
resolver
The SourceResolver |
protected DefaultContentAggregator.Element |
rootElement
The root element of the aggregated content |
| Fields inherited from class org.apache.cocoon.xml.ContentHandlerWrapper |
contentHandler, lexicalHandler |
| Fields inherited from interface org.apache.cocoon.generation.Generator |
ROLE |
| Constructor Summary | |
DefaultContentAggregator()
|
|
| Method Summary | |
void |
addPart(String uri,
String element,
String namespace,
String stripRootElement,
String prefix)
Add a part. |
void |
endDocument()
Ignore start and end document events |
void |
endElement(String namespaceURI,
String localName,
String raw)
Override startElement() event to add namespace and prefix |
void |
generate()
Generates the content |
Serializable |
getKey()
Generate the unique key. |
SourceValidity |
getValidity()
Generate the validity object. |
void |
recycle()
Recycle the producer by removing references |
void |
service(ServiceManager manager)
|
void |
setConsumer(org.apache.cocoon.xml.XMLConsumer consumer)
Set the XMLConsumer that will receive XML data. |
void |
setRootElement(String element,
String namespace,
String prefix)
Set the root element. |
void |
setup(org.apache.cocoon.environment.SourceResolver resolver,
Map objectModel,
String src,
Parameters par)
Set the SourceResolver, object model Map,
the source and sitemap Parameters used to process the request. |
void |
startDocument()
Ignore start and end document events |
void |
startElement(String namespaceURI,
String localName,
String raw,
Attributes atts)
Override startElement() event to add namespace and prefix |
| Methods inherited from class org.apache.cocoon.xml.ContentHandlerWrapper |
characters, comment, endCDATA, endDTD, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, setLexicalHandler, skippedEntity, startCDATA, startDTD, startEntity, startPrefixMapping |
| 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 |
| Field Detail |
protected DefaultContentAggregator.Element rootElement
protected ArrayList parts
protected DefaultContentAggregator.Element currentElement
protected org.apache.cocoon.environment.SourceResolver resolver
protected ServiceManager manager
| Constructor Detail |
public DefaultContentAggregator()
| Method Detail |
public void generate()
throws IOException,
SAXException,
org.apache.cocoon.ProcessingException
generate in interface org.apache.cocoon.generation.GeneratorIOException
SAXException
org.apache.cocoon.ProcessingExceptionpublic Serializable getKey()
getKey in interface org.apache.cocoon.caching.CacheableProcessingComponentpublic SourceValidity getValidity()
getValidity in interface org.apache.cocoon.caching.CacheableProcessingComponentnull if the
component is currently not cacheable.
public void setRootElement(String element,
String namespace,
String prefix)
setRootElement in interface org.apache.cocoon.sitemap.ContentAggregator
public void addPart(String uri,
String element,
String namespace,
String stripRootElement,
String prefix)
addPart in interface org.apache.cocoon.sitemap.ContentAggregatorpublic void setConsumer(org.apache.cocoon.xml.XMLConsumer consumer)
XMLConsumer that will receive XML data.
setContentHandler(consumer)
and setLexicalHandler(consumer).
setConsumer in interface org.apache.cocoon.xml.XMLProducerpublic void recycle()
recycle in interface Recyclable
public void setup(org.apache.cocoon.environment.SourceResolver resolver,
Map objectModel,
String src,
Parameters par)
throws org.apache.cocoon.ProcessingException,
SAXException,
IOException
SourceResolver, object model Map,
the source and sitemap Parameters used to process the request.
setup in interface org.apache.cocoon.sitemap.SitemapModelComponentorg.apache.cocoon.ProcessingException
SAXException
IOException
public void startDocument()
throws SAXException
startDocument in interface ContentHandlerSAXException
public void endDocument()
throws SAXException
endDocument in interface ContentHandlerSAXException
public void startElement(String namespaceURI,
String localName,
String raw,
Attributes atts)
throws SAXException
startElement in interface ContentHandlerSAXException
public void endElement(String namespaceURI,
String localName,
String raw)
throws SAXException
endElement in interface ContentHandlerSAXException
public void service(ServiceManager manager)
throws ServiceException
service in interface ServiceableServiceException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||