Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 1 | /* |
| 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 | */ |
weibit | 38c42ed | 2014-10-09 19:03:54 -0700 | [diff] [blame] | 19 | package org.onlab.onos.optical.cfg; |
| 20 | |
| 21 | /** |
| 22 | * ROADM java data object converted from a JSON file. |
| 23 | */ |
| 24 | class Roadm { |
| 25 | private String name; |
| 26 | private String nodeID; |
| 27 | private double longtitude; |
| 28 | private double latitude; |
| 29 | private int regenNum; |
| 30 | |
| 31 | //TODO use the following attributes when needed for configurations |
| 32 | private int tPort10G; |
| 33 | private int tPort40G; |
| 34 | private int tPort100G; |
| 35 | private int wPort; |
| 36 | |
| 37 | public Roadm() { |
| 38 | } |
| 39 | |
| 40 | public Roadm(String name) { |
| 41 | this.name = name; |
| 42 | } |
| 43 | |
| 44 | public void setName(String name) { |
| 45 | this.name = name; |
| 46 | } |
| 47 | |
| 48 | public String getName() { |
| 49 | return this.name; |
| 50 | } |
| 51 | |
| 52 | public void setNodeId(String nameId) { |
| 53 | this.nodeID = nameId; |
| 54 | } |
| 55 | |
| 56 | public String getNodeId() { |
| 57 | return this.nodeID; |
| 58 | } |
| 59 | |
| 60 | public void setLongtitude(double x) { |
| 61 | this.longtitude = x; |
| 62 | } |
| 63 | |
| 64 | public double getLongtitude() { |
| 65 | return this.longtitude; |
| 66 | } |
| 67 | |
| 68 | public void setLatitude(double y) { |
| 69 | this.latitude = y; |
| 70 | } |
| 71 | |
| 72 | public double getLatitude() { |
| 73 | return this.latitude; |
| 74 | } |
| 75 | |
| 76 | public void setRegenNum(int num) { |
| 77 | this.regenNum = num; |
| 78 | } |
| 79 | public int getRegenNum() { |
| 80 | return this.regenNum; |
| 81 | } |
| 82 | |
| 83 | public void setTport10GNum(int num) { |
| 84 | this.tPort10G = num; |
| 85 | } |
| 86 | public int getTport10GNum() { |
| 87 | return this.tPort10G; |
| 88 | } |
| 89 | |
| 90 | public void setTport40GNum(int num) { |
| 91 | this.tPort40G = num; |
| 92 | } |
| 93 | public int getTport40GNum() { |
| 94 | return this.tPort40G; |
| 95 | } |
| 96 | |
| 97 | public void setTport100GNum(int num) { |
| 98 | this.tPort100G = num; |
| 99 | } |
| 100 | public int getTport100GNum() { |
| 101 | return this.tPort100G; |
| 102 | } |
| 103 | |
| 104 | public void setWportNum(int num) { |
| 105 | this.wPort = num; |
| 106 | } |
| 107 | public int getWportNum() { |
| 108 | return this.wPort; |
| 109 | } |
| 110 | |
| 111 | @Override |
| 112 | public String toString() { |
| 113 | return new StringBuilder(" ROADM Name: ").append(this.name) |
| 114 | .append(" nodeID: ").append(this.nodeID) |
| 115 | .append(" longtitude: ").append(this.longtitude) |
| 116 | .append(" latitude: ").append(this.latitude) |
| 117 | .append(" regenNum: ").append(this.regenNum) |
| 118 | .append(" 10GTportNum: ").append(this.tPort10G) |
| 119 | .append(" 40GTportNum: ").append(this.tPort40G) |
| 120 | .append(" 100GTportNum: ").append(this.tPort100G) |
| 121 | .append(" WportNum: ").append(this.wPort).toString(); |
| 122 | } |
| 123 | } |
| 124 | |