weibit | 38c42ed | 2014-10-09 19:03:54 -0700 | [diff] [blame] | 1 | package org.onlab.onos.optical.cfg; |
| 2 | |
| 3 | import java.util.Map; |
| 4 | import org.codehaus.jackson.JsonNode; |
| 5 | import org.onlab.util.HexString; |
| 6 | |
| 7 | /** |
| 8 | * Public class corresponding to JSON described data model. |
| 9 | */ |
| 10 | public class OpticalLinkDescription { |
| 11 | protected String type; |
| 12 | protected Boolean allowed; |
| 13 | protected long dpid1; |
| 14 | protected long dpid2; |
| 15 | protected String nodeDpid1; |
| 16 | protected String nodeDpid2; |
| 17 | protected Map<String, JsonNode> params; |
| 18 | protected Map<String, String> publishAttributes; |
| 19 | |
| 20 | public String getType() { |
| 21 | return type; |
| 22 | } |
| 23 | |
| 24 | public void setType(String type) { |
| 25 | this.type = type; |
| 26 | } |
| 27 | |
| 28 | public Boolean isAllowed() { |
| 29 | return allowed; |
| 30 | } |
| 31 | |
| 32 | public void setAllowed(Boolean allowed) { |
| 33 | this.allowed = allowed; |
| 34 | } |
| 35 | |
| 36 | public String getNodeDpid1() { |
| 37 | return nodeDpid1; |
| 38 | } |
| 39 | |
| 40 | public void setNodeDpid1(String nodeDpid1) { |
| 41 | this.nodeDpid1 = nodeDpid1; |
| 42 | this.dpid1 = HexString.toLong(nodeDpid1); |
| 43 | } |
| 44 | |
| 45 | public String getNodeDpid2() { |
| 46 | return nodeDpid2; |
| 47 | } |
| 48 | |
| 49 | public void setNodeDpid2(String nodeDpid2) { |
| 50 | this.nodeDpid2 = nodeDpid2; |
| 51 | this.dpid2 = HexString.toLong(nodeDpid2); |
| 52 | } |
| 53 | |
| 54 | public long getDpid1() { |
| 55 | return dpid1; |
| 56 | } |
| 57 | |
| 58 | public void setDpid1(long dpid1) { |
| 59 | this.dpid1 = dpid1; |
| 60 | this.nodeDpid1 = HexString.toHexString(dpid1); |
| 61 | } |
| 62 | |
| 63 | public long getDpid2() { |
| 64 | return dpid2; |
| 65 | } |
| 66 | |
| 67 | public void setDpid2(long dpid2) { |
| 68 | this.dpid2 = dpid2; |
| 69 | this.nodeDpid2 = HexString.toHexString(dpid2); |
| 70 | } |
| 71 | |
| 72 | public Map<String, JsonNode> getParams() { |
| 73 | return params; |
| 74 | } |
| 75 | |
| 76 | public void setParams(Map<String, JsonNode> params) { |
| 77 | this.params = params; |
| 78 | } |
| 79 | |
| 80 | public Map<String, String> getPublishAttributes() { |
| 81 | return publishAttributes; |
| 82 | } |
| 83 | |
| 84 | public void setPublishAttributes(Map<String, String> publishAttributes) { |
| 85 | this.publishAttributes = publishAttributes; |
| 86 | } |
| 87 | |
| 88 | } |
| 89 | |