Stubpce Update
[transportpce.git] / tests / stubpce / src / main / java / org / opendaylight / transportpce / stubpce / topology / RoadmToRoadm.java
1 /*
2  * Copyright © 2017 Orange, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.transportpce.stubpce.topology;
10
11 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
12 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
13 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
14
15 import java.util.List;
16
17
18 /**
19  * Class to create list of links
20  * between Supernode.
21  *
22  * @author <a href="mailto:martial.coulibaly@gfi.com">Martial Coulibaly</a> on
23  *         behalf of Orange
24  */
25 @JacksonXmlRootElement(localName = "roadm-to-roadm")
26 public class RoadmToRoadm {
27     /** List of links. */
28     @JacksonXmlElementWrapper(localName = "links")
29     @JacksonXmlProperty(localName = "link")
30     private List<String> links;
31
32     /**
33      * RoadmToRoadm structure.
34      *
35      * @param links list of links
36      */
37     public RoadmToRoadm(@JacksonXmlProperty(localName = "Rlinks") final List<String> links) {
38         setLinks(links);
39     }
40
41     public List<String> getLinks() {
42         return links;
43     }
44
45     public void setLinks(List<String> links) {
46         this.links = links;
47     }
48
49     @Override
50     public String toString() {
51         int index;
52         int size;
53         java.lang.String name = "RoadmToRoadm [";
54         java.lang.StringBuilder builder = new java.lang.StringBuilder(name);
55         index = 0;
56         size = links.size();
57         builder.append("Links [");
58         for (String tmp : links) {
59             builder.append(tmp.toString());
60             index++;
61             if (index < size) {
62                 builder.append(", ");
63             }
64         }
65         builder.append("]");
66         return builder.append(']').toString();
67     }
68 }