public abstract class AbsorptionFeed extends ItemFeed
Modifier and Type | Class and Description |
---|---|
static class |
AbsorptionFeed.PendingItem
A pending item represents a tree under construction.
|
Constructor and Description |
---|
AbsorptionFeed(Feed result,
XPathContext context) |
Modifier and Type | Method and Description |
---|---|
void |
endSelectedParentNode(Location locationId)
Signal that the endElement event has occurred for the element whose startElement
event caused the Watch to be activated.
|
protected abstract AbsorptionFeed.PendingItem |
makePendingItem(int sequenceNr,
FleetingParentNode node)
Create a pending item (appropriate to the subclass) containing the data needed
to compute the result value for one node in the streamed input sequence
|
protected abstract Sequence |
processGroundedItem(Item item)
Process a grounded item in the input sequence: either a streamed leaf node such as an attribute
or text node, or an atomic value, or a non-streamed element or document node injected into the
sequence for example by use of the comma operator.
|
void |
processItem(Item item)
Signal that a node (other than an element) that matches the selection
has been found.
|
void |
setHasFailed()
Mark this feed as having failed (that is, as having detected and reported
a dynamic error).
|
Receiver |
startSelectedParentNode(FleetingParentNode node,
Location locationId)
Signal that an element has been found that matches the selection that this
Watch is looking for.
|
close, dynamicError, getContext, getExpression, getPipelineConfiguration, getReceiver, getResult, getTerminator, hasFailed, open, processItems, setExpression, setPipelineConfiguration, setTerminator
public AbsorptionFeed(Feed result, XPathContext context)
public final Receiver startSelectedParentNode(FleetingParentNode node, Location locationId) throws XPathException
startSelectedParentNode
in interface Feed
startSelectedParentNode
in class ItemFeed
node
- the node that matches the selectionlocationId
- @throws net.sf.saxon.type.ValidationExceptionXPathException
- May be raised if a dynamic error occursprotected abstract AbsorptionFeed.PendingItem makePendingItem(int sequenceNr, FleetingParentNode node) throws XPathException
sequenceNr
- the sequence number of this node within a set of nested nodesnode
- the streamed input nodeXPathException
- if a dynamic error is detected at this stagepublic final void endSelectedParentNode(Location locationId) throws XPathException
endSelectedParentNode
in interface Feed
endSelectedParentNode
in class ItemFeed
locationId
- XPathException
- if a dynamic error occurspublic void processItem(Item item) throws XPathException
processItem
in interface Feed
processItem
in class ItemFeed
item
- the node or other item that was matched.XPathException
- May be raised if a dynamic error occursprotected abstract Sequence processGroundedItem(Item item) throws XPathException
item
- the grounded itemXPathException
- if a dynamic error occurspublic void setHasFailed()
ItemFeed
setHasFailed
in class ItemFeed
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.