Class GeneralComparisonMinimaxFeed

All Implemented Interfaces:
Result, Receiver

public class GeneralComparisonMinimaxFeed extends AtomicItemFeed
This class is used when a streaming template requests a general comparison with one operand being pushed from the streamed input document, and the other being evaluated in pull mode. It is used for the operators lt, le, gt, ge.

The unstreamed operand is evaluated when the first streamed item is encountered. At this point we build a list of all the values from the unstreamed operand, unconverted, plus the min and max of all numeric values including all untyped values that are castable to numeric.

Each streamed input value is then compared against this data. If the streamed input value is numeric, or is untyped and castable to numeric, then it is compared with the min and max numeric values. Otherwise, it is compared against the complete list of unconverted values.

  • Constructor Details

  • Method Details

    • open

      public void open(Terminator terminator) throws XPathException
      Description copied from class: ItemFeed
      Start evaluating the expression. The default implementation does nothing.
      Overrides:
      open in class ItemFeed
      Parameters:
      terminator - used to achieve early exit
      Throws:
      XPathException - if a dynamic error occurs
    • append

      public void append(Item item) throws XPathException
      Supply an item to the feed
      Specified by:
      append in interface Receiver
      Specified by:
      append in class ItemFeed
      Parameters:
      item - the item being fed (in this case, an item in the "pushed" operand sequence that is being compared
      Throws:
      XPathException - to report any failure
    • close

      public void close() throws XPathException
      Description copied from class: ItemFeed
      Finish evaluating the expression.
      Specified by:
      close in interface Receiver
      Overrides:
      close in class ItemFeed
      Throws:
      XPathException - if a dynamic error occurs