public DTMAxisIterator cloneIterator() { final AxisIterator clone = new AxisIterator(_axis, _type); if (_source != null) { clone._source = _source.cloneIterator(); } clone._dtmId = _dtmId; return clone; } } // end of AxisIterator
public HeapNode cloneHeapNode() { LookAheadIterator clone = (LookAheadIterator) super.cloneHeapNode(); clone.iterator = iterator.cloneIterator(); return clone; }
/** * Get a cloned iterator. * * @return A new iterator that can be used without mutating this one. * * @throws CloneNotSupportedException */ public Object clone() throws CloneNotSupportedException { // Do not access the location path itterator during this operation! OneStepIterator clone = (OneStepIterator) super.clone(); if(m_iterator != null) { clone.m_iterator = m_iterator.cloneIterator(); } return clone; }
/** * Get a cloned iterator. * * @return A new iterator that can be used without mutating this one. * * @throws CloneNotSupportedException */ public Object clone() throws CloneNotSupportedException { // Do not access the location path itterator during this operation! OneStepIterator clone = (OneStepIterator) super.clone(); if(m_iterator != null) { clone.m_iterator = m_iterator.cloneIterator(); } return clone; }
public DTMAxisIterator cloneIterator() { try { final NthIterator clone = (NthIterator) super.clone(); clone._source = _source.cloneIterator(); // resets source clone._isRestartable = false; return clone; } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
public DTMAxisIterator cloneIterator() { _isRestartable = false; try { final StepIterator clone = (StepIterator) super.clone(); clone._source = _source.cloneIterator(); clone._iterator = _iterator.cloneIterator(); clone._iterator.setRestartable(true); // must be restartable clone._isRestartable = false; return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
/** * Returns a deep copy of this iterator. The cloned iterator is not * reset. * * @return a deep copy of this iterator. */ public DTMAxisIterator cloneIterator() { try { DTMAxisIterator nestedClone = m_baseIterator.cloneIterator(); NamespaceWildcardIterator clone = (NamespaceWildcardIterator) super.clone(); clone.m_baseIterator = nestedClone; clone.m_nsType = m_nsType; clone._isRestartable = false; return clone; } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
public DTMAxisIterator cloneIterator() { try { final MatchingIterator clone = (MatchingIterator) super.clone(); clone._source = _source.cloneIterator(); clone._isRestartable = false; return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
public DTMAxisIterator cloneIterator() { try { final FilterIterator clone = (FilterIterator) super.clone(); clone._source = _source.cloneIterator(); clone._isRestartable = false; return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
public DTMAxisIterator cloneIterator() { try { final AbsoluteIterator clone = (AbsoluteIterator) super.clone(); clone._source = _source.cloneIterator(); // resets source clone.resetPosition(); clone._isRestartable = false; return clone; } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
public DTMAxisIterator cloneIterator() { try { final ForwardPositionIterator clone = (ForwardPositionIterator) super.clone(); clone._source = _source.cloneIterator(); clone._isRestartable = false; return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
/** * Utility function: used to convert references to node-sets. If the * obj is an instanceof Node then create a singleton iterator. */ public static DTMAxisIterator referenceToNodeSet(Object obj) { // Convert var/param -> node if (obj instanceof Node) { return(new SingletonIterator(((Node)obj).node)); } // Convert var/param -> node-set else if (obj instanceof DTMAxisIterator) { return(((DTMAxisIterator)obj).cloneIterator().reset()); } else { final String className = obj.getClass().getName(); runTimeError(DATA_CONVERSION_ERR, className, "node-set"); return null; } }
public DTMAxisIterator cloneIterator() { try { NodeValueIterator clone = (NodeValueIterator)super.clone(); clone._isRestartable = false; clone._source = _source.cloneIterator(); clone._value = _value; clone._op = _op; return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
public DTMAxisIterator cloneIterator() { try { NodeValueIterator clone = (NodeValueIterator)super.clone(); clone._source = _source.cloneIterator(); clone.setRestartable(false); return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
/** * Clone a <code>SortingIterator</code> by cloning its source * iterator and then sharing the factory and the array of * <code>NodeSortRecords</code>. */ public DTMAxisIterator cloneIterator() { try { final SortingIterator clone = (SortingIterator) super.clone(); clone._source = _source.cloneIterator(); clone._factory = _factory; // shared between clones clone._data = _data; // shared between clones clone._free = _free; clone._current = _current; clone.setRestartable(false); return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
public DTMAxisIterator cloneIterator() { try { final CurrentNodeListIterator clone = (CurrentNodeListIterator) super.clone(); clone._nodes = (IntegerArray) _nodes.clone(); clone._source = _source.cloneIterator(); clone._isRestartable = false; return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
public DTMAxisIterator cloneIterator() { try { final DupFilterIterator clone = (DupFilterIterator) super.clone(); clone._nodes = (IntegerArray) _nodes.clone(); clone._source = _source.cloneIterator(); clone._isRestartable = false; return clone.reset(); } catch (CloneNotSupportedException e) { BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString()); return null; } }
public DTMAxisIterator cloneIterator() { final AxisIterator clone = new AxisIterator(_axis, _type); if (_source != null) { clone._source = _source.cloneIterator(); } clone._dtmId = _dtmId; return clone; } } // end of AxisIterator
public HeapNode cloneHeapNode() { LookAheadIterator clone = (LookAheadIterator) super.cloneHeapNode(); clone.iterator = iterator.cloneIterator(); return clone; }
public HeapNode cloneHeapNode() { LookAheadIterator clone = (LookAheadIterator) super.cloneHeapNode(); clone.iterator = iterator.cloneIterator(); return clone; }