Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r2322 - in trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig: . queryGenerator

Subject: perfsonar development work

List archive

perfsonar: r2322 - in trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig: . queryGenerator


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r2322 - in trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig: . queryGenerator
  • Date: Wed, 11 Apr 2007 10:02:53 -0400

Author: roman
Date: 2007-04-11 10:02:53 -0400 (Wed, 11 Apr 2007)
New Revision: 2322

Modified:

trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java

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

cleaning




Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
2007-04-05 14:38:51 UTC (rev 2321)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
2007-04-11 14:02:53 UTC (rev 2322)
@@ -129,16 +129,28 @@


String eventType = "";
- if (metadata != null)
- eventType =
- (metadata.getEventType() != null ?
metadata.getEventType().getEventType().trim() : "");
- else
+ if (metadata != null) {
+
+ try {
+ eventType =
+ (metadata.getEventType() != null ?
metadata.getEventType().getEventType().trim() : "");
+ } catch (NullPointerException npex) {
+ throw new RequestException(
+ "error.ma.query",
+ "Transformations.getMetadataQuery: "
+ + "eventType in the request is null");
+ }
+
+ } else {
+
throw new RequestException(
"error.ma.query",
"Transformations.getMetadataQuery: "
- + "eventType in the request is null");
+ + "metadata is missing in the request");

+ }

+
// getting an appropriate MetadataQueryGenerator to
// genarate correct metadata query
MetadataQueryGenerator metadataQueryGenerator =

Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
2007-04-05 14:38:51 UTC (rev 2321)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
2007-04-11 14:02:53 UTC (rev 2322)
@@ -105,10 +105,10 @@
+ ex.toString());
}

- if (metadata != null) {

- eventType = (metadata.getEventType() != null ?
metadata.getEventType().getEventType().trim() : "");
- Subject subject = (Subject) metadata.getSubject();
+ eventType = metadata.getEventType().getEventType().trim();
+ Subject subject = (Subject) metadata.getSubject();
+ if (subject != null) {
Interface interf = subject.getInterface();
if (interf != null) {
ipAddress = (interf.getIpAddressElement() != null
? interf.getIpAddressElement().getIpAddress().trim() : "");
@@ -123,9 +123,9 @@
classOfService = (interf.getClassOfServiceElement() != null
? interf.getClassOfServiceElement().getClassOfService().trim() : "");
capacity = (interf.getCapacityElement() != null
? interf.getCapacityElement().getCapacity().trim() : "");
}
-
}

+
String xQuery = "\n"
+ "declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
\n"
+ "declare namespace
netutil='http://ggf.org/ns/nmwg/characteristic/utilization/2.0/';\n"



  • perfsonar: r2322 - in trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig: . queryGenerator, svnlog, 04/11/2007

Archive powered by MHonArc 2.6.16.

Top of Page