1 57 58 63 64 package com.sun.org.apache.xerces.internal.dom; 65 66 import org.w3c.dom.NamedNodeMap ; 67 68 88 public class DeferredElementImpl 89 extends ElementImpl 90 implements DeferredNode { 91 92 96 97 static final long serialVersionUID = -7670981133940934842L; 98 99 103 104 protected transient int fNodeIndex; 105 106 110 114 DeferredElementImpl(DeferredDocumentImpl ownerDoc, int nodeIndex) { 115 super(ownerDoc, null); 116 117 fNodeIndex = nodeIndex; 118 needsSyncChildren(true); 119 120 } 122 126 127 public final int getNodeIndex() { 128 return fNodeIndex; 129 } 130 131 135 136 protected final void synchronizeData() { 137 138 needsSyncData(false); 140 141 DeferredDocumentImpl ownerDocument = 143 (DeferredDocumentImpl)this.ownerDocument; 144 145 boolean orig = ownerDocument.mutationEvents; 147 ownerDocument.mutationEvents = false; 148 149 name = ownerDocument.getNodeName(fNodeIndex); 150 type = ownerDocument.getTypeInfo(fNodeIndex); 151 152 setupDefaultAttributes(); 154 int index = ownerDocument.getNodeExtra(fNodeIndex); 155 if (index != -1) { 156 NamedNodeMap attrs = getAttributes(); 157 do { 158 NodeImpl attr = (NodeImpl)ownerDocument.getNodeObject(index); 159 attrs.setNamedItem(attr); 160 index = ownerDocument.getPrevSibling(index); 161 } while (index != -1); 162 } 163 164 ownerDocument.mutationEvents = orig; 166 167 } 169 protected final void synchronizeChildren() { 170 DeferredDocumentImpl ownerDocument = 171 (DeferredDocumentImpl) ownerDocument(); 172 ownerDocument.synchronizeChildren(this, fNodeIndex); 173 } 175 } | Popular Tags |