## com.saxonica.stream.feed
Class EventFeed

    java.lang.Object
      com.saxonica.stream.feed.EventFeed

All Implemented Interfaces:
  Feed

Direct Known Subclasses:
  ComplexNodeEventFeed, ForkingFeed

    public abstract class EventFeed

extends Object
implements Feed

An EventFeed evaluates an expression in "decomposed push" mode. Its streaming input is supplied via a sequence of calls that notify individual events in the input sequence, and its output is (in most cases) delivered via a sequence of calls to the receiver representing the parent expression. The exception is the FeedToReceiver class which appends the supplied items to a Receiver.

Constructor Summary
`EventFeed(Expression exp, Feed result, Stack<XPathContext> contextStack)`

Method Summary
`void` `append(Item item)` Append an item (node or atomic value) to the output
`void` `close()` Finish evaluating the expression.
`XPathContext` `getContext()` Get the dynamic evaluation context
`Stack<XPathContext>` `getContextStack()` Get the stack of XPathContext objects
`Expression` `getExpression()` Get the expression being evaluated by this EventFeed
`PipelineConfiguration` `getPipelineConfiguration()` Get the pipeline configuration
`Feed` `getResult()` Get the parent expression feed
`void` `open()` Start evaluating the expression.
`void` `setPipelineConfiguration(PipelineConfiguration pipe)` Set the pipeline configuration

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

Constructor Detail

### EventFeed

    public EventFeed(Expression exp,
                     Feed result,
                     Stack<XPathContext> contextStack)

Method Detail

### setPipelineConfiguration

    public void setPipelineConfiguration(PipelineConfiguration pipe)

  Set the pipeline configuration

  Parameters:
    `pipe` - the pipeline configuration

### getPipelineConfiguration

    public PipelineConfiguration getPipelineConfiguration()

  Get the pipeline configuration

  Specified by:
    `getPipelineConfiguration` in interface `Feed`
  Returns:
    the pipeline configuration

### getResult

    public Feed getResult()

  Get the parent expression feed

### getExpression

    public Expression getExpression()

  Get the expression being evaluated by this EventFeed

  Returns:
    the expression being evaluated

### getContext

    public XPathContext getContext()

  Get the dynamic evaluation context

  Returns:
    the dynamic evaluation context

### getContextStack

    public Stack<XPathContext> getContextStack()

  Get the stack of XPathContext objects

  Returns:
    the context stack

### open

    public void open()
              throws XPathException

  Start evaluating the expression. This must call open() on the parent expression feed before it does anything else. For the default implementation, this is all that it does. Note that it does not open the destination receiver.

  Specified by:
    `open` in interface `Feed`
  Throws:
    `XPathException` - if a dynamic error occurs

### append

    public void append(Item item)
                throws XPathException

  Append an item (node or atomic value) to the output

  Specified by:
    `append` in interface `Feed`
  Parameters:
    `item` - the item to be appended
  Throws:
    `XPathException` - to report any failure

### close

    public void close()
               throws XPathException

  Finish evaluating the expression. This must call close() on the parent expression feed as the last thing it does. For the default implementation, this is all that it does. Note that it does not close the destination receiver.

  Specified by:
    `close` in interface `Feed`
  Throws:
    `XPathException` - if a dynamic error occurs

Copyright (c) 2004-2010 Saxonica Limited. All rights reserved.