Skip to Content.
Sympa Menu

perfsonar-dev - r1957 - trunk/functional-testing/sqlma/l2/MetadataKeyRequest

Subject: perfsonar development work

List archive

r1957 - trunk/functional-testing/sqlma/l2/MetadataKeyRequest


Chronological Thread 
  • From:
  • To:
  • Subject: r1957 - trunk/functional-testing/sqlma/l2/MetadataKeyRequest
  • Date: Wed, 24 Jan 2007 03:31:33 -0500

Author: michalis
Date: 2007-01-24 03:31:32 -0500 (Wed, 24 Jan 2007)
New Revision: 1957

Modified:

trunk/functional-testing/sqlma/l2/MetadataKeyRequest/KeyRetrievalResponseParser.java
Log:
A slight change

Modified:
trunk/functional-testing/sqlma/l2/MetadataKeyRequest/KeyRetrievalResponseParser.java
===================================================================
---
trunk/functional-testing/sqlma/l2/MetadataKeyRequest/KeyRetrievalResponseParser.java
2007-01-24 08:11:16 UTC (rev 1956)
+++
trunk/functional-testing/sqlma/l2/MetadataKeyRequest/KeyRetrievalResponseParser.java
2007-01-24 08:31:32 UTC (rev 1957)
@@ -1854,78 +1854,114 @@
return false;
}
// A case where the type attribute of the
global name element
- // has no value. An error response is
expected.
+ // has no value. A valid response is expected.
case 13:
- metadata =
response.getRootElement().getChild("metadata", nmwg);
- if
(metadata.getAttribute("id").getValue().equals(
- "resultCodeMetadata")) {
- Element eventType =
metadata.getChild("eventType", nmwg);
- if (eventType != null) {
- if
(eventType.getText().equals(
-
"warning.common.no_metadata")) {
- return true;
+ nodeList.clear();
+ linkList.clear();
+ nodeList.add(this.node_dfn_mue);
+ nodeList.add(this.node_psnc_pl);
+ linkList.add(this.link_psnc_dfn_mue_003);
+ if
(this.nodeChecker(this.retrieveNodes(response), nodeList)) {
+ if
(this.linkChecker(this.retrieveLinkes(response),
+ linkList)) {
+
+ Element data =
response.getRootElement().getChild(
+ "data", nmwg);
+ if (this.checkKey(data,
"md-link-PSNC-DFN-MUE-003",
+
"PSNC-DFN-MUE-Link-1001", ibatisConfig_Domain)) {
+ if
(this.checkTimeNow(data, "time", "now")) {
+ return true;
+ } else {
+
parserLogWriter
+
.write("Time parameter not set to now...");
+ return false;
+ }
} else {
-
parserLogWriter.write("Wrong result code...");
+ parserLogWriter
+
.write("Key contains wrong information...");
return false;
}
} else {
parserLogWriter
-
.write("EventType element not present...");
+ .write("Link
information is not correct...");
return false;
}
} else {
- parserLogWriter
- .write("Metadata id
not equeal to 'resultCodeMetadata'...");
+ parserLogWriter.write("Node
information is not correct...");
return false;
}
// A case where the type attribute of the
global name element
- // has an invalid value. An error respone is
expected.
+ // has an invalid value. A valid respone is
expected.
case 14:
- metadata =
response.getRootElement().getChild("metadata", nmwg);
- if
(metadata.getAttribute("id").getValue().equals(
- "resultCodeMetadata")) {
- Element eventType =
metadata.getChild("eventType", nmwg);
- if (eventType != null) {
- if
(eventType.getText().equals(
-
"warning.common.no_metadata")) {
- return true;
+ nodeList.clear();
+ linkList.clear();
+ nodeList.add(this.node_dfn_mue);
+ nodeList.add(this.node_psnc_pl);
+ linkList.add(this.link_psnc_dfn_mue_003);
+ if
(this.nodeChecker(this.retrieveNodes(response), nodeList)) {
+ if
(this.linkChecker(this.retrieveLinkes(response),
+ linkList)) {
+
+ Element data =
response.getRootElement().getChild(
+ "data", nmwg);
+ if (this.checkKey(data,
"md-link-PSNC-DFN-MUE-003",
+
"PSNC-DFN-MUE-Link-1001", ibatisConfig_Domain)) {
+ if
(this.checkTimeNow(data, "time", "now")) {
+ return true;
+ } else {
+
parserLogWriter
+
.write("Time parameter not set to now...");
+ return false;
+ }
} else {
-
parserLogWriter.write("Wrong result code...");
+ parserLogWriter
+
.write("Key contains wrong information...");
return false;
}
} else {
parserLogWriter
-
.write("EventType element not present...");
+ .write("Link
information is not correct...");
return false;
}
} else {
- parserLogWriter
- .write("Metadata id
not equeal to 'resultCodeMetadata'...");
+ parserLogWriter.write("Node
information is not correct...");
return false;
}
// A response where the type attribute of the
global name value
- // doesn't exist. An error response is
expected
+ // doesn't exist. A valid response is expected
case 15:
- metadata =
response.getRootElement().getChild("metadata", nmwg);
- if
(metadata.getAttribute("id").getValue().equals(
- "resultCodeMetadata")) {
- Element eventType =
metadata.getChild("eventType", nmwg);
- if (eventType != null) {
- if
(eventType.getText().equals(
-
"warning.common.no_metadata")) {
- return true;
+ nodeList.clear();
+ linkList.clear();
+ nodeList.add(this.node_dfn_mue);
+ nodeList.add(this.node_psnc_pl);
+ linkList.add(this.link_psnc_dfn_mue_003);
+ if
(this.nodeChecker(this.retrieveNodes(response), nodeList)) {
+ if
(this.linkChecker(this.retrieveLinkes(response),
+ linkList)) {
+
+ Element data =
response.getRootElement().getChild(
+ "data", nmwg);
+ if (this.checkKey(data,
"md-link-PSNC-DFN-MUE-003",
+
"PSNC-DFN-MUE-Link-1001", ibatisConfig_Domain)) {
+ if
(this.checkTimeNow(data, "time", "now")) {
+ return true;
+ } else {
+
parserLogWriter
+
.write("Time parameter not set to now...");
+ return false;
+ }
} else {
-
parserLogWriter.write("Wrong result code...");
+ parserLogWriter
+
.write("Key contains wrong information...");
return false;
}
} else {
parserLogWriter
-
.write("EventType element not present...");
+ .write("Link
information is not correct...");
return false;
}
} else {
- parserLogWriter
- .write("Metadata id
not equeal to 'resultCodeMetadata'...");
+ parserLogWriter.write("Node
information is not correct...");
return false;
}
// A case where the global name element has
no value. An error
@@ -3500,7 +3536,7 @@
if (this.checkKey(data,
"md-link-PSNC-DFN-MUE-003",

"PSNC-DFN-MUE-Link-1001", ibatisConfig_Domain)) {

- List paramlist =
data.getChild("key", nmwg)
+ List paramlist =
data.getChild("key", nmwg)

.getChild("parameters", nmwg).getChildren(

"parameter", nmwg);
Iterator it =
paramlist.iterator();
@@ -3566,7 +3602,7 @@
if (this.checkKey(data,
"md-link-PSNC-DFN-MUE-003",

"PSNC-DFN-MUE-Link-1001", ibatisConfig_Domain)) {

- List paramlist =
data.getChild("key", nmwg)
+ List paramlist =
data.getChild("key", nmwg)

.getChild("parameters", nmwg).getChildren(

"parameter", nmwg);
Iterator it =
paramlist.iterator();



  • r1957 - trunk/functional-testing/sqlma/l2/MetadataKeyRequest, svnlog, 01/24/2007

Archive powered by MHonArc 2.6.16.

Top of Page