blob: 346088fc9b50a5e042a0804336a33a6c95e74866 [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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.optical.cfg;
weibit38c42ed2014-10-09 19:03:54 -070017
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.
Sho SHIMIZUbe63b232015-06-30 10:57:58 -070025 *
26 * @deprecated in Cardinal Release
weibit38c42ed2014-10-09 19:03:54 -070027 */
Thomas Vachuska112c7032014-11-16 11:05:14 -080028@Deprecated
weibit38c42ed2014-10-09 19:03:54 -070029public class OpticalSwitchDescription {
30 protected String name;
31 protected long dpid;
32 protected String nodeDpid;
33 protected String type;
34 protected double latitude;
35 protected double longitude;
36 protected boolean allowed;
37 protected Map<String, JsonNode> params;
38 protected Map<String, String> publishAttributes;
39
40 public String getName() {
41 return name;
42 }
43 @JsonProperty("name")
44 public void setName(String name) {
45 this.name = name;
46 }
47
48 public long getDpid() {
49 return dpid;
50 }
51 @JsonProperty("dpid")
52 public void setDpid(long dpid) {
53 this.dpid = dpid;
54 this.nodeDpid = HexString.toHexString(dpid);
55 }
56
57 public String getNodeDpid() {
58 return nodeDpid;
59 }
60
61 public String getHexDpid() {
62 return nodeDpid;
63 }
64
65 public void setNodeDpid(String nodeDpid) {
66 this.nodeDpid = nodeDpid;
67 this.dpid = HexString.toLong(nodeDpid);
68 }
69
70 public String getType() {
71 return type;
72 }
73
74 public void setType(String type) {
75 this.type = type;
76 }
77
78 public double getLatitude() {
79 return latitude;
80 }
81
82 public void setLatitude(double latitude) {
83 this.latitude = latitude;
84 }
85
86 public double getLongitude() {
87 return longitude;
88 }
89
90 public void setLongitude(double longitude) {
91 this.longitude = longitude;
92 }
93
94 public boolean isAllowed() {
95 return allowed;
96 }
97
98 public void setAllowed(boolean allowed) {
99 this.allowed = allowed;
100 }
101
102 public Map<String, JsonNode> getParams() {
103 return params;
104 }
105
106 public void setParams(Map<String, JsonNode> params) {
107 this.params = params;
108 }
109
110 public Map<String, String> getPublishAttributes() {
111 return publishAttributes;
112 }
113
114 public void setPublishAttributes(Map<String, String> publishAttributes) {
115 this.publishAttributes = publishAttributes;
116 }
117
118}