Skip to Content.
Sympa Menu

perfsonar-dev - [pS-dev] [GEANT/SA2/ps-java-services] r5852 - in trunk/perfsonar-java-sql-ma: conf src/main/java/org/perfsonar/service/measurementArchive/sqlType src/main/java/org/perfsonar/service/measurementArchive/sqlType/nmwg

Subject: perfsonar development work

List archive

[pS-dev] [GEANT/SA2/ps-java-services] r5852 - in trunk/perfsonar-java-sql-ma: conf src/main/java/org/perfsonar/service/measurementArchive/sqlType src/main/java/org/perfsonar/service/measurementArchive/sqlType/nmwg


Chronological Thread 
  • From:
  • To:
  • Subject: [pS-dev] [GEANT/SA2/ps-java-services] r5852 - in trunk/perfsonar-java-sql-ma: conf src/main/java/org/perfsonar/service/measurementArchive/sqlType src/main/java/org/perfsonar/service/measurementArchive/sqlType/nmwg
  • Date: Tue, 4 Oct 2011 22:49:54 +0100 (BST)

Author: psnc.pikusa
Date: 2011-10-04 22:49:54 +0100 (Tue, 04 Oct 2011)
New Revision: 5852

Added:

trunk/perfsonar-java-sql-ma/conf/ibatis-SqlMapConfig-owamp-aggregation.template.xml
trunk/perfsonar-java-sql-ma/conf/ibatis-SqlMapConfig-owamp-aggregation.xml
trunk/perfsonar-java-sql-ma/conf/ibatis-owamp-aggregation.xml

trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/nmwg/

trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/nmwg/OwampAggregationDatum.java
Modified:
trunk/perfsonar-java-sql-ma/conf/mysql-sqlma-dbupdate-owamp.sql
Log:
All the changes are provided due to OWAMP MP requirements, especially
setupDataRequest which get aggregated data from sql db

Added:
trunk/perfsonar-java-sql-ma/conf/ibatis-SqlMapConfig-owamp-aggregation.template.xml
===================================================================
---
trunk/perfsonar-java-sql-ma/conf/ibatis-SqlMapConfig-owamp-aggregation.template.xml
(rev 0)
+++
trunk/perfsonar-java-sql-ma/conf/ibatis-SqlMapConfig-owamp-aggregation.template.xml
2011-10-04 21:49:54 UTC (rev 5852)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE sqlMapConfig
+ PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
+ "http://www.ibatis.com/dtd/sql-map-config-2.dtd";>
+
+
+<sqlMapConfig>
+
+ <settings useStatementNamespaces="false" />
+
+ <transactionManager type="JDBC">
+ <dataSource type="SIMPLE" >
+ <property name="JDBC.Driver" value="_DRIVER_"/>
+ <property name="JDBC.ConnectionURL" value="_URL_"/>
+ <property name="JDBC.Username" value="_USERNAME_"/>
+ <property name="JDBC.Password" value="_PASSWORD_"/>
+ </dataSource>
+ </transactionManager>
+
+ <sqlMap resource="ibatis-owamp-aggregation.xml"/>
+
+</sqlMapConfig>

Added:
trunk/perfsonar-java-sql-ma/conf/ibatis-SqlMapConfig-owamp-aggregation.xml
===================================================================
---
trunk/perfsonar-java-sql-ma/conf/ibatis-SqlMapConfig-owamp-aggregation.xml
(rev 0)
+++
trunk/perfsonar-java-sql-ma/conf/ibatis-SqlMapConfig-owamp-aggregation.xml
2011-10-04 21:49:54 UTC (rev 5852)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE sqlMapConfig
+ PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
+ "http://www.ibatis.com/dtd/sql-map-config-2.dtd";>
+
+
+<sqlMapConfig>
+
+ <settings useStatementNamespaces="false" />
+
+ <transactionManager type="JDBC">
+ <dataSource type="SIMPLE" >
+ <property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/>
+ <property name="JDBC.ConnectionURL"
value="jdbc:mysql://127.0.0.1/perfsonar_ma"/>
+ <property name="JDBC.Username" value="perfsonar_ma"/>
+ <property name="JDBC.Password" value="testpass"/>
+ </dataSource>
+ </transactionManager>
+
+ <sqlMap resource="ibatis-owamp-aggregation.xml"/>
+
+</sqlMapConfig>

Added: trunk/perfsonar-java-sql-ma/conf/ibatis-owamp-aggregation.xml
===================================================================
--- trunk/perfsonar-java-sql-ma/conf/ibatis-owamp-aggregation.xml
(rev 0)
+++ trunk/perfsonar-java-sql-ma/conf/ibatis-owamp-aggregation.xml
2011-10-04 21:49:54 UTC (rev 5852)
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sqlMap
+ PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
+ "http://www.ibatis.com/dtd/sql-map-2.dtd";>
+
+
+<sqlMap namespace="Results">
+
+ <!-- fetching -->
+
+ <resultMap id="select-results" class="java.util.HashMap">
+ <result property="sender" column="sender" />
+ <result property="receiver" column="receiver" />
+ <result property="sent" column="sent" />
+ <result property="loss" column="loss" />
+ <result property="lostPercent" column="lostPercent" />
+ <result property="duplicates" column="duplicates" />
+ <result property="minDelay" column="minDelay" />
+ <result property="medDelay" column="medDelay" />
+ <result property="maxDelay" column="maxDelay" />
+ <result property="delayUnits" column="delayUnits" />
+ <result property="error" column="error" />
+ <result property="errorUnits" column="errorUnits" />
+ <result property="jitter" column="jitter" />
+ <result property="jitterUnits" column="jitterUnits" />
+ <result property="hops" column="hops" />
+ </resultMap>
+
+
+ <parameterMap id="select-parameters1" class="java.util.HashMap">
+ <parameter property="metadataId" />
+ <parameter property="startTime" />
+ <parameter property="endTime" />
+ </parameterMap>
+
+
+ <parameterMap id="select-parameters2" class="java.util.HashMap">
+ <parameter property="metadataId" />
+ </parameterMap>
+
+ <select id="getResults1" parameterMap="select-parameters1"
+ resultMap="select-results">
+ <![CDATA[
+ select sender, receiver, sent, loss, lostPercent, duplicates,
minDelay, medDelay, maxDelay, delayUnits, error, errorUnits, jitter,
jitterUnits, hops
+ from owamp_agg
+ where metadataId = ?
+ and ts >= ?
+ and ts <= ?
+ order by ts ASC

+ ]]>
+ </select>
+
+ <select id="getResults2" parameterMap="select-parameters2"
+ resultMap="select-results">
+ <![CDATA[
+ select sender, receiver, sent, loss, lostPercent, duplicates,
minDelay, medDelay, maxDelay, delayUnits, error, errorUnits, jitter,
jitterUnits, hops
+ from owamp
+ where metadataId = ?
+ ]]>
+ </select>
+
+
+ <!-- storing -->
+
+ <parameterMap id="insert-parameters" class="java.util.HashMap">
+ <parameter property="metadataId" />
+ <parameter property="sender" />
+ <parameter property="receiver" />
+ <parameter property="sent" />
+ <parameter property="loss" />
+ <parameter property="lostPercent" />
+ <parameter property="duplicates" />
+ <parameter property="minDelay" />
+ <parameter property="medDelay" />
+ <parameter property="maxDelay " />
+ <parameter property="delayUnits" />
+ <parameter property="error" />
+ <parameter property="errorUnits" />
+ <parameter property="jitter" />
+ <parameter property="jitterUnits" />
+ <parameter property="hops" />
+ </parameterMap>
+
+ <insert id="setResults" parameterMap="insert-parameters">
+ <![CDATA[
+ insert into owamp (metadataId, sender, receiver, sent, loss,
lostPercent, duplicates, minDelay, medDelay, maxDelay, delayUnits, error,
errorUnits, jitter, jitterUnits, hops, ts)
+ values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, default)
+ ]]>
+ </insert>
+
+</sqlMap>

Modified: trunk/perfsonar-java-sql-ma/conf/mysql-sqlma-dbupdate-owamp.sql
===================================================================
--- trunk/perfsonar-java-sql-ma/conf/mysql-sqlma-dbupdate-owamp.sql
2011-10-04 19:46:09 UTC (rev 5851)
+++ trunk/perfsonar-java-sql-ma/conf/mysql-sqlma-dbupdate-owamp.sql
2011-10-04 21:49:54 UTC (rev 5852)
@@ -14,22 +14,40 @@
CREATE TABLE
owamp
(metadataId VARCHAR(255) NOT NULL,
- receiveSynchronized INT(1) NULL DEFAULT 0,
+ receiveSynchronized INT(1) NULL ,
receiveTime VARCHAR(21) NOT NULL,
- receiveTimeError FLOAT NULL DEFAULT 0,
- sendSynchronized INT(1) NULL DEFAULT 0,
+ receiveTimeError FLOAT NULL ,
+ sendSynchronized INT(1) NULL ,
sendTime VARCHAR(21) NOT NULL,
- sendTimeError FLOAT NULL DEFAULT 0,
- seqNum INTEGER NULL DEFAULT 0,
- ttl SMALLINT NULL DEFAULT 0,
+ sendTimeError FLOAT NULL ,
+ seqNum INTEGER NULL ,
+ ttl SMALLINT NULL,
ts TIMESTAMP DEFAULT NOW());
-
-

INSERT
INTO owamp
VALUES ('owamp-meta1', 1, '15080301494633990766', 1.00583e-06, 1,
15080301494378967368, 4.91142e-05, 0, 243 ,default);
-
- INSERT
+INSERT
INTO owamp
VALUES ('owamp-meta1', 1, '15080301494633990766', 1.00483e-06, 1,
15080301494378967368, 4.81142e-05, 1, 243 ,default);
+
+ CREATE TABLE
+ owamp_aggr
+ (metadataId VARCHAR(255) NOT NULL,
+ sender VARCHAR(255) NOT NULL,
+ receiver VARCHAR(255) NOT NULL,
+ sent INT NULL,
+ loss INT NULL,
+ lostPercent FLOAT NULL,
+ duplicates INT NULL,
+ minDelay FLOAT NULL,
+ medDelay FLOAT NULL,
+ maxDelay FLOAT NULL,
+ delayUnits VARCHAR(10) NULL,
+ error FLOAT NULL,
+ errorUnits VARCHAR (10) NULL,
+ jitter FLOAT NULL,
+ jitterUnits VARCHAR(10) NULL,
+ hops INT NULL,
+ ts TIMESTAMP DEFAULT NOW());
+
\ No newline at end of file

Added:
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
(rev 0)
+++
trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/nmwg/OwampAggregationDatum.java
2011-10-04 21:49:54 UTC (rev 5852)
@@ -0,0 +1,526 @@
+package org.perfsonar.service.measurementArchive.sqlType.nmwg;
+
+/**
+ * This describes the datum format of a ping measurement.
+ *
+ * @author Piotr Pikusa
+ * @version $Id$
+ * @see org.ggf.ns.nmwg.base.v2_0.Element
+ * @see org.ggf.ns.nmwg.base.v2_0.Datum
+ * @see org.ggf.ns.nmwg.time.v2_0.Time
+ * @see org.w3c.dom.Document
+ * @see org.w3c.dom.Element
+ */
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.helpers.AttributesImpl;
+import org.ggf.ns.nmwg.base.v2_0.Element;
+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 {
+
+ /**
+ * attribute for Sender
+ */
+ protected String sender;
+
+ /**
+ * attribute for receiver
+ */
+ protected String receiver;
+
+ /**
+ * attribute for sent
+ */
+ protected String sent;
+
+ /**
+ * attribute for loss
+ */
+ protected String loss;
+
+ /**
+ * attribute for RECVTIME (Receive timestamp)
+ */
+ protected String duplicates;
+
+ /**
+ * attribute for Lost in percrent
+ */
+ protected String lostPercent;
+
+ /**
+ * attribute for minimum dealy
+ */
+ protected String minDelay;
+
+ /**
+ * attribute for medium delay
+ */
+ protected String medDelay;
+
+ protected String maxDelay;
+
+ protected String delayUnits;
+
+ protected String error;
+
+ protected String errorUnits;
+
+ protected String jitter;
+
+ protected String jitterUnits;
+
+ protected String hops;
+
+ public String getSender() {
+ return sender;
+ }
+
+ public void setSender(String sender) {
+ this.sender = sender;
+ }
+
+ public String getReceiver() {
+ return receiver;
+ }
+
+ public void setReceiver(String receiver) {
+ this.receiver = receiver;
+ }
+
+ public String getSent() {
+ return sent;
+ }
+
+ public void setSent(String sent) {
+ this.sent = sent;
+ }
+
+ public String getLoss() {
+ return loss;
+ }
+
+ public void setLoss(String loss) {
+ this.loss = loss;
+ }
+
+ public String getDuplicates() {
+ return duplicates;
+ }
+
+ public void setDuplicates(String duplicates) {
+ this.duplicates = duplicates;
+ }
+
+ public String getLostPercent() {
+ return lostPercent;
+ }
+
+ public void setLostPercent(String lostPercent) {
+ this.lostPercent = lostPercent;
+ }
+
+ public String getMinDelay() {
+ return minDelay;
+ }
+
+ public void setMinDelay(String minDelay) {
+ this.minDelay = minDelay;
+ }
+
+ public String getMedDelay() {
+ return medDelay;
+ }
+
+ public void setMedDelay(String medDelay) {
+ this.medDelay = medDelay;
+ }
+
+ public String getMaxDelay() {
+ return maxDelay;
+ }
+
+ public void setMaxDelay(String maxDelay) {
+ this.maxDelay = maxDelay;
+ }
+
+ public String getDelayUnits() {
+ return delayUnits;
+ }
+
+ public void setDelayUnits(String delayUnits) {
+ this.delayUnits = delayUnits;
+ }
+
+ public String getError() {
+ return error;
+ }
+
+ public void setError(String error) {
+ this.error = error;
+ }
+
+ public String getErrorUnits() {
+ return errorUnits;
+ }
+
+ public void setErrorUnits(String errorUnits) {
+ this.errorUnits = errorUnits;
+ }
+
+ public String getJitter() {
+ return jitter;
+ }
+
+ public void setJitter(String jitter) {
+ this.jitter = jitter;
+ }
+
+ public String getJitterUnits() {
+ return jitterUnits;
+ }
+
+ public void setJitterUnits(String jitterUnits) {
+ this.jitterUnits = jitterUnits;
+ }
+
+ public String getHops() {
+ return hops;
+ }
+
+ public void setHops(String hops) {
+ this.hops = hops;
+ }
+
+ /**
+ * The constructor initializes the variables and sets xml element
+ * information (when applicable).
+ */
+ public OwampAggregationDatum() {
+ sender = "";
+ receiver = "";
+ sent = "";
+ loss = "";
+ duplicates = "";
+ lostPercent = "";
+ minDelay = "";
+ medDelay = "";
+
+ parent = null;
+ id = "";
+ completed = false;
+
+ localName = "datum";
+ 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
+ }
+
+ public boolean addAttr(String attr, String value, NamespaceSupport
nss) {
+ if (attr.equals("value")) {
+ setValue(value);
+ } else if (attr.equals("valueUnits")) {
+ setValueUnits(value);
+ } else if (attr.equals("numBytes")) {
+ setNumBytes(value);
+ } else if (attr.equals("numBytesUnits")) {
+ setNumBytesUnits(value);
+ } else if (attr.equals("sender")) {
+ setSender(value);
+ } else if (attr.equals("receiver")) {
+ setReceiver(value);
+ } else if (attr.equals("sent")) {
+ setSent(value);
+ } else if (attr.equals("loss")) {
+ setLoss(value);
+ } else if (attr.equals("lostPercent")) {
+ setLostPercent(value);
+ } else if (attr.equals("duplicates")) {
+ setDuplicates(value);
+ } else if (attr.equals("minDelay")) {
+ setMinDelay(value);
+ } else if (attr.equals("medDelay")) {
+ setMedDelay(value);
+ } else if (attr.equals("maxDelay")) {
+ setMaxDelay(value);
+ } else if (attr.equals("delayUnits")) {
+ setDelayUnits(value);
+ } else if (attr.equals("error")) {
+ setError(value);
+ } else if (attr.equals("errorUnits")) {
+ setErrorUnits(value);
+ } else if (attr.equals("jitter")) {
+ setJitter(value);
+ } else if (attr.equals("jitterUnits")) {
+ setJitterUnits(value);
+ } else if (attr.equals("hops")) {
+ setHops(value);
+ } else if (attr.indexOf("xmlns") >= 0) {
+ if (attr.split(":").length == 1) {
+ if (nss.getURI("") == null) {
+ nss.declarePrefix("", value);
+ }
+ if ((prefix.equals("")) &&
!(value.equals(uri))) {
+ uri = value;
+ }
+ } else {
+ if (nss.getURI(attr.split(":")[1]) == null) {
+ nss.declarePrefix(attr.split(":")[1],
value);
+ }
+ if ((prefix.equals(attr.split(":")[1])) &&
!(value.equals(uri))) {
+ uri = value;
+ }
+ }
+ } else {
+ System.err
+ .println("Error: "
+ + getFileName()
+ + " addAttr(String,
String, NamespaceSupport) unrecognized attribute pair: "
+ + attr + " - " +
value);
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * The only allowable child for a datum element is the time.
+ */
+ public boolean addChild(Element newChild) {
+ if (newChild.getLocalName().equals("time")) {
+ setTime((Time) newChild);
+ } else {
+ System.err.println("Error: " + getFileName()
+ + " addChild(Element) unrecognized
child: " + newChild);
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Converts the contents of this object into an xml tag.
+ */
+ public ContentHandler toXML(ContentHandler handler, NamespaceSupport
nss)
+ throws Exception {
+ try {
+ handler.startElement(getUri(), getLocalName(),
getQName(),
+ getAttributes(nss));
+ handler = getChildren(handler, nss);
+ handler.endElement(getUri(), getLocalName(),
getQName());
+
+ if (getCompleted()) {
+ nss.popContext();
+ unSetCompleted();
+ }
+ } catch (Exception e) {
+ System.err
+ .println("Error: "
+ + getFileName()
+ + "
toXML(ContentHandler, NamespaceSupport) XML formulation error.");
+ }
+ return handler;
+ }
+
+ /**
+ * Converts items into attributes for an xml tag.
+ */
+ public AttributesImpl getAttributes(NamespaceSupport nss) {
+ AttributesImpl atts = new AttributesImpl();
+
+ 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());
+ }
+ /* Add Specific Attributes from here */
+ if (!(getSender().equals(""))) {
+ atts.addAttribute(getUri(), "sender", "sender",
"CDATA",
+ getSender());
+ }
+ if (!(getReceiver().equals(""))) {
+ atts.addAttribute(getUri(), "receiver", "receiver",
"CDATA",
+ getReceiver());
+ }
+ if (!(getSent().equals(""))) {
+ atts.addAttribute(getUri(), "sent", "sent",
+ "CDATA", getSent());
+ }
+ if (!(getLoss().equals(""))) {
+ atts.addAttribute(getUri(), "loss", "loss",
+ "CDATA", getLoss());
+ }
+ if (!(getLostPercent().equals(""))) {
+ atts.addAttribute(getUri(), "lostPercent",
"lostPercent", "CDATA",
+ getLostPercent());
+ }
+ if (!(getDuplicates().equals(""))) {
+ atts.addAttribute(getUri(), "duplicates",
+ "duplicates", "CDATA",
getDuplicates());
+ }
+ if (!(getMinDelay().equals(""))) {
+ atts.addAttribute(getUri(), "minDelay", "minDelay",
+ "CDATA", getMinDelay());
+ }
+ if (!(getMedDelay().equals(""))) {
+ atts.addAttribute(getUri(), "medDelay", "medDelay",
"CDATA", getMedDelay());
+ }
+ if (!(getMaxDelay().equals(""))) {
+ atts.addAttribute(getUri(), "maxDelay", "maxDelay",
"CDATA", getMaxDelay());
+ }
+ if (!(getDelayUnits().equals(""))) {
+ atts.addAttribute(getUri(), "delayUnits",
"delayUnits", "CDATA", getDelayUnits());
+ }
+ if (!(getError().equals(""))) {
+ atts.addAttribute(getUri(), "error", "error",
"CDATA", getError());
+ }
+ if (!(getErrorUnits().equals(""))) {
+ atts.addAttribute(getUri(), "errorUnits",
"errorUnits", "CDATA", getErrorUnits());
+ }
+ if (!(getJitter().equals(""))) {
+ atts.addAttribute(getUri(), "jitter", "jitter",
"CDATA", getJitter());
+ }
+ if (!(getJitterUnits().equals(""))) {
+ atts.addAttribute(getUri(), "jitterUnits",
"jitterUnits", "CDATA", getJitterUnits());
+ }
+ if (!(getHops().equals(""))) {
+ atts.addAttribute(getUri(), "hops", "hops", "CDATA",
getHops());
+ }
+
+ if (nss.getURI(getPrefix()) == null) {
+ nss.pushContext();
+ if (getPrefix().equals("")) {
+ atts.addAttribute(getUri(), "xmlns", "xmlns",
"CDATA", getUri());
+ } else {
+ atts.addAttribute(getUri(), "xmlns:" +
getPrefix(), "xmlns:"
+ + getPrefix(), "CDATA",
getUri());
+ }
+ nss.declarePrefix(getPrefix(), getUri());
+ setCompleted();
+ }
+
+ return atts;
+ }
+
+ /**
+ * Chases children references down to print out all related xml tags.
+ */
+ public ContentHandler getChildren(ContentHandler handler,
+ NamespaceSupport nss) throws Exception {
+ if (getTime() != null) {
+ handler = getTime().toXML(handler, nss);
+ }
+ return handler;
+ }
+
+ /**
+ * Given a DOM element (a parent), construct the children elements.
+ */
+ public void getDOM(org.w3c.dom.Element parent) {
+ org.w3c.dom.Document doc = parent.getOwnerDocument();
+ org.w3c.dom.Element datum = doc.createElementNS(getUri(),
getQName());
+ parent.appendChild(datum);
+ if (!(getValue().equals(""))) {
+ datum.setAttribute("value", getValue());
+ }
+ if (!(getValueUnits().equals(""))) {
+ datum.setAttribute("valueUnits", getValueUnits());
+ }
+ if (!(getTimeType().equals(""))) {
+ datum.setAttribute("timeType", getTimeType());
+ }
+ if (!(getTimeValue().equals(""))) {
+ datum.setAttribute("timeValue", getTimeValue());
+ }
+ if (!(getNumBytes().equals(""))) {
+ datum.setAttribute("numBytes", getNumBytes());
+ }
+ if (!(getNumBytesUnits().equals(""))) {
+ datum.setAttribute("numBytesUnits",
getNumBytesUnits());
+ }
+ /* Add Specific Attributes from here */
+ if (!(getSent().equals(""))) {
+ datum.setAttribute("sent", getSent());
+ }
+ if (!(getReceiver().equals(""))) {
+ datum.setAttribute("receiver", getReceiver());
+ }
+ if (!(getSender().equals(""))) {
+ datum.setAttribute("sender", getSender());
+ }
+ if (!(getLoss().equals(""))) {
+ datum.setAttribute("loss", getLoss());
+ }
+ if (!(getLostPercent().equals(""))) {
+ datum.setAttribute("lostPercent", getLostPercent());
+ }
+ if (!(getDuplicates().equals(""))) {
+ datum.setAttribute("duplicates", getDuplicates());
+ }
+ if (!(getMinDelay().equals(""))) {
+ datum.setAttribute("minDelay", getMinDelay());
+ }
+ if (!(getMedDelay().equals(""))) {
+ datum.setAttribute("medDelay", getMedDelay());
+ }
+ if (!(getMaxDelay().equals(""))) {
+ datum.setAttribute("maxDelay", getMaxDelay());
+ }
+ if (!(getDelayUnits().equals(""))) {
+ datum.setAttribute("delayUnits", getDelayUnits());
+ }
+ if (!(getError().equals(""))) {
+ datum.setAttribute("error", getError());
+ }
+ if (!(getErrorUnits().equals(""))) {
+ datum.setAttribute("errorUnits", getErrorUnits());
+ }
+ if (!(getJitter().equals(""))) {
+ datum.setAttribute("jitter", getJitter());
+ }
+ if (!(getJitterUnits().equals(""))) {
+ datum.setAttribute("jitterUnits", getJitterUnits());
+ }
+ if (!(getHops().equals(""))) {
+ datum.setAttribute("hops", getHops());
+ }
+
+ if (getTime() != null) {
+ getTime().getDOM(datum);
+ }
+ }
+
+
+
+
+ @Override
+ public String toString() {
+ return getFileName() + ": ---> " + getValue() +" sender=" +
sender + ", receiver="
+ + receiver + ", sent=" + sent + ", loss=" +
loss
+ + ", duplicates=" + duplicates + ",
lostPercent=" + lostPercent
+ + ", minDelay=" + minDelay + ", medDelay=" +
medDelay
+ + ", maxDelay=" + maxDelay + ", delayUnits="
+ delayUnits
+ + ", error=" + error + ", errorUnits=" +
errorUnits
+ + ", jitter=" + jitter + ", jitterUnits=" +
jitterUnits
+ + ", hops=" + hops;
+ }
+}



  • [pS-dev] [GEANT/SA2/ps-java-services] r5852 - in trunk/perfsonar-java-sql-ma: conf src/main/java/org/perfsonar/service/measurementArchive/sqlType src/main/java/org/perfsonar/service/measurementArchive/sqlType/nmwg, svn-noreply, 10/04/2011

Archive powered by MHonArc 2.6.16.

Top of Page