01: package net.sf.saxon.om;
02:
03: /**
04: * A SequenceIterator is used to iterate over a sequence. An AtomizableIterator
05: * is a SequenceIterator that can be asked to atomize any nodes encountered
06: * in this sequence. It does not actually have to perform this atomization, it merely
07: * has to accept the request. If atomization is requested, the iterator can atomize
08: * some, all, or none of the nodes it encounters at its discretion: any that are
09: * not atomized will be handled by the containing Atomizer.
10: *
11: * This mechanism provides an optimization, allowing atomization to occur at a lower
12: * level of the system, which avoids the overheads of node creation in some tree
13: * models.
14: */
15:
16: public interface AtomizableIterator extends SequenceIterator {
17:
18: /**
19: * Indicate that any nodes returned in the sequence will be atomized. This
20: * means that if it wishes to do so, the implementation can return the typed
21: * values of the nodes rather than the nodes themselves. The implementation
22: * is free to ignore this hint.
23: * @param atomizing true if the caller of this iterator will atomize any
24: * nodes that are returned, and is therefore willing to accept the typed
25: * value of the nodes instead of the nodes themselves.
26: */
27:
28: public void setIsAtomizing(boolean atomizing);
29:
30: }
31:
32: //
33: // The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
34: // you may not use this file except in compliance with the License. You may obtain a copy of the
35: // License at http://www.mozilla.org/MPL/
36: //
37: // Software distributed under the License is distributed on an "AS IS" basis,
38: // WITHOUT WARRANTY OF ANY KIND, either express or implied.
39: // See the License for the specific language governing rights and limitations under the License.
40: //
41: // The Original Code is: all this file.
42: //
43: // The Initial Developer of the Original Code is Michael H. Kay.
44: //
45: // Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
46: //
47: // Contributor(s): none.
48: //
|