org.apache.cocoon.transformation
Class SimpleFormInstanceExtractionTransformer

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.AbstractExtractionTransformer
                      extended by org.apache.cocoon.transformation.SimpleFormInstanceExtractionTransformer
All Implemented Interfaces:
Poolable, Recyclable, Component, Configurable, LogEnabled, Serviceable, SitemapModelComponent, Transformer, XMLPipe, XMLProducer, XMLConsumer, ContentHandler, LexicalHandler

public class SimpleFormInstanceExtractionTransformer
extends AbstractExtractionTransformer
implements Configurable, Serviceable

Version:
CVS $Id: SimpleFormInstanceExtractionTransformer.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Christian Haul

Nested Class Summary
protected static class SimpleFormInstanceExtractionTransformer.ElementData
           
 
Field Summary
protected static String OUTPUT_MODULE_SELECTOR
           
 
Fields inherited from class org.apache.cocoon.transformation.AbstractExtractionTransformer
currentBuilder, extractLevel
 
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
SimpleFormInstanceExtractionTransformer()
           
 
Method Summary
 void configure(Configuration config)
           
 boolean endExtracting(String uri, String loc, String raw)
          Receive notification of the beginning of an element.
 void endExtractingDocument(String uri, String loc, String raw)
          End root element and replace it with the instance name.
 void handleExtractedDocument(Document doc)
          Receive notification of the end of the extracted Document.
 void recycle()
          Recycle the producer by removing references, and resetting handlers to null (empty) implementations.
 void service(ServiceManager manager)
           
 void setup(SourceResolver resolver, Map objectModel, String src, Parameters parameters)
          Setup the transformer.
 boolean startExtracting(String uri, String loc, String raw, Attributes a)
          Receive notification of the beginning of an element.
 void startExtractingDocument(String uri, String loc, String raw, Attributes a)
          Start root element and replace it with the instance name.
 
Methods inherited from class org.apache.cocoon.transformation.AbstractExtractionTransformer
characters, comment, endCDATA, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, skippedEntity, startCDATA, startDTD, startElement, startEntity, startPrefixMapping
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe
endDocument, setDocumentLocator, startDocument
 
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
endDocument, setDocumentLocator, startDocument
 
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
 

Field Detail

OUTPUT_MODULE_SELECTOR

protected static final String OUTPUT_MODULE_SELECTOR
Constructor Detail

SimpleFormInstanceExtractionTransformer

public SimpleFormInstanceExtractionTransformer()
Method Detail

configure

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

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException

setup

public void setup(SourceResolver resolver,
                  Map objectModel,
                  String src,
                  Parameters parameters)
           throws ProcessingException,
                  SAXException,
                  IOException
Setup the transformer.

Specified by:
setup in interface SitemapModelComponent
Overrides:
setup in class AbstractExtractionTransformer
Throws:
ProcessingException
SAXException
IOException

recycle

public void recycle()
Description copied from class: AbstractXMLProducer
Recycle the producer by removing references, and resetting handlers to null (empty) implementations.

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

startExtracting

public boolean startExtracting(String uri,
                               String loc,
                               String raw,
                               Attributes a)
Receive notification of the beginning of an element.

Parameters:
uri - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
loc - 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.
a - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
Returns:
a boolean value to signal to start extracting

endExtracting

public boolean endExtracting(String uri,
                             String loc,
                             String raw)
Receive notification of the beginning of an element.

Parameters:
uri - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
loc - 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
Returns:
a boolean value to signal to stop extracting

startExtractingDocument

public void startExtractingDocument(String uri,
                                    String loc,
                                    String raw,
                                    Attributes a)
                             throws SAXException
Start root element and replace it with the instance name.

Overrides:
startExtractingDocument in class AbstractExtractionTransformer
Parameters:
uri - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
loc - 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.
a - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
Throws:
SAXException
See Also:
AbstractExtractionTransformer.startExtractingDocument(String, String, String, Attributes)

endExtractingDocument

public void endExtractingDocument(String uri,
                                  String loc,
                                  String raw)
                           throws SAXException
End root element and replace it with the instance name.

Overrides:
endExtractingDocument in class AbstractExtractionTransformer
Parameters:
uri - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
loc - 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.
Throws:
SAXException
See Also:
AbstractExtractionTransformer.endExtractingDocument(String, String, String)

handleExtractedDocument

public void handleExtractedDocument(Document doc)
Receive notification of the end of the extracted Document.

Parameters:
doc - a Document value


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