Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r2666 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator

Subject: perfsonar development work

List archive

perfsonar: r2666 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r2666 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator
  • Date: Thu, 16 Aug 2007 09:21:51 -0400

Author: roman
Date: 2007-08-16 09:21:49 -0400 (Thu, 16 Aug 2007)
New Revision: 2666

Modified:

branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java

branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
Log:


updated to support eventType element instead of parameter supportedEventType



Modified:
branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
===================================================================
---
branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
2007-08-16 12:52:13 UTC (rev 2665)
+++
branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
2007-08-16 13:21:49 UTC (rev 2666)
@@ -109,30 +109,29 @@
if (subject == null) {

xQuery =
- " let $nodeMetadata :=
\n"
- + " for $i in //nmwg:metadata
\n"
- + " where $i/nmwg:subject/nmwgtopo3:node
\n"
- + " return $i
\n"
- + "
\n"
- + " let $linkMetadata :=
\n"
- + " for $k in //nmwg:metadata
\n"
- + " where
$k/nmwg:parameters/nmwg:parameter[(functx:trim(text())='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status'
and functx:trim(@name)='supportedEventType') \n"
- + " or
(functx:trim(@value)='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status' and
functx:trim(@name)='supportedEventType')] \n"
- + " return $k
\n"
- + "
\n"
- + " let $metaids :=
\n"
- + " for $j in $linkMetadata
\n"
- + " return fn:data($j/@id)
\n"
- + "
\n"
- + " let $datas :=
\n"
- + " for $k in $metaids
\n"
- + " let $d :=
\n"
- + " for $l in //nmwg:data
\n"
- + " where fn:data($l/@metadataIdRef) = $k
\n"
- + " return $l
\n"
- + " return $d
\n"
- + "
\n"
- + " return ($nodeMetadata, $linkMetadata, $datas)
\n";
+ " let $nodeMetadata :=
\n"
+ + " for $i in //nmwg:metadata
\n"
+ + " where $i/nmwg:subject/nmwgtopo3:node
\n"
+ + " return $i
\n"
+ + "
\n"
+ + " let $linkMetadata :=
\n"
+ + " for $k in //nmwg:metadata
\n"
+ + " where
$k/nmwg:eventType[functx:trim(text())='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status']
\n"
+ + " return $k
\n"
+ + "
\n"
+ + " let $metaids :=
\n"
+ + " for $j in $linkMetadata
\n"
+ + " return fn:data($j/@id)
\n"
+ + "
\n"
+ + " let $datas :=
\n"
+ + " for $k in $metaids
\n"
+ + " let $d :=
\n"
+ + " for $l in //nmwg:data
\n"
+ + " where fn:data($l/@metadataIdRef) = $k
\n"
+ + " return $l
\n"
+ + " return $d
\n"
+ + "
\n"
+ + " return ($nodeMetadata, $linkMetadata, $datas)
\n";

xQuery = ns + xQuery;

@@ -166,8 +165,7 @@
+ " if ($globalName != '') then
\n"
+ " for $m in //nmwg:metadata
\n"
+ " where
functx:trim(fn:lower-case($m/nmwg:subject/nmtl2:link/nmtl2:globalName)) =
functx:trim(fn:lower-case($globalName)) \n"
- + " and
$m/nmwg:parameters/nmwg:parameter[(functx:trim(text())='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status'
and functx:trim(@name)='supportedEventType') \n"
- + " or
(functx:trim(@value)='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status' and
functx:trim(@name)='supportedEventType')] \n"
+ + " and
$m/nmwg:eventType[functx:trim(text())='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status']
\n"
+ " return $m
\n"
+ " else
\n"
+ " ''
\n"
@@ -295,8 +293,7 @@
+ " for $k in //nmwg:metadata
\n"
+ " where
fn:data($k/nmwg:subject/nmtl2:link/nmwgtopo3:node/@nodeIdRef) = $node1_id
\n"
+ " and
fn:data($k/nmwg:subject/nmtl2:link/nmwgtopo3:node/@nodeIdRef) = $node2_id
\n"
- + " and
$k/nmwg:parameters/nmwg:parameter[(functx:trim(text())='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status'
and functx:trim(@name)='supportedEventType') \n"
- + " or
(functx:trim(@value)='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status' and
functx:trim(@name)='supportedEventType')] \n"
+ + " and
$k/nmwg:eventType[functx:trim(text())='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status']
\n"
+ " return $k
\n"
+ " else
\n"
+ " ''
\n"
@@ -364,8 +361,7 @@
+ " if ($node_id != '') then
\n"
+ " for $k in //nmwg:metadata
\n"
+ " where
fn:data($k/nmwg:subject/nmtl2:link/nmwgtopo3:node/@nodeIdRef) = $node_id
\n"
- + " and
$k/nmwg:parameters/nmwg:parameter[(functx:trim(text())='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status'
and functx:trim(@name)='supportedEventType') \n"
- + " or
(functx:trim(@value)='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status' and
functx:trim(@name)='supportedEventType')] \n"
+ + " and
$k/nmwg:eventType[functx:trim(text())='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status']
\n"
+ " return $k
\n"
+ " else
\n"
+ " ''
\n"

Modified:
branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
===================================================================
---
branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
2007-08-16 12:52:13 UTC (rev 2665)
+++
branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
2007-08-16 13:21:49 UTC (rev 2666)
@@ -119,8 +119,7 @@
+ "
\n"
+ " let $linkMetadata :=
\n"
+ " for $k in //nmwg:metadata
\n"
- + " where
$k/nmwg:parameters/nmwg:parameter[(functx:trim(text())='Path.Status' and
functx:trim(@name)='supportedEventType') \n"
- + " or
(functx:trim(@value)='Path.Status' and
functx:trim(@name)='supportedEventType')] \n"
+ + " where
$k/nmwg:eventType[functx:trim(text())='Path.Status']
\n"
+ " return $k
\n"
+ "
\n"
+ " let $metaids :=
\n"
@@ -169,8 +168,7 @@
+ " if ($globalName != '') then
\n"
+ " for $m in //nmwg:metadata
\n"
+ " where
functx:trim(fn:lower-case($m/nmwg:subject/nmtl2:link/nmtl2:globalName)) =
functx:trim(fn:lower-case($globalName)) \n"
- + " and
$m/nmwg:parameters/nmwg:parameter[(functx:trim(text())='Path.Status' and
functx:trim(@name)='supportedEventType') \n"
- + " or
(functx:trim(@value)='Path.Status' and
functx:trim(@name)='supportedEventType')] \n"
+ + " and
$m/nmwg:eventType[functx:trim(text())='Path.Status'] \n"
+ " return $m
\n"
+ " else
\n"
+ " ''
\n"
@@ -298,8 +296,7 @@
+ " for $k in //nmwg:metadata
\n"
+ " where
fn:data($k/nmwg:subject/nmtl2:link/nmwgtopo3:node/@nodeIdRef) = $node1_id
\n"
+ " and
fn:data($k/nmwg:subject/nmtl2:link/nmwgtopo3:node/@nodeIdRef) = $node2_id
\n"
- + " and
$k/nmwg:parameters/nmwg:parameter[(functx:trim(text())='Path.Status' and
functx:trim(@name)='supportedEventType') \n"
- + " or
(functx:trim(@value)='Path.Status' and
functx:trim(@name)='supportedEventType')] \n"
+ + " and
$k/nmwg:eventType[functx:trim(text())='Path.Status']
\n"
+ " return $k
\n"
+ " else
\n"
+ " ''
\n"
@@ -367,8 +364,7 @@
+ " if ($node_id != '') then
\n"
+ " for $k in //nmwg:metadata
\n"
+ " where
fn:data($k/nmwg:subject/nmtl2:link/nmwgtopo3:node/@nodeIdRef) = $node_id
\n"
- + " and
$k/nmwg:parameters/nmwg:parameter[(functx:trim(text())='Path.Status' and
functx:trim(@name)='supportedEventType') \n"
- + " or
(functx:trim(@value)='Path.Status' and
functx:trim(@name)='supportedEventType')] \n"
+ + " and
$k/nmwg:eventType[functx:trim(text())='Path.Status']
\n"
+ " return $k
\n"
+ " else
\n"
+ " ''
\n"



  • perfsonar: r2666 - branches/new-structure/trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator, svnlog, 08/16/2007

Archive powered by MHonArc 2.6.16.

Top of Page