org.apache.cocoon.stax.component
Class IncludeTransformer
java.lang.Object
org.apache.cocoon.pipeline.component.AbstractPipelineComponent
org.apache.cocoon.stax.AbstractStAXPipelineComponent
org.apache.cocoon.stax.AbstractStAXProducer
org.apache.cocoon.stax.AbstractStAXTransformer
org.apache.cocoon.stax.component.IncludeTransformer
- All Implemented Interfaces:
- Consumer, PipelineComponent, Producer, StAXConsumer, StAXPipelineComponent, StAXProducer
public class IncludeTransformer
- extends AbstractStAXTransformer
A transformer that includes a xml document into another at the place where a include tag is found
pointing at the document to include.
|
Constructor Summary |
IncludeTransformer()
Creates a new IncludeTransformer that includes a xml document into another at the
place where a include tag is found pointing at the document to include. |
|
Method Summary |
void |
produceEvents()
Template method which has to produce at least one XMLEvent and should add this to the
internal Queue with the #add(XMLEvent) and #addAll(Collection)
methods. |
void |
setBaseUrl(URL baseUrl)
Sets the base url for this transformer. |
void |
setConfiguration(Map<String,? extends Object> configuration)
Pass component specific configuration parameters to the pipeline
component in a generic way. |
String |
toString()
|
IncludeTransformer
public IncludeTransformer()
- Creates a new
IncludeTransformer that includes a xml document into another at the
place where a include tag is found pointing at the document to include.
produceEvents
public void produceEvents()
throws XMLStreamException
- Template method which has to produce at least one
XMLEvent and should add this to the
internal Queue with the #add(XMLEvent) and #addAll(Collection)
methods. If no XMLEvent is added by this method to the internal Queue an
exception is thrown.
- Specified by:
produceEvents in class AbstractStAXTransformer
- Throws:
XMLStreamException - thrown if the StAXProducer.nextEvent() or the
StAXProducer.peek() method, called in the AbstractStAXTransformer.produceEvents() method
throw any exceptions they have to be forwarded to the end of the pipeline.- See Also:
AbstractStAXTransformer.produceEvents()
setConfiguration
public void setConfiguration(Map<String,? extends Object> configuration)
- Pass component specific configuration parameters to the pipeline
component in a generic way. This is useful in environments that
automatically assemble pipelines with their components and can't use the
components constructors or setters.
- Specified by:
setConfiguration in interface PipelineComponent- Overrides:
setConfiguration in class AbstractPipelineComponent
- Parameters:
configuration - The Map of configuration parameters.- See Also:
AbstractPipelineComponent.setConfiguration(Map)
setBaseUrl
public void setBaseUrl(URL baseUrl)
- Sets the base url for this transformer.
- Parameters:
baseUrl - The new base url
toString
public String toString()
-
- Overrides:
toString in class Object
- See Also:
Object.toString()
Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.