org.apache.cocoon.serialization
Class iTextSerializer

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.xml.AbstractXMLProducer
          extended by org.apache.cocoon.xml.AbstractXMLPipe
              extended by org.apache.cocoon.serialization.AbstractSerializer
                  extended by org.apache.cocoon.serialization.iTextSerializer
All Implemented Interfaces:
Poolable, Recyclable, Component, Configurable, LogEnabled, CacheableProcessingComponent, Serializer, SitemapOutputComponent, XMLPipe, XMLProducer, XMLConsumer, ContentHandler, LexicalHandler

public final class iTextSerializer
extends AbstractSerializer
implements Configurable, CacheableProcessingComponent

Version:
CVS $Id: iTextSerializer.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Torsten Curdt

Field Summary
 
Fields inherited from class org.apache.cocoon.serialization.AbstractSerializer
output
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
 
Fields inherited from interface org.apache.cocoon.serialization.Serializer
ROLE
 
Constructor Summary
iTextSerializer()
           
 
Method Summary
 void configure(Configuration conf)
           
 void endDocument()
          Receive notification of the end of a document.
 Serializable getKey()
          Generate the unique key.
 String getMimeType()
          Get the mime-type of the output of this Serializer
 SourceValidity getValidity()
          Generate the validity object.
 void setOutputStream(OutputStream out)
          Set the OutputStream where the requested resource should be serialized.
 boolean shouldSetContentLength()
          Test if the component wants to set the content length
 void startDocument()
          Receive notification of the beginning of a document.
 
Methods inherited from class org.apache.cocoon.serialization.AbstractSerializer
recycle
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe
characters, comment, endCDATA, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDTD, startElement, startEntity, startPrefixMapping
 
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.xml.sax.ContentHandler
characters, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startElement, startPrefixMapping
 
Methods inherited from interface org.xml.sax.ext.LexicalHandler
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity
 
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
 

Constructor Detail

iTextSerializer

public iTextSerializer()
Method Detail

configure

public void configure(Configuration conf)
               throws ConfigurationException
Specified by:
configure in interface Configurable
Throws:
ConfigurationException

getMimeType

public String getMimeType()
Description copied from class: AbstractSerializer
Get the mime-type of the output of this Serializer

Specified by:
getMimeType in interface SitemapOutputComponent
Overrides:
getMimeType in class AbstractSerializer
See Also:
AbstractProcessingPipeline.setMimeTypeForSerializer(org.apache.cocoon.environment.Environment), AbstractProcessingPipeline.setMimeTypeForReader(org.apache.cocoon.environment.Environment)

startDocument

public void startDocument()
                   throws SAXException
Description copied from class: AbstractXMLPipe
Receive notification of the beginning of a document.

Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class AbstractXMLPipe
Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
Description copied from class: AbstractXMLPipe
Receive notification of the end of a document.

Specified by:
endDocument in interface ContentHandler
Overrides:
endDocument in class AbstractXMLPipe
Throws:
SAXException

setOutputStream

public void setOutputStream(OutputStream out)
Description copied from class: AbstractSerializer
Set the OutputStream where the requested resource should be serialized.

Specified by:
setOutputStream in interface SitemapOutputComponent
Overrides:
setOutputStream in class AbstractSerializer

getKey

public Serializable getKey()
Description copied from interface: CacheableProcessingComponent
Generate the unique key. This key must be unique inside the space of this component. This method must be invoked before the getValidity() method.

Specified by:
getKey in interface CacheableProcessingComponent
Returns:
The generated key or null if the component is currently not cacheable.

getValidity

public SourceValidity getValidity()
Description copied from interface: CacheableProcessingComponent
Generate the validity object. Before this method can be invoked the getKey() method must be invoked.

Specified by:
getValidity in interface CacheableProcessingComponent
Returns:
The generated validity object or null if the component is currently not cacheable.

shouldSetContentLength

public boolean shouldSetContentLength()
Description copied from class: AbstractSerializer
Test if the component wants to set the content length

Specified by:
shouldSetContentLength in interface SitemapOutputComponent
Overrides:
shouldSetContentLength in class AbstractSerializer


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