perfsonar-dev - r1422 - trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType
Subject: perfsonar development work
List archive
- From:
- To:
- Subject: r1422 - trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType
- Date: Thu, 13 Jul 2006 10:27:18 -0400
Author: loukik
Date: 2006-07-13 10:27:16 -0400 (Thu, 13 Jul 2006)
New Revision: 1422
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/NMSXPathExpressionGenerator.java
Log:
XMLUtils was previously returning only one Element when given an element
name, xml string and objects.config file. Now, it returns a Map. Hence, the
code using this method from XMLUtils needed to be changed.
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/NMSXPathExpressionGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/NMSXPathExpressionGenerator.java
2006-07-13 14:06:53 UTC (rev 1421)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/NMSXPathExpressionGenerator.java
2006-07-13 14:27:16 UTC (rev 1422)
@@ -5,6 +5,9 @@
*/
package org.perfsonar.service.measurementPoint.nmsType;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
import java.util.Vector;
import org.ggf.ns.nmwg.base.v2_0.Element;
@@ -215,7 +218,14 @@
+ "unable to read service.sax_parser.config property
properly");
}
- return XMLUtils.getElementFromXML(xmlPart, tagName, f);
+ Map map = XMLUtils.getElementFromXML(xmlPart, tagName, f);
+ if(map.isEmpty())
+ return null ;
+ else {
+ Iterator mapCollectionIterator = map.values().iterator();
+ return (Element) mapCollectionIterator.next();
+ }
+
}
- r1422 - trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType, svnlog, 07/13/2006
Archive powered by MHonArc 2.6.16.