Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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()`

Methods inherited from class org.apache.cocoon.stax.AbstractStAXTransformer
`addAllEventsToQueue, addEventToQueue, getParent, hasNext, initiatePullProcessing, isQueueEmpty, nextEvent, peek, setParent`

Methods inherited from class org.apache.cocoon.stax.AbstractStAXProducer
`getConsumer, setConsumer`

Methods inherited from class org.apache.cocoon.pipeline.component.AbstractPipelineComponent
`finish, setup`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.apache.cocoon.pipeline.component.PipelineComponent
`finish, setup`

Constructor Detail

### 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.

Method Detail

### 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()`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.