|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLConsumer
org.apache.cocoon.xml.ContentHandlerWrapper
org.apache.cocoon.sitemap.ContentAggregator
public class ContentAggregator
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 static class |
ContentAggregator.Element
This object holds an element definition |
protected static class |
ContentAggregator.Part
This object holds the part parts :) |
| Field Summary | |
|---|---|
protected ContentAggregator.Element |
currentElement
The element used for the current part |
protected ServiceManager |
manager
The service manager |
protected ArrayList |
parts
The aggregated parts |
protected SourceResolver |
resolver
The SourceResolver |
protected ContentAggregator.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 | |
|---|---|
ContentAggregator()
|
|
| 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(XMLConsumer consumer)
Set the XMLConsumer that will receive XML data. |
void |
setRootElement(String element,
String namespace,
String prefix)
Set the root element. |
void |
setup(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.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 |
| Field Detail |
|---|
protected ContentAggregator.Element rootElement
protected ArrayList parts
protected ContentAggregator.Element currentElement
protected SourceResolver resolver
protected ServiceManager manager
| Constructor Detail |
|---|
public ContentAggregator()
| Method Detail |
|---|
public void generate()
throws IOException,
SAXException,
ProcessingException
generate in interface GeneratorIOException
SAXException
ProcessingExceptionpublic Serializable getKey()
getKey in interface CacheableProcessingComponentpublic SourceValidity getValidity()
getValidity in interface CacheableProcessingComponentnull if the
component is currently not cacheable.
public void setRootElement(String element,
String namespace,
String prefix)
public void addPart(String uri,
String element,
String namespace,
String stripRootElement,
String prefix)
public void setConsumer(XMLConsumer consumer)
XMLConsumer that will receive XML data.
setContentHandler(consumer)
and setLexicalHandler(consumer).
setConsumer in interface XMLProducerpublic void recycle()
recycle in interface Recyclablerecycle in class ContentHandlerWrapper
public void setup(SourceResolver resolver,
Map objectModel,
String src,
Parameters par)
throws ProcessingException,
SAXException,
IOException
SourceResolver, object model Map,
the source and sitemap Parameters used to process the request.
setup in interface SitemapModelComponentProcessingException
SAXException
IOException
public void startDocument()
throws SAXException
startDocument in interface ContentHandlerstartDocument in class ContentHandlerWrapperSAXException
public void endDocument()
throws SAXException
endDocument in interface ContentHandlerendDocument in class ContentHandlerWrapperSAXException
public void startElement(String namespaceURI,
String localName,
String raw,
Attributes atts)
throws SAXException
startElement in interface ContentHandlerstartElement in class ContentHandlerWrappernamespaceURI - The Namespace URI, or the empty string if the element has no
Namespace URI or if Namespace
processing is not being performed.localName - The local name (without prefix), or the empty string if
Namespace processing is not being performed.raw - The raw XML 1.0 name (with prefix), or the empty string if
raw names are not available.atts - The attributes attached to the element. If there are no
attributes, it shall be an empty Attributes object.
SAXException
public void endElement(String namespaceURI,
String localName,
String raw)
throws SAXException
endElement in interface ContentHandlerendElement in class ContentHandlerWrappernamespaceURI - The Namespace URI, or the empty string if the element has no
Namespace URI or if Namespace
processing is not being performed.localName - The local name (without prefix), or the empty string if
Namespace processing is not being performed.raw - The raw XML 1.0 name (with prefix), or the empty string if
raw names are not available.
SAXException
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 | |||||||||