1 57 58 package com.sun.org.apache.xerces.internal.dom; 59 60 import org.w3c.dom.Node ; 61 62 68 public abstract class ChildNode 69 extends NodeImpl { 70 71 75 76 static final long serialVersionUID = -6112455738802414002L; 77 78 transient StringBuffer fBufferStr = null; 79 80 84 85 protected ChildNode previousSibling; 86 87 88 protected ChildNode nextSibling; 89 90 94 100 protected ChildNode(CoreDocumentImpl ownerDocument) { 101 super(ownerDocument); 102 } 104 105 public ChildNode() {} 106 107 111 134 public Node cloneNode(boolean deep) { 135 136 ChildNode newnode = (ChildNode) super.cloneNode(deep); 137 138 newnode.previousSibling = null; 140 newnode.nextSibling = null; 141 newnode.isFirstChild(false); 142 143 return newnode; 144 145 } 147 150 public Node getParentNode() { 151 return isOwned() ? ownerNode : null; 154 } 155 156 159 final NodeImpl parentNode() { 160 return isOwned() ? ownerNode : null; 163 } 164 165 166 public Node getNextSibling() { 167 return nextSibling; 168 } 169 170 171 public Node getPreviousSibling() { 172 return isFirstChild() ? null : previousSibling; 175 } 176 177 180 final ChildNode previousSibling() { 181 return isFirstChild() ? null : previousSibling; 184 } 185 186 } | Popular Tags |