|
|||||||||||
| 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.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 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(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 DefaultContentAggregator.Element rootElement
protected ArrayList parts
protected DefaultContentAggregator.Element currentElement
protected SourceResolver resolver
protected ServiceManager manager
| Constructor Detail |
public DefaultContentAggregator()
| 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)
setRootElement in interface ContentAggregator
public void addPart(String uri,
String element,
String namespace,
String stripRootElement,
String prefix)
addPart in interface ContentAggregatorpublic void setConsumer(XMLConsumer consumer)
XMLConsumer that will receive XML data.
setContentHandler(consumer)
and setLexicalHandler(consumer).
setConsumer in interface XMLProducerconsumer - The XMLConsumer target for SAX events.public 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 SitemapModelComponentresolver - The SourceResolver to find resources within your context.objectModel - A java.util.Map that contains the request and session information.src - The value of the "src" attribute in the sitemap.par - The sitemap parameters passed into your component.
ProcessingException - if there is any other unexpected problem.
IOException - if there is a problem reading files.
SAXException - if there is a problem reading a SAX stream.
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 ContentHandlerWrapperSAXException
public void endElement(String namespaceURI,
String localName,
String raw)
throws SAXException
endElement in interface ContentHandlerendElement in class ContentHandlerWrapperSAXException
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 | ||||||||||