perfsonar-dev - r1465 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/storageManager
Subject: perfsonar development work
List archive
r1465 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/storageManager
Chronological Thread
- From:
- To:
- Subject: r1465 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/storageManager
- Date: Wed, 19 Jul 2006 10:45:18 -0400
Author: roman
Date: 2006-07-19 10:45:17 -0400 (Wed, 19 Jul 2006)
New Revision: 1465
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/storageManager/SimpleMetadataConfigurationStorageManager.java
Log:
small change
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/storageManager/SimpleMetadataConfigurationStorageManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/storageManager/SimpleMetadataConfigurationStorageManager.java
2006-07-19 14:02:30 UTC (rev 1464)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/storageManager/SimpleMetadataConfigurationStorageManager.java
2006-07-19 14:45:17 UTC (rev 1465)
@@ -43,6 +43,8 @@
import java.io.FileInputStream;
import java.io.OutputStream;
import java.io.IOException;
+import java.util.Map;
+import java.util.Collection;
import javax.xml.XMLConstants;
import javax.xml.namespace.NamespaceContext;
@@ -179,7 +181,7 @@
serializer.transform(
new DOMSource(n), new StreamResult(new
OutputStreamWriter(sbos)));
- String output = "<nmwg:message
xmlns=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/\" "
+ String output = "<nmwg:message
xmlns=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/\" "
+
"xmlns:perfsonar=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/\" "
+
"xmlns:nmwg=\"http://ggf.org/ns/nmwg/base/2.0/\" "
+
"xmlns:nmwgt=\"http://ggf.org/ns/nmwg/topology/2.0/\" "
@@ -190,12 +192,23 @@
+ outputBuffer.toString()
+ "\n</nmwg:message>";
- Metadata metadata = (Metadata)
transformations.transformResults(output, "metadata");
- message.addChild(metadata);
+ Map metadatas =
+ transformations.transformResults(output, "metadata");
- Data data = getData(metadata.getId());
- if (data != null) message.addChild(data);
+
logger.debug("SimpleMetadataConfigurationStorageManager.fetch: "
+ + "number of metadata elements fetched from "
+ + "the metadata configuration: " +
metadatas.size());
+ Collection<Metadata> collection = metadatas.values();
+ for (Metadata md : collection) {
+
+ message.addChild(md);
+ Data data = getData(md.getId());
+ if (data == null) continue;
+ message.addChild(data);
+
+ }
+
}
outputBuffer = null;
@@ -331,7 +344,7 @@
serializer.transform(
new DOMSource(n), new StreamResult(new
OutputStreamWriter(sbos)));
- String output = "<nmwg:message
xmlns=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/\" "
+ String output = "<nmwg:message
xmlns=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/\" "
+
"xmlns:perfsonar=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/\" "
+
"xmlns:nmwg=\"http://ggf.org/ns/nmwg/base/2.0/\" "
+
"xmlns:nmwgt=\"http://ggf.org/ns/nmwg/topology/2.0/\" "
@@ -342,8 +355,21 @@
+ outputBuffer.toString()
+ "\n</nmwg:message>";
- Data data = (Data)
transformations.transformResults(output, "data");
+ Data data = null;
+ Map datas = transformations.transformResults(output,
"data");
+
+
logger.debug("SimpleMetadataConfigurationStorageManager.getData: "
+ + "number of data elements fetched
from "
+ + "the metadata configuration: " +
datas.size());
+
+ Collection<Data> collection = datas.values();
+ for (Data d : collection) {
+ data = d;
+ break;
+ }
+
+
outputBuffer = null;
sbos.close();
sbos = null;
- r1465 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/storageManager, svnlog, 07/19/2006
Archive powered by MHonArc 2.6.16.