2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 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.tosca.datatypes.model;
23 public class RequirementDefinition {
25 private String capability;
27 private String relationship;
28 private Object[] occurrences;
31 * Instantiates a new Requirement definition.
33 public RequirementDefinition() {
34 occurrences = new Object[2];
39 public String getCapability() {
43 public void setCapability(String capability) {
44 this.capability = capability;
47 public String getNode() {
51 public void setNode(String node) {
55 public String getRelationship() {
59 public void setRelationship(String relationship) {
60 this.relationship = relationship;
63 public Object[] getOccurrences() {
67 public void setOccurrences(Object[] occurrences) {
68 this.occurrences = occurrences;
72 public RequirementDefinition clone() {
73 RequirementDefinition requirementDefinition = new RequirementDefinition();
74 requirementDefinition.setNode(this.getNode());
75 requirementDefinition.setRelationship(this.getRelationship());
76 requirementDefinition.setCapability(this.getCapability());
78 .setOccurrences(new Object[]{this.getOccurrences()[0], this.getOccurrences()[1]});
79 return requirementDefinition;