perfsonar-dev - [pS-dev] [GEANT/SA2/ps-java-services] r5863 - trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/se rvice/measurementArchive/sqlType/nmwg
Subject: perfsonar development work
List archive
[pS-dev] [GEANT/SA2/ps-java-services] r5863 - trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/se rvice/measurementArchive/sqlType/nmwg
Chronological Thread
- From:
- To:
- Subject: [pS-dev] [GEANT/SA2/ps-java-services] r5863 - trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/se rvice/measurementArchive/sqlType/nmwg
- Date: Wed, 5 Oct 2011 18:35:42 +0100 (BST)
Author: psnc.pikusa
Date: 2011-10-05 18:35:42 +0100 (Wed, 05 Oct 2011)
New Revision: 5863
Modified:
trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/nmwg/OwampAggregationDatum.java
Log:
Datum rewrited
Modified:
trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/nmwg/OwampAggregationDatum.java
===================================================================
---
trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/nmwg/OwampAggregationDatum.java
2011-10-05 17:35:12 UTC (rev 5862)
+++
trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/nmwg/OwampAggregationDatum.java
2011-10-05 17:35:42 UTC (rev 5863)
@@ -18,8 +18,10 @@
import org.ggf.ns.nmwg.time.v2_0.Time;
import org.xml.sax.helpers.NamespaceSupport;
-public class OwampAggregationDatum extends org.ggf.ns.nmwg.base.v2_0.Datum {
+public class OwampAggregationDatum extends
org.ggf.ns.nmwg.tools.owamp.v2_0.Datum{
+ public static final String FILENAME =
"org/perfsonar/service/measurementArchive/sqlType/nmwg/OwampAggregationDatum.java";
+
/**
* attribute for Sender
*/
@@ -216,13 +218,17 @@
uri = "http://ggf.org/ns/nmwg/tools/owamp/2.0/";
qName = "owamp:datum";
prefix = "owamp";
- fileName = "org/ggf/ns/nmwg/tools/owamp/v2_0/Datum.java"; //
TODO change
+ fileName =
"org/perfsonar/service/measurementArchive/sqlType/nmwg/OwampAggregationDatum.java";
}
public boolean addAttr(String attr, String value, NamespaceSupport
nss) {
+
+
if (attr.equals("value")) {
- setValue(value);
- } else if (attr.equals("valueUnits")) {
+ setValue(value);
+ }
+ //OWAMP SUMMARY DATUM PARAMETERS
+ else if (attr.equals("valueUnits")) {
setValueUnits(value);
} else if (attr.equals("numBytes")) {
setNumBytes(value);
@@ -258,7 +264,33 @@
setJitterUnits(value);
} else if (attr.equals("hops")) {
setHops(value);
- } else if (attr.indexOf("xmlns") >= 0) {
+ }
+ //OWAMP DATUM PARAMETERS
+ else if(attr.equals("seqNum")) {
+ setSeqNum(value);
+ }
+ else if(attr.equals("sendTime")) {
+ setSendTime(value);
+ }
+ else if(attr.equals("sendSynchronized")) {
+ setSendSynchronized(value);
+ }
+ else if(attr.equals("sendTimeError")) {
+ setSendTimeError(value);
+ }
+ else if(attr.equals("receiveTime")) {
+ setReceiveTime(value);
+ }
+ else if(attr.equals("receiveSynchronized")) {
+ setReceiveSynchronized(value);
+ }
+ else if(attr.equals("receiveTimeError")) {
+ setReceiveTimeError(value);
+ }
+ else if(attr.equals("ttl")) {
+ setTTL(value);
+ }
+ else if (attr.indexOf("xmlns") >= 0) {
if (attr.split(":").length == 1) {
if (nss.getURI("") == null) {
nss.declarePrefix("", value);
@@ -329,6 +361,7 @@
public AttributesImpl getAttributes(NamespaceSupport nss) {
AttributesImpl atts = new AttributesImpl();
+ //SUMMARY DAT
if (!(getValue().equals(""))) {
atts.addAttribute(getUri(), "value", "value",
"CDATA", getValue());
}
@@ -406,6 +439,52 @@
atts.addAttribute(getUri(), "hops", "hops", "CDATA",
getHops());
}
+ //REGULAR DATUM
+ if(!(getValue().equals(""))) {
+ atts.addAttribute(getUri(), "value", "value",
"CDATA", getValue());
+ }
+ if(!(getValueUnits().equals(""))) {
+ atts.addAttribute(getUri(), "valueUnits",
"valueUnits", "CDATA", getValueUnits());
+ }
+ if(!(getNumBytes().equals(""))) {
+ atts.addAttribute(getUri(), "numBytes", "numBytes",
"CDATA", getNumBytes());
+ }
+ if(!(getNumBytesUnits().equals(""))) {
+ atts.addAttribute(getUri(), "numBytesUnits",
"numBytesUnits", "CDATA", getNumBytesUnits());
+ }
+ if(!(getTimeType().equals(""))) {
+ atts.addAttribute(getUri(), "timeType", "timeType",
"CDATA", getTimeType());
+ }
+ if(!(getTimeValue().equals(""))) {
+ atts.addAttribute(getUri(), "timeValue", "timeValue",
"CDATA", getTimeValue());
+ }
+ if(!(getSeqNum().equals(""))) {
+ atts.addAttribute(getUri(), "seqNum", "seqNum",
"CDATA", getSeqNum());
+ }
+ if(!(getSendTime().equals(""))) {
+ atts.addAttribute(getUri(), "sendTime", "sendTime",
"CDATA", getSendTime());
+ }
+ if(!(getSendSynchronized().equals(""))) {
+ atts.addAttribute(getUri(), "sendSynchronized",
"sendSynchronized", "CDATA", getSendSynchronized());
+ }
+ if(!(getSendTimeError().equals(""))) {
+ atts.addAttribute(getUri(), "sendTimeError",
"sendTimeError", "CDATA", getSendTimeError());
+ }
+ if(!(getReceiveTime().equals(""))) {
+ atts.addAttribute(getUri(), "receiveTime",
"receiveTime", "CDATA", getReceiveTime());
+ }
+ if(!(getReceiveSynchronized().equals(""))) {
+ atts.addAttribute(getUri(), "receiveSynchronized",
"receiveSynchronized", "CDATA", getReceiveSynchronized());
+ }
+ if(!(getReceiveTimeError().equals(""))) {
+ atts.addAttribute(getUri(), "receiveTimeError",
"receiveTimeError", "CDATA", getReceiveTimeError());
+ }
+ if(!(getTTL().equals(""))) {
+ atts.addAttribute(getUri(), "ttl", "ttl", "CDATA",
getTTL());
+ }
+
+
+
if (nss.getURI(getPrefix()) == null) {
nss.pushContext();
if (getPrefix().equals("")) {
@@ -507,6 +586,38 @@
if (getTime() != null) {
getTime().getDOM(datum);
}
+
+
+ //REGULAR DATUM
+ if(!(getSeqNum().equals(""))) {
+ datum.setAttribute("seqNum", getSeqNum());
+ }
+ if(!(getSendTime().equals(""))) {
+ datum.setAttribute("sendTime", getSendTime());
+ }
+ if(!(getSendSynchronized().equals(""))) {
+ datum.setAttribute("sendSynchronized",
getSendSynchronized());
+ }
+ if(!(getSendTimeError().equals(""))) {
+ datum.setAttribute("sendTimeError",
getSendTimeError());
+ }
+ if(!(getReceiveTime().equals(""))) {
+ datum.setAttribute("receiveTime", getReceiveTime());
+ }
+ if(!(getReceiveSynchronized().equals(""))) {
+ datum.setAttribute("receiveSynchronized",
getReceiveSynchronized());
+ }
+ if(!(getReceiveTimeError().equals(""))) {
+ datum.setAttribute("receiveTimeError",
getReceiveTimeError());
+ }
+ if(!(getTTL().equals(""))) {
+ datum.setAttribute("ttl", getTTL());
+ }
+
+ if(getTime() != null) {
+ getTime().getDOM(datum);
+ }
+
}
- [pS-dev] [GEANT/SA2/ps-java-services] r5863 - trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/se rvice/measurementArchive/sqlType/nmwg, svn-noreply, 10/05/2011
Archive powered by MHonArc 2.6.16.