Example #1
0
 /*
 ****************************************************************************
 * SetAttribute()
 ****************************************************************************
 */
 /**
 * Sets the attribute for this statement.  Only 1 attribute at a time is
 * supported.
 */
 public void SetAttribute(Attribute oVal)
 {
     moAttr = oVal;
 }
Example #2
0
 /*
 ****************************************************************************
 * reset()
 ****************************************************************************
 */
 /**
 * Resets the internal state of this obj
 */
 public void reset()
 {
     moAttr = null;
 }
Example #3
0
    } // 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()
Example #4
0
        /*
        ****************************************************************************
        * 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);
                }
            }
            }
        }
Example #5
0
    } // getAttribute()

    /*
    ****************************************************************************
    * setAttribute()
    ****************************************************************************
    */ /**
    * Sets the attribute for this statement.  Only 1 attribute at a time is
    * supported.
    */
    public void setAttribute(Attribute oVal)
    {
        moAttr = oVal;

    } // setAttribute()