Fixing warnings in the sal sub-project.
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / core / TimeStamp.java
index b38ec8582b17db2d765a35c9df4d3b888ed96228..67f2b25bd272a67027a91174163d1b372dc41bb0 100644 (file)
@@ -9,6 +9,10 @@
 
 package org.opendaylight.controller.sal.core;
 
+import java.util.Date;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 
@@ -23,6 +27,7 @@ import javax.xml.bind.annotation.XmlRootElement;
  * to qualify what are we talking about
  */
 @XmlRootElement
+@XmlAccessorType(XmlAccessType.NONE)
 public class TimeStamp extends Property {
     private static final long serialVersionUID = 1L;
     @XmlElement(name = "value")
@@ -103,4 +108,9 @@ public class TimeStamp extends Property {
     public String toString() {
         return "TimeStamp[" + timestampName + ": " + timestamp +"]";
     }
+
+    @Override
+    public String getStringValue() {
+        return timestampName + ": " + new Date(timestamp);
+    }
 }