finalize alto-manager and add README.md file
[alto.git] / alto-commons / src / main / java / org / opendaylight / alto / commons / types / model150404 / ModelNetworkMap.java
index e7f9b3d734328530f181542f5e4260663bf752ce..34cfcf8df39fbed819b6e6f3d21cf8de9f2891f7 100644 (file)
@@ -12,24 +12,15 @@ import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonIgnore;
 
 public class ModelNetworkMap implements NetworkMap {
+    
+    @JsonProperty("alto-service:resource-id")
+    public String rid = null;
 
-    @JsonIgnore
-    protected ResourceId rid = null;
-
-    @JsonIgnore
-    protected TagString tag = null;
-
-    @JsonIgnore
-    protected List<Map> data = new LinkedList<Map>();
-
-    public ModelNetworkMap() {
-    }
+    @JsonProperty("alto-service:tag")
+    public String tag = null;
 
-    public ModelNetworkMap(NetworkMap map) {
-        this.rid = map.getResourceId();
-        this.tag = map.getTag();
-        this.setMap(map.getMap());
-    }
+    @JsonProperty("alto-service:map")
+    public List<ModelEndpoint> map = new LinkedList<ModelEndpoint>();
 
     @JsonIgnore
     @Override
@@ -40,53 +31,18 @@ public class ModelNetworkMap implements NetworkMap {
     @JsonIgnore
     @Override
     public ResourceId getResourceId() {
-        return rid;
-    }
-
-    @JsonProperty("alto-service:resource-id")
-    public String getJSONResourceId() {
-        return rid.getValue();
-    }
-
-    @JsonProperty("alto-service:resource-id")
-    public void setJSONResourceId(String rid) {
-        this.rid = new ResourceId(rid);
+        return new ResourceId(rid);
     }
 
     @JsonIgnore
     @Override
     public TagString getTag() {
-        return tag;
-    }
-
-    @JsonProperty("alto-service:tag")
-    public String getJSONTag() {
-        return tag.getValue();
-    }
-
-    @JsonProperty("alto-service:tag")
-    public void setJSONTag(String tag) {
-        this.tag = new TagString(tag);
+        return new TagString(tag);
     }
 
     @JsonIgnore
     @Override
     public List<Map> getMap() {
-        return data;
-    }
-
-    @JsonIgnore
-    public void setMap(List<Map> data) {
-        this.data = new LinkedList<Map>(data);
-    }
-
-    @JsonProperty("alto-service:map")
-    public List<Map> getJSONMap() {
-        return data;
-    }
-
-    @JsonProperty("alto-service:map")
-    public void setJSONMap(List<ModelEndpoint> data) {
-        this.data = new LinkedList<Map>(data);
+        return new LinkedList<Map>(map);
     }
 }