1 package org.onap.nbi.commons;
3 import java.util.LinkedHashSet;
5 import org.springframework.util.MultiValueMap;
7 public class JsonRepresentation {
9 private Set<String> attributes = new LinkedHashSet<>();
11 public JsonRepresentation() {}
13 public JsonRepresentation(MultiValueMap<String, String> queryParameters) {
14 this.attributes = QueryParserUtils.getFields(queryParameters);
17 public JsonRepresentation(Set<String> attributes) {
18 this.attributes.addAll(attributes);
21 public JsonRepresentation add(String attributePath) {
22 this.attributes.add(attributePath);
26 public JsonRepresentation add(JsonRepresentation jsonRepresentation) {
27 this.attributes.addAll(jsonRepresentation.getAttributes());
31 public Set<String> getAttributes() {