Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r2231 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator

Subject: perfsonar development work

List archive

perfsonar: r2231 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r2231 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator
  • Date: Wed, 14 Mar 2007 07:12:20 -0400

Author: roman
Date: 2007-03-14 07:12:20 -0400 (Wed, 14 Mar 2007)
New Revision: 2231

Modified:

trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java

trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
Log:

XQuery statements updated (trim method is used to clear values used in the
statements).




Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
2007-03-13 15:46:14 UTC (rev 2230)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
2007-03-14 11:12:20 UTC (rev 2231)
@@ -150,7 +150,7 @@

String linkGlobalName = "";
try {
- linkGlobalName = link.getGlobalNameElement().getGlobalName();
+ linkGlobalName =
link.getGlobalNameElement().getGlobalName().trim();
} catch (Exception ex) {
;
}
@@ -225,10 +225,10 @@
String node1City = "";
String node1Institution = "";

- try { node1Name =
nodeArray[0].getNameElement().getName(); } catch (Exception ex)
{;}
- try { node1Country =
nodeArray[0].getCountryElement().getCountry(); } catch (Exception ex)
{;}
- try { node1City =
nodeArray[0].getCityElement().getCity(); } catch (Exception ex)
{;}
- try { node1Institution =
nodeArray[0].getInstitutionElement().getInstitution(); } catch (Exception ex)
{;}
+ try { node1Name =
nodeArray[0].getNameElement().getName().trim(); } catch
(Exception ex) {;}
+ try { node1Country =
nodeArray[0].getCountryElement().getCountry().trim(); } catch
(Exception ex) {;}
+ try { node1City =
nodeArray[0].getCityElement().getCity().trim(); } catch
(Exception ex) {;}
+ try { node1Institution =
nodeArray[0].getInstitutionElement().getInstitution().trim(); } catch
(Exception ex) {;}


String node2Name = "";
@@ -236,10 +236,10 @@
String node2City = "";
String node2Institution = "";

- try { node2Name =
nodeArray[1].getNameElement().getName(); } catch (Exception ex)
{;}
- try { node2Country =
nodeArray[1].getCountryElement().getCountry(); } catch (Exception ex)
{;}
- try { node2City =
nodeArray[1].getCityElement().getCity(); } catch (Exception ex)
{;}
- try { node2Institution =
nodeArray[1].getInstitutionElement().getInstitution(); } catch (Exception ex)
{;}
+ try { node2Name =
nodeArray[1].getNameElement().getName().trim(); } catch
(Exception ex) {;}
+ try { node2Country =
nodeArray[1].getCountryElement().getCountry().trim(); } catch
(Exception ex) {;}
+ try { node2City =
nodeArray[1].getCityElement().getCity().trim(); } catch
(Exception ex) {;}
+ try { node2Institution =
nodeArray[1].getInstitutionElement().getInstitution().trim(); } catch
(Exception ex) {;}



@@ -259,7 +259,7 @@
+ "
\n"
+ " let $node1_id :=
\n"
+ " if ($node1_metadata) then
\n"
- + "
fn:data($node1_metadata/nmwg:subject/nmwgtopo3:node/@id) \n"
+ + "
fn:data($node1_metadata/nmwg:subject/nmwgtopo3:node/@id) \n"
+ " else
\n"
+ " ''
\n";

@@ -332,10 +332,10 @@
String nodeCity = "";
String nodeInstitution = "";

- try { nodeName =
nodeArray[0].getNameElement().getName(); } catch (Exception ex)
{;}
- try { nodeCountry =
nodeArray[0].getCountryElement().getCountry(); } catch (Exception ex)
{;}
- try { nodeCity =
nodeArray[0].getCityElement().getCity(); } catch (Exception ex)
{;}
- try { nodeInstitution =
nodeArray[0].getInstitutionElement().getInstitution(); } catch (Exception ex)
{;}
+ try { nodeName =
nodeArray[0].getNameElement().getName().trim(); } catch
(Exception ex) {;}
+ try { nodeCountry =
nodeArray[0].getCountryElement().getCountry().trim(); } catch
(Exception ex) {;}
+ try { nodeCity =
nodeArray[0].getCityElement().getCity().trim(); } catch
(Exception ex) {;}
+ try { nodeInstitution =
nodeArray[0].getInstitutionElement().getInstitution().trim(); } catch
(Exception ex) {;}

String node = null;
if (nodeName == "" && nodeCountry == "" && nodeCity == "" &&
nodeInstitution == "")
@@ -353,7 +353,7 @@
+ "
\n"
+ " let $node_id :=
\n"
+ " if ($node_metadata) then
\n"
- + "
fn:data($node_metadata/nmwg:subject/nmwgtopo3:node/@id) \n"
+ + "
fn:data($node_metadata/nmwg:subject/nmwgtopo3:node/@id) \n"
+ " else
\n"
+ " ''
\n";
xQuery = "
\n "

Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
2007-03-13 15:46:14 UTC (rev 2230)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
2007-03-14 11:12:20 UTC (rev 2231)
@@ -153,7 +153,7 @@

String linkGlobalName = "";
try {
- linkGlobalName = link.getGlobalNameElement().getGlobalName();
+ linkGlobalName =
link.getGlobalNameElement().getGlobalName().trim();
} catch (Exception ex) {
;
}
@@ -228,10 +228,10 @@
String node1City = "";
String node1Institution = "";

- try { node1Name =
nodeArray[0].getNameElement().getName(); } catch (Exception ex)
{;}
- try { node1Country =
nodeArray[0].getCountryElement().getCountry(); } catch (Exception ex)
{;}
- try { node1City =
nodeArray[0].getCityElement().getCity(); } catch (Exception ex)
{;}
- try { node1Institution =
nodeArray[0].getInstitutionElement().getInstitution(); } catch (Exception ex)
{;}
+ try { node1Name =
nodeArray[0].getNameElement().getName().trim(); } catch
(Exception ex) {;}
+ try { node1Country =
nodeArray[0].getCountryElement().getCountry().trim(); } catch
(Exception ex) {;}
+ try { node1City =
nodeArray[0].getCityElement().getCity().trim(); } catch
(Exception ex) {;}
+ try { node1Institution =
nodeArray[0].getInstitutionElement().getInstitution().trim(); } catch
(Exception ex) {;}


String node2Name = "";
@@ -239,10 +239,10 @@
String node2City = "";
String node2Institution = "";

- try { node2Name =
nodeArray[1].getNameElement().getName(); } catch (Exception ex)
{;}
- try { node2Country =
nodeArray[1].getCountryElement().getCountry(); } catch (Exception ex)
{;}
- try { node2City =
nodeArray[1].getCityElement().getCity(); } catch (Exception ex)
{;}
- try { node2Institution =
nodeArray[1].getInstitutionElement().getInstitution(); } catch (Exception ex)
{;}
+ try { node2Name =
nodeArray[1].getNameElement().getName().trim(); } catch
(Exception ex) {;}
+ try { node2Country =
nodeArray[1].getCountryElement().getCountry().trim(); } catch
(Exception ex) {;}
+ try { node2City =
nodeArray[1].getCityElement().getCity().trim(); } catch
(Exception ex) {;}
+ try { node2Institution =
nodeArray[1].getInstitutionElement().getInstitution().trim(); } catch
(Exception ex) {;}



@@ -262,7 +262,7 @@
+ "
\n"
+ " let $node1_id :=
\n"
+ " if ($node1_metadata) then
\n"
- + "
fn:data($node1_metadata/nmwg:subject/nmwgtopo3:node/@id) \n"
+ + "
fn:data($node1_metadata/nmwg:subject/nmwgtopo3:node/@id) \n"
+ " else
\n"
+ " ''
\n";

@@ -335,10 +335,10 @@
String nodeCity = "";
String nodeInstitution = "";

- try { nodeName =
nodeArray[0].getNameElement().getName(); } catch (Exception ex)
{;}
- try { nodeCountry =
nodeArray[0].getCountryElement().getCountry(); } catch (Exception ex)
{;}
- try { nodeCity =
nodeArray[0].getCityElement().getCity(); } catch (Exception ex)
{;}
- try { nodeInstitution =
nodeArray[0].getInstitutionElement().getInstitution(); } catch (Exception ex)
{;}
+ try { nodeName =
nodeArray[0].getNameElement().getName().trim(); } catch
(Exception ex) {;}
+ try { nodeCountry =
nodeArray[0].getCountryElement().getCountry().trim(); } catch
(Exception ex) {;}
+ try { nodeCity =
nodeArray[0].getCityElement().getCity().trim(); } catch
(Exception ex) {;}
+ try { nodeInstitution =
nodeArray[0].getInstitutionElement().getInstitution().trim(); } catch
(Exception ex) {;}

String node = null;
if (nodeName == "" && nodeCountry == "" && nodeCity == "" &&
nodeInstitution == "")
@@ -356,7 +356,7 @@
+ "
\n"
+ " let $node_id :=
\n"
+ " if ($node_metadata) then
\n"
- + "
fn:data($node_metadata/nmwg:subject/nmwgtopo3:node/@id) \n"
+ + "
fn:data($node_metadata/nmwg:subject/nmwgtopo3:node/@id) \n"
+ " else
\n"
+ " ''
\n";
xQuery = "
\n "



  • perfsonar: r2231 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator, svnlog, 03/14/2007

Archive powered by MHonArc 2.6.16.

Top of Page