/* **************************************************************************** * SetAttribute() **************************************************************************** */ /** * Sets the attribute for this statement. Only 1 attribute at a time is * supported. */ public void SetAttribute(Attribute oVal) { moAttr = oVal; }
/* **************************************************************************** * reset() **************************************************************************** */ /** * Resets the internal state of this obj */ public void reset() { moAttr = null; }
} // reset() /* **************************************************************************** * fromDOM() **************************************************************************** */ /** * This method populates the obj from DOM. It does not keep a * copy of the DOM around. Whitespace information is lost in this process. */ public void fromDOM(Element oElem) { reset(); for ( Node oChild = DOMUtils.getFirstChildElement(oElem); oChild != null; oChild = DOMUtils.getNextSiblingElement(oChild)) { if (oChild.getLocalName().equals(Tags.TAG_ATTRIBUTE)) { // only accept the first XRIAuthority if (moAttr == null) { moAttr = new Attribute((Element) oChild); } } } } // fromDOM()
/* **************************************************************************** * fromDOM() **************************************************************************** */ /** * This method populates the obj from DOM. It does not keep a * copy of the DOM around. Whitespace information is lost in this process. */ public void fromDOM(XmlElement oElem) { reset(); for ( Node oChild = oElem.FirstChild; oChild != null; oChild = oChild.NextSibling) { if (oChild.LocalName.Equals(Tags.TAG_ATTRIBUTE)) { // only accept the first XRIAuthority if (moAttr == null) { moAttr = new Attribute((XmlElement) oChild); } } } }
} // getAttribute() /* **************************************************************************** * setAttribute() **************************************************************************** */ /** * Sets the attribute for this statement. Only 1 attribute at a time is * supported. */ public void setAttribute(Attribute oVal) { moAttr = oVal; } // setAttribute()