Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 1 | /* |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 2 | * Copyright 2014 Open Networking Laboratory |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 3 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 4 | * 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 Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 7 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 8 | * 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 Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 15 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.optical.cfg; |
weibit | 38c42ed | 2014-10-09 19:03:54 -0700 | [diff] [blame] | 17 | |
| 18 | /** |
| 19 | * WDM Link Java data object converted from a JSON file. |
Sho SHIMIZU | be63b23 | 2015-06-30 10:57:58 -0700 | [diff] [blame] | 20 | * |
| 21 | * @deprecated in Cardinal Release |
weibit | 38c42ed | 2014-10-09 19:03:54 -0700 | [diff] [blame] | 22 | */ |
Thomas Vachuska | 112c703 | 2014-11-16 11:05:14 -0800 | [diff] [blame] | 23 | @Deprecated |
weibit | 38c42ed | 2014-10-09 19:03:54 -0700 | [diff] [blame] | 24 | class 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() { |
weibit | 38c42ed | 2014-10-09 19:03:54 -0700 | [diff] [blame] | 42 | } |
| 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 | |