blob: 63cd775ceb7356825010f6aac547bb5309b9c5e6 [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
18/**
19 * WDM Link Java data object converted from a JSON file.
Sho SHIMIZUbe63b232015-06-30 10:57:58 -070020 *
21 * @deprecated in Cardinal Release
weibit38c42ed2014-10-09 19:03:54 -070022 */
Thomas Vachuska112c7032014-11-16 11:05:14 -080023@Deprecated
weibit38c42ed2014-10-09 19:03:54 -070024class WdmLink {
25 private String srcNodeName;
26 private String snkNodeName;
27 private String srcNodeId;
28 private String snkNodeId;
29 private int srcPort;
30 private int snkPort;
31 private double distance;
32 private double cost;
33 private int wavelengthNumber;
34 private long adminWeight;
35
36 public WdmLink(String name1, String name2) {
37 this.srcNodeName = name1;
38 this.snkNodeName = name2;
39 }
40
41 public WdmLink() {
weibit38c42ed2014-10-09 19:03:54 -070042 }
43
44 public void setSrcNodeName(String name) {
45 this.srcNodeName = name;
46 }
47
48 public String getSrcNodeName() {
49 return this.srcNodeName;
50 }
51
52 public void setSnkNodeName(String name) {
53 this.snkNodeName = name;
54 }
55
56 public String getSnkNodeName() {
57 return this.snkNodeName;
58 }
59
60 public void setSrcNodeId(String nodeId) {
61 this.srcNodeId = nodeId;
62 }
63
64 public String getSrcNodeId() {
65 return this.srcNodeId;
66 }
67
68 public void setSnkNodeId(String nodeId) {
69 this.snkNodeId = nodeId;
70 }
71
72 public String getSnkNodeId() {
73 return this.snkNodeId;
74 }
75
76 public void setSrcPort(int port) {
77 this.srcPort = port;
78 }
79
80 public int getSrcPort() {
81 return this.srcPort;
82 }
83
84 public void setSnkPort(int port) {
85 this.snkPort = port;
86 }
87
88 public int getSnkPort() {
89 return this.snkPort;
90 }
91
92 public void setDistance(double x) {
93 this.distance = x;
94 }
95
96 public double getDistance() {
97 return this.distance;
98 }
99
100 public void setCost(double x) {
101 this.cost = x;
102 }
103
104 public double getCost() {
105 return this.cost;
106 }
107
108 public void setWavelengthNumber(int x) {
109 this.wavelengthNumber = x;
110 }
111
112 public int getWavelengthNumber() {
113 return this.wavelengthNumber;
114 }
115
116 public void setAdminWeight(long x) {
117 this.adminWeight = x;
118 }
119
120 public long getAdminWeight() {
121 return this.adminWeight;
122 }
123
124 @Override
125 public String toString() {
126 return new StringBuilder(" srcNodeName: ").append(this.srcNodeName)
127 .append(" snkNodeName: ").append(this.snkNodeName)
128 .append(" srcNodeId: ").append(this.srcNodeId)
129 .append(" snkNodeId: ").append(this.snkNodeId)
130 .append(" srcPort: ").append(this.srcPort)
131 .append(" snkPort: ").append(this.snkPort)
132 .append(" distance: ").append(this.distance)
133 .append(" cost: ").append(this.cost)
134 .append(" wavelengthNumber: ").append(this.wavelengthNumber)
135 .append(" adminWeight: ").append(this.adminWeight).toString();
136 }
137}
138