1 57 58 package org.enhydra.apache.xerces.dom; 59 60 import org.enhydra.apache.xerces.utils.StringPool; 61 62 96 public class DeferredEntityImpl 97 extends EntityImpl 98 implements DeferredNode { 99 100 104 105 static final long serialVersionUID = 4760180431078941638L; 106 107 111 112 protected transient int fNodeIndex; 113 114 118 122 DeferredEntityImpl(DeferredDocumentImpl ownerDocument, int nodeIndex) { 123 super(ownerDocument, null); 124 125 fNodeIndex = nodeIndex; 126 needsSyncData(true); 127 needsSyncChildren(true); 128 129 } 131 135 136 public int getNodeIndex() { 137 return fNodeIndex; 138 } 139 140 144 148 protected void synchronizeData() { 149 150 needsSyncData(false); 152 153 DeferredDocumentImpl ownerDocument = (DeferredDocumentImpl)this.ownerDocument; 155 name = ownerDocument.getNodeNameString(fNodeIndex); 156 157 StringPool pool = ownerDocument.getStringPool(); 159 int extraDataIndex = ownerDocument.getNodeValue(fNodeIndex); 160 ownerDocument.getNodeType(extraDataIndex); 161 publicId = pool.toString(ownerDocument.getNodeName(extraDataIndex)); 162 notationName = pool.toString(ownerDocument.getLastChild(extraDataIndex)); 163 164 extraDataIndex = ownerDocument.getNodeValue(extraDataIndex); 166 systemId = pool.toString(ownerDocument.getNodeName(extraDataIndex)); 167 version = pool.toString(ownerDocument.getNodeValue(extraDataIndex)); 168 encoding = pool.toString(ownerDocument.getLastChild(extraDataIndex)); 169 170 } 172 173 protected void synchronizeChildren() { 174 175 needsSyncChildren(false); 177 178 isReadOnly(false); 179 DeferredDocumentImpl ownerDocument = 180 (DeferredDocumentImpl) ownerDocument(); 181 ownerDocument.synchronizeChildren(this, fNodeIndex); 182 setReadOnly(true, true); 183 184 } 186 } | Popular Tags |