2 * Copyright © 2016-2018 European Support Limited
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.openecomp.sdc.be.model;
19 import org.openecomp.sdc.be.datatypes.elements.RelationshipInstDataDefinition;
20 import org.openecomp.sdc.be.resources.data.RelationshipTypeData;
23 * Specifies the capabilities that the Node Type exposes.
25 public class RelationshipTypeDefinition extends RelationshipInstDataDefinition {
27 private String derivedFrom;
28 private Map<String, PropertyDefinition> properties;
30 public RelationshipTypeDefinition() {
34 public RelationshipTypeDefinition(RelationshipInstDataDefinition p) {
38 public RelationshipTypeDefinition(RelationshipTypeData relationshipTypeData) {
39 this.setUniqueId(relationshipTypeData.getUniqueId());
40 this.setType(relationshipTypeData.getRelationshipTypeDataDefinition().getType());
41 this.setDescription(relationshipTypeData.getRelationshipTypeDataDefinition().getDescription());
42 this.setValidSourceTypes(relationshipTypeData.getRelationshipTypeDataDefinition().getValidSourceTypes());
45 public String getDerivedFrom() {
49 public void setDerivedFrom(String derivedFrom) {
50 this.derivedFrom = derivedFrom;
53 public Map<String, PropertyDefinition> getProperties() {
57 public void setProperties(Map<String, PropertyDefinition> properties) {
58 this.properties = properties;
62 public String toString() {
63 return super.toString() + " [ derivedFrom=" + derivedFrom + ", properties=" + properties + " ]";