1 16 17 22 23 package org.apache.xerces.dom; 24 25 import org.w3c.dom.NamedNodeMap ; 26 27 49 public class DeferredElementImpl 50 extends ElementImpl 51 implements DeferredNode { 52 53 57 58 static final long serialVersionUID = -7670981133940934842L; 59 60 64 65 protected transient int fNodeIndex; 66 67 71 75 DeferredElementImpl(DeferredDocumentImpl ownerDoc, int nodeIndex) { 76 super(ownerDoc, null); 77 78 fNodeIndex = nodeIndex; 79 needsSyncChildren(true); 80 81 } 83 87 88 public final int getNodeIndex() { 89 return fNodeIndex; 90 } 91 92 96 97 protected final void synchronizeData() { 98 99 needsSyncData(false); 101 102 DeferredDocumentImpl ownerDocument = 104 (DeferredDocumentImpl)this.ownerDocument; 105 106 boolean orig = ownerDocument.mutationEvents; 108 ownerDocument.mutationEvents = false; 109 110 name = ownerDocument.getNodeName(fNodeIndex); 111 112 setupDefaultAttributes(); 114 int index = ownerDocument.getNodeExtra(fNodeIndex); 115 if (index != -1) { 116 NamedNodeMap attrs = getAttributes(); 117 do { 118 NodeImpl attr = (NodeImpl)ownerDocument.getNodeObject(index); 119 attrs.setNamedItem(attr); 120 index = ownerDocument.getPrevSibling(index); 121 } while (index != -1); 122 } 123 124 ownerDocument.mutationEvents = orig; 126 127 } 129 protected final void synchronizeChildren() { 130 DeferredDocumentImpl ownerDocument = 131 (DeferredDocumentImpl) ownerDocument(); 132 ownerDocument.synchronizeChildren(this, fNodeIndex); 133 } 135 } | Popular Tags |