Return-Path: X-Original-To: apmail-oodt-dev-archive@www.apache.org Delivered-To: apmail-oodt-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ECECE915C for ; Wed, 30 May 2012 12:38:31 +0000 (UTC) Received: (qmail 47195 invoked by uid 500); 30 May 2012 12:38:31 -0000 Delivered-To: apmail-oodt-dev-archive@oodt.apache.org Received: (qmail 47120 invoked by uid 500); 30 May 2012 12:38:31 -0000 Mailing-List: contact dev-help@oodt.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@oodt.apache.org Delivered-To: mailing list dev@oodt.apache.org Received: (qmail 47043 invoked by uid 99); 30 May 2012 12:38:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 May 2012 12:38:31 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [128.149.139.109] (HELO mail.jpl.nasa.gov) (128.149.139.109) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 May 2012 12:38:25 +0000 Received: from mail.jpl.nasa.gov (ap-ehub-sp01.jpl.nasa.gov [128.149.137.148]) by smtp.jpl.nasa.gov (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q4UCc2aG025580 (using TLSv1/SSLv3 with cipher AES128-SHA (128 bits) verified NO) for ; Wed, 30 May 2012 05:38:03 -0700 Received: from AP-EMBX-SP10.RES.AD.JPL ([169.254.1.185]) by ap-ehub-sp01.RES.AD.JPL ([169.254.3.250]) with mapi id 14.02.0298.004; Wed, 30 May 2012 05:38:02 -0700 From: "Cinquini, Luca (3880)" To: "" Subject: Re: svn commit: r1343834 - /oodt/trunk/opendapps/src/main/java/org/apache/oodt/opendapps/OpendapProfileElementExtractor.java Thread-Topic: svn commit: r1343834 - /oodt/trunk/opendapps/src/main/java/org/apache/oodt/opendapps/OpendapProfileElementExtractor.java Thread-Index: AQHNPbmxCefzMXqe8UKu5yZ1gwirBpbiE16AgAConwA= Date: Wed, 30 May 2012 12:38:02 +0000 Message-ID: <0444E728-B2F3-4B69-9D98-44D09425D15D@jpl.nasa.gov> References: <20120529163935.5E87A2388978@eris.apache.org> <077B5C32-3B1C-4DE0-BEF5-BFCBE4D863E2@jpl.nasa.gov> In-Reply-To: <077B5C32-3B1C-4DE0-BEF5-BFCBE4D863E2@jpl.nasa.gov> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [128.149.137.114] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Source-Sender: Luca.Cinquini@jpl.nasa.gov X-AUTH: Authorized X-Virus-Checked: Checked by ClamAV on apache.org Hi Chris, not really because this was really a small bug that I found - do we need t= o file tickets for every single commit ? (if so, no problem). I do have some bigger items coming up that need Jira tickets, in-fact I'll = file these soon. thanks, Luca On May 29, 2012, at 8:34 PM, Mattmann, Chris A (388J) wrote: > Hey Luca, >=20 > Did you file an issue in JIRA for the below or was it related to one?=20 >=20 > Thanks, > Chris >=20 > On May 29, 2012, at 9:39 AM, > wrote: >=20 >> Author: luca >> Date: Tue May 29 16:39:34 2012 >> New Revision: 1343834 >>=20 >> URL: http://svn.apache.org/viewvc?rev=3D1343834&view=3Drev >> Log: >> Protecting metadata extraction versus attributes that are containers >>=20 >> Modified: >> oodt/trunk/opendapps/src/main/java/org/apache/oodt/opendapps/OpendapPr= ofileElementExtractor.java >>=20 >> Modified: oodt/trunk/opendapps/src/main/java/org/apache/oodt/opendapps/O= pendapProfileElementExtractor.java >> URL: http://svn.apache.org/viewvc/oodt/trunk/opendapps/src/main/java/org= /apache/oodt/opendapps/OpendapProfileElementExtractor.java?rev=3D1343834&r1= =3D1343833&r2=3D1343834&view=3Ddiff >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- oodt/trunk/opendapps/src/main/java/org/apache/oodt/opendapps/Opendap= ProfileElementExtractor.java (original) >> +++ oodt/trunk/opendapps/src/main/java/org/apache/oodt/opendapps/Opendap= ProfileElementExtractor.java Tue May 29 16:39:34 2012 >> @@ -68,32 +68,38 @@ public class OpendapProfileElementExtrac >> while (attributeNames.hasMoreElements()) { >> String attrName =3D (String) attributeNames.nextElement(); >> Attribute attr =3D attTable.getAttribute(attrName); >> - Enumeration attrValues =3D null; >> - try { >> - attrValues =3D attr.getValues(); >> - } catch (NoSuchAttributeException e) { >> - e.printStackTrace(); >> - LOG.log(Level.WARNING, "Attempt to resolve attribute: [" + attr= Name >> - + "] failed: Message: " + e.getMessage()); >> - continue; >> - } >> - >> - while (attrValues.hasMoreElements()) { >> - String attrValue =3D (String) attrValues.nextElement(); >> - if (attrName.equals(ACTUAL_RANGE)) { >> - elem.setMinValue(attrValue); >> - if (attrValues.hasMoreElements()) { >> - elem.setMaxValue((String) attrValues.nextElement()); >> + =20 >> + if (!attr.isContainer()) { >> + Enumeration attrValues =3D null; >> + =20 >> + try { >> + attrValues =3D attr.getValues(); >> + } catch (NoSuchAttributeException e) { >> + e.printStackTrace(); >> + LOG.log(Level.WARNING, "Attempt to resolve attribute: [" + = attrName >> + + "] failed: Message: " + e.getMessage()); >> + continue; >> + } >> + =20 >> + while (attrValues.hasMoreElements()) { >> + String attrValue =3D (String) attrValues.nextElement(); >> + if (attrName.equals(ACTUAL_RANGE)) { >> + elem.setMinValue(attrValue); >> + if (attrValues.hasMoreElements()) { >> + elem.setMaxValue((String) attrValues.nextElement()); >> + } >> + } else if (attrName.equals(UNITS)) { >> + elem.setUnit(attrValue); >> + } else if (attrName.equals(START)) { >> + elem.setMinValue(attrValue); >> + } else if (attrName.equals(END)) { >> + elem.setMaxValue(attrValue); >> } >> - } else if (attrName.equals(UNITS)) { >> - elem.setUnit(attrValue); >> - } else if (attrName.equals(START)) { >> - elem.setMinValue(attrValue); >> - } else if (attrName.equals(END)) { >> - elem.setMaxValue(attrValue); >> } >> } >> - } >> + =20 >> + } // not a container attribute >> + =20 >> return elem; >> } >>=20 >>=20 >>=20 >=20 >=20 > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > Chris Mattmann, Ph.D. > Senior Computer Scientist > NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA > Office: 171-266B, Mailstop: 171-246 > Email: chris.a.mattmann@nasa.gov > WWW: http://sunset.usc.edu/~mattmann/ > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > Adjunct Assistant Professor, Computer Science Department > University of Southern California, Los Angeles, CA 90089 USA > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >=20