iterator = new SingletonIterator(); break; case Axis.CHILD :
/** * Resets the iterator to the last start node. * * @return A DTMAxisIterator, which may or may not be the same as this * iterator. */ public DTMAxisIterator reset() { if (_isConstant) { _currentNode = _startNode; return resetPosition(); } else { final boolean temp = _isRestartable; _isRestartable = true; setStartNode(_startNode); _isRestartable = temp; } return this; }
/** * Get the next node in the iteration. * * @return The next node handle in the iteration, or END. */ public int next() { final int result = _currentNode; _currentNode = END; return returnNode(result); } } // end of SingletonIterator
iterator = new SingletonIterator(); break; case Axis.CHILD :
iterator = new SingletonIterator(); break; case Axis.CHILD :
iterator = new SingletonIterator(); break; case Axis.CHILD :
iterator = new SingletonIterator(); break; case Axis.CHILD :
iterator = new SingletonIterator(); break; case Axis.CHILD :
iterator = new SingletonIterator(); break; case Axis.CHILD :
iterator = new SingletonIterator(); break; case Axis.CHILD :
iterator = new SingletonIterator(); break; case Axis.CHILD :
return new SingletonIterator(); case Axis.CHILD: return new ChildrenIterator();
return new SingletonIterator(); case Axis.CHILD: return new ChildrenIterator();
return new SingletonIterator(); case Axis.CHILD: return new ChildrenIterator();
/** * Set start to END should 'close' the iterator, * i.e. subsequent call to next() should return END. * * @param node Sets the root of the iteration. * * @return A DTMAxisIterator set to the start of the iteration. */ public DTMAxisIterator setStartNode(int node) { //%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily if (node == DTMDefaultBase.ROOTNODE) node = getDocument(); if (_isConstant) { _currentNode = _startNode; return resetPosition(); } else if (_isRestartable) { _currentNode = _startNode = node; return resetPosition(); } return this; }
/** * Set start to END should 'close' the iterator, * i.e. subsequent call to next() should return END. * * @param node Sets the root of the iteration. * * @return A DTMAxisIterator set to the start of the iteration. */ public DTMAxisIterator setStartNode(int node) { //%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily if (node == DTMDefaultBase.ROOTNODE) node = getDocument(); if (_isConstant) { _currentNode = _startNode; return resetPosition(); } else if (_isRestartable) { _currentNode = _startNode = node; return resetPosition(); } return this; }
/** * Set start to END should 'close' the iterator, * i.e. subsequent call to next() should return END. * * @param node Sets the root of the iteration. * * @return A DTMAxisIterator set to the start of the iteration. */ public DTMAxisIterator setStartNode(int node) { //%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily if (node == DTMDefaultBase.ROOTNODE) node = getDocument(); if (_isConstant) { _currentNode = _startNode; return resetPosition(); } else if (_isRestartable) { _currentNode = _startNode = node; return resetPosition(); } return this; }
/** * Set start to END should 'close' the iterator, * i.e. subsequent call to next() should return END. * * @param node Sets the root of the iteration. * * @return A DTMAxisIterator set to the start of the iteration. */ public DTMAxisIterator setStartNode(int node) { //%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily if (node == DTMDefaultBase.ROOTNODE) node = getDocument(); if (_isConstant) { _currentNode = _startNode; return resetPosition(); } else if (_isRestartable) { _currentNode = _startNode = node; return resetPosition(); } return this; }
/** * Set start to END should 'close' the iterator, * i.e. subsequent call to next() should return END. * * @param node Sets the root of the iteration. * * @return A DTMAxisIterator set to the start of the iteration. */ public DTMAxisIterator setStartNode(int node) { //%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily if (node == DTMDefaultBase.ROOTNODE) node = getDocument(); if (_isConstant) { _currentNode = _startNode; return resetPosition(); } else if (_isRestartable) { _currentNode = _startNode = node; return resetPosition(); } return this; }
/** * Set start to END should 'close' the iterator, * i.e. subsequent call to next() should return END. * * @param node Sets the root of the iteration. * * @return A DTMAxisIterator set to the start of the iteration. */ public DTMAxisIterator setStartNode(int node) { //%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily if (node == DTMDefaultBase.ROOTNODE) node = getDocument(); if (_isConstant) { _currentNode = _startNode; return resetPosition(); } else if (_isRestartable) { _currentNode = _startNode = node; return resetPosition(); } return this; }