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