1 57 58 package org.xquark.xpath.datamodel.xerces.dom; 59 60 import org.w3c.dom.NamedNodeMap ; 61 import org.w3c.dom.Node ; 62 63 72 public class ElementDefinitionImpl 73 extends ParentNode { 74 75 79 80 static final long serialVersionUID = -8373890672670022714L; 81 82 86 87 protected String name; 88 89 90 protected NamedNodeMapImpl attributes; 91 92 96 97 public ElementDefinitionImpl(DocumentImpl ownerDocument, String name) { 98 super(ownerDocument); 99 this.name = name; 100 attributes = new NamedNodeMapImpl(ownerDocument); 101 } 102 103 107 111 public short getNodeType() { 112 return NodeImpl.ELEMENT_DEFINITION_NODE; 113 } 114 115 118 public String getNodeName() { 119 if (needsSyncData()) { 120 synchronizeData(); 121 } 122 return name; 123 } 124 125 128 public Node cloneNode(boolean deep) { 129 130 ElementDefinitionImpl newnode = 131 (ElementDefinitionImpl) super.cloneNode(deep); 132 newnode.attributes = attributes.cloneMap(newnode); 134 return newnode; 135 136 } 138 148 public NamedNodeMap getAttributes() { 149 150 if (needsSyncChildren()) { 151 synchronizeChildren(); 152 } 153 return attributes; 154 155 } 157 } | Popular Tags |