2 * Copyright (c) 2013 Plexxi, Inc. and others. All rights reserved.
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
9 package org.opendaylight.affinity.affinity.northbound;
11 import java.util.ArrayList;
12 import java.util.List;
13 import java.util.HashMap;
15 import javax.xml.bind.annotation.XmlAccessType;
16 import javax.xml.bind.annotation.XmlAccessorType;
17 import javax.xml.bind.annotation.XmlElement;
18 import javax.xml.bind.annotation.XmlAttribute;
19 import javax.xml.bind.annotation.XmlRootElement;
21 import org.opendaylight.affinity.affinity.AffinityLink;
22 import org.opendaylight.affinity.affinity.AffinityAttribute;
23 import org.opendaylight.affinity.affinity.AffinityAttributeType;
25 // API object to be returned in GET calls.
27 @XmlAccessorType(XmlAccessType.NONE)
28 public class AffinityLinkNorthbound {
32 private List<AffinityAttribute> attrlist;
34 public AffinityLinkNorthbound() {
36 public AffinityLinkNorthbound(AffinityLink al) {
37 HashMap<AffinityAttributeType, AffinityAttribute> attrs = al.getAttributeList();
39 attrlist = new ArrayList<AffinityAttribute>();
42 for (AffinityAttribute a: attrs.values()) {