blob: fc8ba8ac8ed28f0024f7e2253beae006811a8728 [file] [log] [blame]
Thomas Vachuska781d18b2014-10-27 10:31:25 -07001/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
weibit38c42ed2014-10-09 19:03:54 -070019package org.onlab.onos.optical.cfg;
20
21/**
22 * WDM Link Java data object converted from a JSON file.
23 */
24class 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() {
42 // TODO Auto-generated constructor stub
43 }
44
45 public void setSrcNodeName(String name) {
46 this.srcNodeName = name;
47 }
48
49 public String getSrcNodeName() {
50 return this.srcNodeName;
51 }
52
53 public void setSnkNodeName(String name) {
54 this.snkNodeName = name;
55 }
56
57 public String getSnkNodeName() {
58 return this.snkNodeName;
59 }
60
61 public void setSrcNodeId(String nodeId) {
62 this.srcNodeId = nodeId;
63 }
64
65 public String getSrcNodeId() {
66 return this.srcNodeId;
67 }
68
69 public void setSnkNodeId(String nodeId) {
70 this.snkNodeId = nodeId;
71 }
72
73 public String getSnkNodeId() {
74 return this.snkNodeId;
75 }
76
77 public void setSrcPort(int port) {
78 this.srcPort = port;
79 }
80
81 public int getSrcPort() {
82 return this.srcPort;
83 }
84
85 public void setSnkPort(int port) {
86 this.snkPort = port;
87 }
88
89 public int getSnkPort() {
90 return this.snkPort;
91 }
92
93 public void setDistance(double x) {
94 this.distance = x;
95 }
96
97 public double getDistance() {
98 return this.distance;
99 }
100
101 public void setCost(double x) {
102 this.cost = x;
103 }
104
105 public double getCost() {
106 return this.cost;
107 }
108
109 public void setWavelengthNumber(int x) {
110 this.wavelengthNumber = x;
111 }
112
113 public int getWavelengthNumber() {
114 return this.wavelengthNumber;
115 }
116
117 public void setAdminWeight(long x) {
118 this.adminWeight = x;
119 }
120
121 public long getAdminWeight() {
122 return this.adminWeight;
123 }
124
125 @Override
126 public String toString() {
127 return new StringBuilder(" srcNodeName: ").append(this.srcNodeName)
128 .append(" snkNodeName: ").append(this.snkNodeName)
129 .append(" srcNodeId: ").append(this.srcNodeId)
130 .append(" snkNodeId: ").append(this.snkNodeId)
131 .append(" srcPort: ").append(this.srcPort)
132 .append(" snkPort: ").append(this.snkPort)
133 .append(" distance: ").append(this.distance)
134 .append(" cost: ").append(this.cost)
135 .append(" wavelengthNumber: ").append(this.wavelengthNumber)
136 .append(" adminWeight: ").append(this.adminWeight).toString();
137 }
138}
139