3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 package org.opendaylight.controller.topology.northbound;
12 import java.util.HashMap;
13 import java.util.HashSet;
16 import javax.xml.bind.annotation.XmlAccessType;
17 import javax.xml.bind.annotation.XmlAccessorType;
18 import javax.xml.bind.annotation.XmlElement;
19 import javax.xml.bind.annotation.XmlElementRef;
20 import javax.xml.bind.annotation.XmlElementWrapper;
21 import javax.xml.bind.annotation.XmlRootElement;
23 import com.fasterxml.jackson.annotation.JsonIgnore;
24 import com.fasterxml.jackson.annotation.JsonProperty;
25 import org.opendaylight.controller.sal.core.Edge;
26 import org.opendaylight.controller.sal.core.Property;
29 @XmlAccessorType(XmlAccessType.NONE)
30 public class EdgeProperties {
36 private Set<Property> properties;
38 // JAXB required constructor
39 private EdgeProperties() {
41 this.properties = null;
44 public EdgeProperties(Edge e, Set<Property> properties) {
46 this.properties = properties;
49 @JsonProperty(value="properties")
50 public Map<String, Property> getMapProperties() {
51 Map<String, Property> map = new HashMap<String, Property>();
52 for (Property p : properties) {
53 map.put(p.getName(), p);
58 public void setMapProperties(Map<String, Property> propertiesMap) {
59 this.properties = new HashSet<Property>(propertiesMap.values());
62 public Set<Property> getProperties() {
65 public void setProperties(Set<Property> properties) {
66 this.properties = properties;
69 public Edge getEdge() {
73 public void setEdge(Edge edge) {