BUG-2218: Keep existing link augmentations during discovery process
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / core / Capabilities.java
index a41a0e22904482050bbcfe95c4338c2acb0dc520..147f1b13aedc32e6c3f50ebdf5badcaca010a85b 100644 (file)
@@ -9,6 +9,8 @@
 
 package org.opendaylight.controller.sal.core;
 
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 
@@ -20,29 +22,30 @@ import javax.xml.bind.annotation.XmlRootElement;
  * Describes supported capabilities
  */
 @XmlRootElement
+@XmlAccessorType(XmlAccessType.NONE)
 public class Capabilities extends Property {
-       private static final long serialVersionUID = 1L;
-    @XmlElement
+        private static final long serialVersionUID = 1L;
+    @XmlElement(name="value")
     private int capabilitiesValue;
-    
-    public enum CapabilitiesType { 
-       FLOW_STATS_CAPABILITY(1<<0),
-       TABLE_STATS_CAPABILITY(1<<1),
-       PORT_STATS_CAPABILITY(1<<2),
-       STP_CAPABILITY(1<<3),
-       RSVD_CAPABILITY(1<<4),
-       IP_REASSEM_CAPABILITY(1<<5),
-       QUEUE_STATS_CAPABILITY(1<<6),
-       ARP_MATCH_IP_CAPABILITY(1<<7);
-       private final int ct;
-       CapabilitiesType(int val) {
-               this.ct = val;
-       }
-       public int getValue() {
-               return ct;
-       }
+
+    public enum CapabilitiesType {
+        FLOW_STATS_CAPABILITY(1<<0),
+        TABLE_STATS_CAPABILITY(1<<1),
+        PORT_STATS_CAPABILITY(1<<2),
+        STP_CAPABILITY(1<<3),
+        RSVD_CAPABILITY(1<<4),
+        IP_REASSEM_CAPABILITY(1<<5),
+        QUEUE_STATS_CAPABILITY(1<<6),
+        ARP_MATCH_IP_CAPABILITY(1<<7);
+        private final int ct;
+        CapabilitiesType(int val) {
+                this.ct = val;
+        }
+        public int getValue() {
+                return ct;
+        }
     }
-   
+
     public static final String CapabilitiesPropName = "capabilities";
     /**
      * Construct a Capabilities property
@@ -63,14 +66,15 @@ public class Capabilities extends Property {
         this.capabilitiesValue = 0;
     }
 
+    @Override
     public Capabilities clone() {
         return new Capabilities(this.capabilitiesValue);
     }
 
     public int getValue() {
-       return this.capabilitiesValue;
+        return this.capabilitiesValue;
     }
-    
+
     @Override
     public int hashCode() {
         final int prime = 31;
@@ -97,4 +101,9 @@ public class Capabilities extends Property {
     public String toString() {
         return "Capabilities[" + capabilitiesValue + "]";
     }
+
+    @Override
+    public String getStringValue() {
+        return Integer.toHexString(capabilitiesValue);
+    }
 }