2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.be.datatypes.elements;
23 import java.util.List;
25 import java.util.Objects;
27 public class Annotation {
30 private String description;
31 private List<PropertyDataDefinition> properties;
33 public String getName() {
37 public void setName(String name) {
41 public String getType() {
45 public void setType(String type) {
49 public List<PropertyDataDefinition> getProperties() {
53 public void setProperties(List<PropertyDataDefinition> properties) {
54 this.properties = properties;
57 public String getDescription() {
61 public void setDescription(String description) {
62 this.description = description;
65 public static void setAnnotationsName(Map<String, Annotation> annotations) {
66 annotations.forEach((name, annotation) -> annotation.setName(name));
70 public boolean equals(Object o) {
74 if (o == null || getClass() != o.getClass()) {
77 Annotation that = (Annotation) o;
78 return Objects.equals(name, that.name);
82 public int hashCode() {
83 return Objects.hash(name);