blob: 9c6bbad9d94986980a377bca6b1225309f8298c0 [file] [log] [blame]
Thomas Vachuska781d18b2014-10-27 10:31:25 -07001/*
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07002 * Copyright 2014 Open Networking Laboratory
Thomas Vachuska781d18b2014-10-27 10:31:25 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
Thomas Vachuska781d18b2014-10-27 10:31:25 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
Thomas Vachuska781d18b2014-10-27 10:31:25 -070015 */
weibit38c42ed2014-10-09 19:03:54 -070016package org.onlab.onos.optical.cfg;
17
18import java.util.Map;
19import org.codehaus.jackson.JsonNode;
20import org.codehaus.jackson.annotate.JsonProperty;
21import org.onlab.util.HexString;
22
23/**
24 * Public class corresponding to JSON described data model.
25 */
Thomas Vachuska112c7032014-11-16 11:05:14 -080026@Deprecated
weibit38c42ed2014-10-09 19:03:54 -070027public class OpticalSwitchDescription {
28 protected String name;
29 protected long dpid;
30 protected String nodeDpid;
31 protected String type;
32 protected double latitude;
33 protected double longitude;
34 protected boolean allowed;
35 protected Map<String, JsonNode> params;
36 protected Map<String, String> publishAttributes;
37
38 public String getName() {
39 return name;
40 }
41 @JsonProperty("name")
42 public void setName(String name) {
43 this.name = name;
44 }
45
46 public long getDpid() {
47 return dpid;
48 }
49 @JsonProperty("dpid")
50 public void setDpid(long dpid) {
51 this.dpid = dpid;
52 this.nodeDpid = HexString.toHexString(dpid);
53 }
54
55 public String getNodeDpid() {
56 return nodeDpid;
57 }
58
59 public String getHexDpid() {
60 return nodeDpid;
61 }
62
63 public void setNodeDpid(String nodeDpid) {
64 this.nodeDpid = nodeDpid;
65 this.dpid = HexString.toLong(nodeDpid);
66 }
67
68 public String getType() {
69 return type;
70 }
71
72 public void setType(String type) {
73 this.type = type;
74 }
75
76 public double getLatitude() {
77 return latitude;
78 }
79
80 public void setLatitude(double latitude) {
81 this.latitude = latitude;
82 }
83
84 public double getLongitude() {
85 return longitude;
86 }
87
88 public void setLongitude(double longitude) {
89 this.longitude = longitude;
90 }
91
92 public boolean isAllowed() {
93 return allowed;
94 }
95
96 public void setAllowed(boolean allowed) {
97 this.allowed = allowed;
98 }
99
100 public Map<String, JsonNode> getParams() {
101 return params;
102 }
103
104 public void setParams(Map<String, JsonNode> params) {
105 this.params = params;
106 }
107
108 public Map<String, String> getPublishAttributes() {
109 return publishAttributes;
110 }
111
112 public void setPublishAttributes(Map<String, String> publishAttributes) {
113 this.publishAttributes = publishAttributes;
114 }
115
116}