org.apache.cocoon.transformation
Class TraxTransformer

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.transformation.AbstractTransformer
                  extended by org.apache.cocoon.transformation.TraxTransformer
All Implemented Interfaces:
Poolable, Recyclable, Disposable, Component, Configurable, LogEnabled, Serviceable, CacheableProcessingComponent, SitemapModelComponent, Transformer, XMLPipe, XMLProducer, XMLConsumer, ContentHandler, LexicalHandler
Direct Known Subclasses:
DeliTransformer

public class TraxTransformer
extends AbstractTransformer
implements Serviceable, Configurable, CacheableProcessingComponent, Disposable

Version:
SVN $Id: TraxTransformer.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Pierpaolo Fumagalli, Davanum Srinivas, Carsten Ziegeler, Giacomo Pati, Ovidiu Predescu, Mark H. Butler, Stefano Mazzocchi

Field Summary
protected  Map logicSheetParameters
          Logicsheet parameters (protected because used by subclasses)
protected  ServiceManager manager
          The service manager instance (protected because used by subclasses)
protected  Map objectModel
          The object model (protected because used by subclasses)
protected  TransformerHandler transformerHandler
          The trax TransformerHandler
protected  SourceValidity transformerValidity
          The validity of the Transformer
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
 
Fields inherited from interface org.apache.cocoon.transformation.Transformer
ROLE
 
Constructor Summary
TraxTransformer()
           
 
Method Summary
 void configure(Configuration conf)
          Configure this transformer.
 void dispose()
          Disposable
 void endDocument()
          Fix for stopping hanging threads of Xalan
 Serializable getKey()
          Generate the unique key.
protected  Map getLogicSheetParameters()
          Get the parameters for the logicsheet
 SourceValidity getValidity()
          Generate the validity object.
 void recycle()
          Recyclable
 void service(ServiceManager manager)
          Set the current ServiceManager instance used by this Serviceable.
 void setConsumer(XMLConsumer consumer)
          Set the XMLConsumer that will receive XML data.
 void setup(SourceResolver resolver, Map objectModel, String src, Parameters par)
          Set the SourceResolver, the Map with the object model, the source and sitemap Parameters used to process the request.
 void startDocument()
          Receive notification of the beginning of a document.
 
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
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
 

Field Detail

manager

protected ServiceManager manager
The service manager instance (protected because used by subclasses)


objectModel

protected Map objectModel
The object model (protected because used by subclasses)


logicSheetParameters

protected Map logicSheetParameters
Logicsheet parameters (protected because used by subclasses)


transformerHandler

protected TransformerHandler transformerHandler
The trax TransformerHandler


transformerValidity

protected SourceValidity transformerValidity
The validity of the Transformer

Constructor Detail

TraxTransformer

public TraxTransformer()
Method Detail

configure

public void configure(Configuration conf)
               throws ConfigurationException
Configure this transformer.

Specified by:
configure in interface Configurable
Throws:
ConfigurationException

service

public void service(ServiceManager manager)
             throws ServiceException
Set the current ServiceManager instance used by this Serviceable.

Specified by:
service in interface Serviceable
Throws:
ServiceException

setup

public void setup(SourceResolver resolver,
                  Map objectModel,
                  String src,
                  Parameters par)
           throws SAXException,
                  ProcessingException,
                  IOException
Set the SourceResolver, the Map with the object model, the source and sitemap Parameters used to process the request.

Specified by:
setup in interface SitemapModelComponent
Throws:
SAXException
ProcessingException
IOException

getKey

public Serializable getKey()
Generate the unique key. This key must be unique inside the space of this component.

Specified by:
getKey in interface CacheableProcessingComponent
Returns:
The generated key hashes the src

getValidity

public SourceValidity getValidity()
Generate the validity object.

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

setConsumer

public void setConsumer(XMLConsumer consumer)
Set the XMLConsumer that will receive XML data.

Specified by:
setConsumer in interface XMLProducer
Overrides:
setConsumer in class AbstractXMLProducer

getLogicSheetParameters

protected Map getLogicSheetParameters()
Get the parameters for the logicsheet


dispose

public void dispose()
Disposable

Specified by:
dispose in interface Disposable

recycle

public void recycle()
Recyclable

Specified by:
recycle in interface Recyclable
Overrides:
recycle in class AbstractXMLProducer

endDocument

public void endDocument()
                 throws SAXException
Fix for stopping hanging threads of Xalan

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

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


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