Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 26666 invoked from network); 28 Nov 2005 15:55:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Nov 2005 15:55:25 -0000 Received: (qmail 83187 invoked by uid 500); 28 Nov 2005 15:55:23 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 83126 invoked by uid 500); 28 Nov 2005 15:55:22 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 83115 invoked by uid 500); 28 Nov 2005 15:55:22 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 83111 invoked by uid 99); 28 Nov 2005 15:55:22 -0000 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 28 Nov 2005 07:55:22 -0800 Received: (qmail 26129 invoked by uid 65534); 28 Nov 2005 15:55:01 -0000 Message-ID: <20051128155501.26104.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r349409 - in /webservices/axis2/trunk/java/modules: saaj/src/org/apache/axis2/om/impl/dom/ElementImpl.java xml/src/org/apache/axis2/om/OMElement.java xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java Date: Mon, 28 Nov 2005 15:55:00 -0000 To: axis2-cvs@ws.apache.org From: gdaniels@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: gdaniels Date: Mon Nov 28 07:54:54 2005 New Revision: 349409 URL: http://svn.apache.org/viewcvs?rev=349409&view=rev Log: * Add getAttributeValue() method to OMElement Modified: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ElementImpl.java webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMElement.java webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java Modified: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ElementImpl.java URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ElementImpl.java?rev=349409&r1=349408&r2=349409&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ElementImpl.java (original) +++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ElementImpl.java Mon Nov 28 07:54:54 2005 @@ -568,9 +568,20 @@ } } - /* (non-Javadoc) - * @see org.apache.axis2.om.OMElement#getBuilder() - */ + /** + * Return a named attribute's value, if present. + * + * @param qname the qualified name to search for + * @return a String containing the attribute value, or null + */ + public String getAttributeValue(QName qname) { + OMAttribute attr = getAttribute(qname); + return (attr == null) ? null : attr.getAttributeValue(); + } + + /* (non-Javadoc) + * @see org.apache.axis2.om.OMElement#getBuilder() + */ public OMXMLParserWrapper getBuilder() { return this.builder; } Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMElement.java URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMElement.java?rev=349409&r1=349408&r2=349409&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMElement.java (original) +++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMElement.java Mon Nov 28 07:54:54 2005 @@ -138,6 +138,14 @@ public OMAttribute getAttribute(QName qname); /** + * Return a named attribute's value, if present. + * + * @param qname the qualified name to search for + * @return a String containing the attribute value, or null + */ + public String getAttributeValue(QName qname); + + /** * This will add an attribute to this element. *

*

There is no order implied by added attributes.

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java?rev=349409&r1=349408&r2=349409&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java (original) +++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java Mon Nov 28 07:54:54 2005 @@ -417,8 +417,18 @@ * @return an OMAttribute with the given name if found, or null */ public OMAttribute getAttribute(QName qname) { - return attributes == null ? null : (OMAttribute) attributes.get(qname); + } + + /** + * Return a named attribute's value, if present. + * + * @param qname the qualified name to search for + * @return a String containing the attribute value, or null + */ + public String getAttributeValue(QName qname) { + OMAttribute attr = getAttribute(qname); + return (attr == null) ? null : attr.getAttributeValue(); } /**