Ejemplo n.º 1
0
 public void addAttribute(String uri, String localName, String qname, String type, String value) {
   if (_openElementName != null) {
     _attributes.addAttribute(uri, localName, qname, type, value);
   } else {
     BasisLibrary.runTimeError(BasisLibrary.STRAY_ATTRIBUTE_ERR, qname);
   }
 }
Ejemplo n.º 2
0
 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;
   }
 }
    /**
     * Creates a deep copy of this {@link HeapNode}. The clone is not reset from the current
     * position of the original.
     *
     * @return the cloned heap node
     */
    public HeapNode cloneHeapNode() {
      HeapNode clone;

      try {
        clone = (HeapNode) super.clone();
      } catch (CloneNotSupportedException e) {
        BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString());
        return null;
      }

      clone._node = _node;
      clone._markedNode = _node;

      return clone;
    }
  public DTMAxisIterator cloneIterator() {
    _isRestartable = false;
    final HeapNode[] heapCopy = new HeapNode[_heap.length];
    try {
      MultiValuedNodeHeapIterator clone = (MultiValuedNodeHeapIterator) super.clone();

      for (int i = 0; i < _free; i++) {
        heapCopy[i] = _heap[i].cloneHeapNode();
      }
      clone.setRestartable(false);
      clone._heap = heapCopy;
      return clone.reset();
    } catch (CloneNotSupportedException e) {
      BasisLibrary.runTimeError(BasisLibrary.ITERATOR_CLONE_ERR, e.toString());
      return null;
    }
  }