ae99f9325ed2364cc110060619d5048f5303589b
[sdc.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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=========================================================
19  */
20 package org.onap.sdc.tosca.datatypes.model;
21
22 public class RequirementDefinition implements Cloneable {
23
24     private String capability;
25     private String node;
26     private String relationship;
27     private Object[] occurrences;
28
29     /**
30      * Instantiates a new Requirement definition.
31      */
32     public RequirementDefinition() {
33         occurrences = new Object[2];
34         occurrences[0] = 1;
35         occurrences[1] = 1;
36     }
37
38     public String getCapability() {
39         return capability;
40     }
41
42     public void setCapability(String capability) {
43         this.capability = capability;
44     }
45
46     public String getNode() {
47         return node;
48     }
49
50     public void setNode(String node) {
51         this.node = node;
52     }
53
54     public String getRelationship() {
55         return relationship;
56     }
57
58     public void setRelationship(String relationship) {
59         this.relationship = relationship;
60     }
61
62     public Object[] getOccurrences() {
63         return occurrences;
64     }
65
66     public void setOccurrences(Object[] occurrences) {
67         this.occurrences = occurrences;
68     }
69
70     @Override
71     public RequirementDefinition clone() {
72         RequirementDefinition requirementDefinition = new RequirementDefinition();
73         requirementDefinition.setNode(this.getNode());
74         requirementDefinition.setRelationship(this.getRelationship());
75         requirementDefinition.setCapability(this.getCapability());
76         requirementDefinition.setOccurrences(new Object[]{this.getOccurrences()[0], this.getOccurrences()[1]});
77         return requirementDefinition;
78     }
79 }