1 57 58 package org.xquark.xpath.datamodel.xerces.dom; 59 60 import org.w3c.dom.Node ; 61 62 66 public abstract class ChildNode 67 extends NodeImpl { 68 69 73 74 static final long serialVersionUID = -6112455738802414002L; 75 76 78 82 83 protected ChildNode previousSibling; 84 85 86 protected ChildNode nextSibling; 87 88 92 98 protected ChildNode(DocumentImpl ownerDocument) { 99 super(ownerDocument); 100 } 102 103 public ChildNode() {} 104 105 109 132 public Node cloneNode(boolean deep) { 133 134 ChildNode newnode = (ChildNode) super.cloneNode(deep); 135 136 newnode.previousSibling = null; 138 newnode.nextSibling = null; 139 newnode.isFirstChild(false); 140 141 return newnode; 142 143 } 145 148 public Node getParentNode() { 149 return isOwned() ? ownerNode : null; 152 } 153 154 157 final NodeImpl parentNode() { 158 return isOwned() ? ownerNode : null; 161 } 162 163 164 public Node getNextSibling() { 165 return nextSibling; 166 } 167 168 169 public Node getPreviousSibling() { 170 return isFirstChild() ? null : previousSibling; 173 } 174 175 178 final ChildNode previousSibling() { 179 return isFirstChild() ? null : previousSibling; 182 } 183 184 } | Popular Tags |