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