home *** CD-ROM | disk | FTP | other *** search
- package com.ibm.xml.dom;
-
- import org.w3c.dom.Attr;
- import org.w3c.dom.DOMException;
- import org.w3c.dom.Element;
- import org.w3c.dom.Node;
-
- public class AttrImpl extends NodeImpl implements Attr {
- static final long serialVersionUID = -4421396439224009670L;
- protected boolean owned;
- protected boolean specified = true;
-
- public AttrImpl(DocumentImpl var1, String var2) {
- super(var1, var2, (String)null);
- }
-
- public short getNodeType() {
- return 2;
- }
-
- public void setNodeValue(String var1) throws DOMException {
- this.setValue(var1);
- }
-
- public String getNodeValue() {
- return this.getValue();
- }
-
- public Node getParentNode() {
- return null;
- }
-
- public String getName() {
- if (super.syncData) {
- ((NodeImpl)this).synchronizeData();
- }
-
- return super.name;
- }
-
- public void setValue(String var1) {
- if (super.readOnly) {
- throw new DOMExceptionImpl((short)7, (String)null);
- } else {
- super.firstChild = null;
- super.lastChild = null;
- super.syncChildren = false;
- if (var1 != null) {
- ((NodeImpl)this).appendChild(super.ownerDocument.createTextNode(var1));
- }
-
- this.specified = true;
- ((NodeImpl)this).changed();
- }
- }
-
- public String getValue() {
- StringBuffer var1 = new StringBuffer();
-
- for(NodeImpl var2 = (NodeImpl)((NodeImpl)this).getFirstChild(); var2 != null; var2 = var2.nextSibling) {
- var1.append(var2.getNodeValue());
- }
-
- return var1.toString();
- }
-
- public boolean getSpecified() {
- if (super.syncData) {
- ((NodeImpl)this).synchronizeData();
- }
-
- return this.specified;
- }
-
- /** @deprecated */
- public Element getElement() {
- return (Element)super.parentNode;
- }
-
- public Element getOwnerElement() {
- return (Element)super.parentNode;
- }
-
- public void setSpecified(boolean var1) {
- if (super.syncData) {
- ((NodeImpl)this).synchronizeData();
- }
-
- this.specified = var1;
- }
-
- public String toString() {
- return this.getName() + "=" + "\"" + this.getValue() + "\"";
- }
- }
-