perfsonar-dev - perfsonar: r4472 - in branches/WebAdmin/perfSONARWebAdmin: admin/stitching auxiliary/stitching
Subject: perfsonar development work
List archive
perfsonar: r4472 - in branches/WebAdmin/perfSONARWebAdmin: admin/stitching auxiliary/stitching
Chronological Thread
- From:
- To:
- Subject: perfsonar: r4472 - in branches/WebAdmin/perfSONARWebAdmin: admin/stitching auxiliary/stitching
- Date: Tue, 9 Sep 2008 15:59:24 -0400
Author: pgerakios
Date: 2008-09-09 15:59:24 -0400 (Tue, 09 Sep 2008)
New Revision: 4472
Modified:
branches/WebAdmin/perfSONARWebAdmin/admin/stitching/StitchingServlet.java
branches/WebAdmin/perfSONARWebAdmin/auxiliary/stitching/MetadataManagerImpl.java
Log:
Modified:
branches/WebAdmin/perfSONARWebAdmin/admin/stitching/StitchingServlet.java
===================================================================
--- branches/WebAdmin/perfSONARWebAdmin/admin/stitching/StitchingServlet.java
2008-09-09 17:01:07 UTC (rev 4471)
+++ branches/WebAdmin/perfSONARWebAdmin/admin/stitching/StitchingServlet.java
2008-09-09 19:59:24 UTC (rev 4472)
@@ -249,7 +249,6 @@
FileItem item = (FileItem) it.next();
if (!item.isFormField()) {
if (!item.getName().equals("")) {
-
item.write(new
File(servicePath
+
"/WEB-INF/classes/perfsonar/conf/"
+
item.getName().trim()));
@@ -597,7 +596,7 @@
}
newFile = new
File(servicePath
+ "/WEB-INF/classes/perfsonar/conf/"
-
+ fileName + ".xml"); //FIXME
+
+ fileName + ".xml");
PerfsonarProperties properties = new PerfsonarPropertiesImpl();
properties.loadProperties(new FileInputStream(
new File(servicePath
@@ -881,6 +880,7 @@
System.out.println("STITCHING SERVLET : Warning:
hosts == null. Displaying empty page");
else
System.out.println("STITCHING SERVLET : Warning:
hosts.empty() == true . Displaying empty page");
+ //new Throwable().printStackTrace();
output.main_page(filename.substring(filename.lastIndexOf("/") + 1),
null, null, null, null, null,
message);
}
Modified:
branches/WebAdmin/perfSONARWebAdmin/auxiliary/stitching/MetadataManagerImpl.java
===================================================================
---
branches/WebAdmin/perfSONARWebAdmin/auxiliary/stitching/MetadataManagerImpl.java
2008-09-09 17:01:07 UTC (rev 4471)
+++
branches/WebAdmin/perfSONARWebAdmin/auxiliary/stitching/MetadataManagerImpl.java
2008-09-09 19:59:24 UTC (rev 4472)
@@ -105,6 +105,7 @@
"Error!!! Not able to connect to
eXist database. ");
}
+
//
-----------------------------------------------------------------------
// public methods
@@ -116,14 +117,21 @@
*/
public List getHostnames() throws Exception {
List<String> hostList = new LinkedList<String>();
+ String strExp = "for $meta in doc(\""
+ + Document
+ +
"\")/nmwg:store//nmwg:metadata return data($meta//nmwgt:hostName)";
CompiledExpression expr = service
- .compile("for $meta in doc(\""
- + Document
- +
"\")/nmwg:store//nmwg:metadata return data($meta//nmwgt:hostName)");
+ .compile(strExp);
+ //boolean b = new File(Document).exists();
+ //System.out.println("MetadataManagerImpl : getHostNames : "
+ strExp + "\n Exists ? " + b );
+
ResourceSet set = service.execute(expr);
ResourceIterator it = set.getIterator();
+ //System.out.println("Has more resources :" +
it.hasMoreResources());
while (it.hasMoreResources()) {
Resource r = it.nextResource();
+ //System.out.println("Resource :" +
((String)r.getContent()).trim() );
+
if (!hostList.contains(((String)
r.getContent()).trim())) {
hostList.add(((String) r.getContent()));
}
@@ -500,11 +508,12 @@
* @see
perfSONARWebAdmin.auxiliary.stitching.MetadataManager#addConfigFile(java.io.File)
*/
public void addConfigFile(File file) throws Exception {
+ //System.out.println("MetadataManagerImpl : addConfigFile : "
+ file );
XMLResource document = (XMLResource)
collection.createResource(file
.getName(), "XMLResource");
document.setContent(file);
collection.storeResource(document);
-
+ Document = file.getName() ;
}
/*
@@ -514,6 +523,7 @@
*/
public void removeConfigFile(String file) throws Exception {
try {
+ //System.out.println("MetadataManagerImpl :
removeConfigFile : " + file );
collection.removeResource(collection.getResource(file));
} catch (Exception e) {
throw new Exception(file + " " + getFault(e));
- perfsonar: r4472 - in branches/WebAdmin/perfSONARWebAdmin: admin/stitching auxiliary/stitching, svnlog, 09/09/2008
Archive powered by MHonArc 2.6.16.