/** * The close() method should be called to release resources if the caller wants to stop reading * data before reaching the end. This is particularly relevant if the query uses saxon:stream() * to read its input, since there will then be another thread supplying data, which will be left * in suspended animation if no-one is consuming the data. * @since 9.5.1.5 (see bug 2016) */ public void close() { base.close(); state = FINISHED; }
public void close() { if (currentIter != null) { currentIter.close(); } }
/** * The close() method should be called to release resources if the caller wants to stop reading * data before reaching the end. This is particularly relevant if the query uses saxon:stream() * to read its input, since there will then be another thread supplying data, which will be left * in suspended animation if no-one is consuming the data. * @since 9.5.1.5 (see bug 2016) */ public void close() { base.close(); state = FINISHED; }
/** * Close the tuple stream, indicating that no more tuples will be supplied */ @Override public void close() { baseIterator.close(); source.close(); }
public void close() { base.close(); if (stepIterator != null) { stepIterator.close(); } }
public void close() { if (results != null) { results.close(); } base.close(); }
public void close() { base.close(); if (stepIterator != null) { stepIterator.close(); } }
/** * Evaluate the expression */ public Item evaluateItem(XPathContext context) throws XPathException { SequenceIterator iter = operand.iterate(context); Item result = iter.next(); iter.close(); return result; }
private static boolean empty(SequenceIterator iter) throws XPathException { boolean result; if ((iter.getProperties() & SequenceIterator.LOOKAHEAD) != 0) { result = !((LookaheadIterator) iter).hasNext(); } else { result = iter.next() == null; } iter.close(); return result; }
/** * Evaluate the expression */ public Item evaluateItem(XPathContext context) throws XPathException { SequenceIterator iter = getBaseExpression().iterate(context); Item result = iter.next(); iter.close(); return result; }
private static boolean exists(SequenceIterator iter) throws XPathException { boolean result; if ((iter.getProperties() & SequenceIterator.LOOKAHEAD) != 0) { result = ((LookaheadIterator) iter).hasNext(); } else { result = iter.next() != null; } iter.close(); return result; }