/
OTTopologyFragmentRefinementModel.java
95 lines (77 loc) · 3.55 KB
/
OTTopologyFragmentRefinementModel.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*******************************************************************************
<<<<<<< HEAD:org.eclipse.winery.model/org.eclipse.winery.model.tosca.xml/src/main/java/org/eclipse/winery/model/tosca/OTTopologyFragmentRefinementModel.java
* Copyright (c) 2018-2020 Contributors to the Eclipse Foundation
=======
* Copyright (c) 2019 Contributors to the Eclipse Foundation
>>>>>>> 4a8adcd16... Push xml-model into an xml subpackage to avoid naming collisions with canonical model:org.eclipse.winery.model/org.eclipse.winery.model.tosca.xml/src/main/java/org/eclipse/winery/model/tosca/xml/TPatternRefinementModel.java
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0, or the Apache Software License 2.0
* which is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
*******************************************************************************/
package org.eclipse.winery.model.tosca.xml;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "otTopologyFragmentRefinementModel")
public class OTTopologyFragmentRefinementModel extends OTRefinementModel {
@XmlElement(name = "RefinementStructure")
protected TTopologyTemplate refinementStructure;
@XmlElementWrapper(name = "AttributeMappings")
@XmlElement(name = "AttributeMapping")
protected List<OTAttributeMapping> attributeMappings;
@XmlElementWrapper(name = "StayMappings")
@XmlElement(name = "StayMapping")
protected List<OTStayMapping> stayMappings;
@XmlElementWrapper(name = "DeploymentArtifactMappings")
@XmlElement(name = "DeploymentArtifactMapping")
protected List<OTDeploymentArtifactMapping> deploymentArtifactMappings;
@NonNull
@XmlTransient
public TTopologyTemplate getRefinementTopology() {
if (refinementStructure == null) {
refinementStructure = new TTopologyTemplate();
}
return refinementStructure;
}
public TTopologyTemplate getRefinementStructure() {
return getRefinementTopology();
}
public void setRefinementTopology(TTopologyTemplate refinementStructure) {
this.refinementStructure = refinementStructure;
}
@Nullable
public List<OTAttributeMapping> getAttributeMappings() {
return attributeMappings;
}
public void setAttributeMappings(List<OTAttributeMapping> attributeMappings) {
this.attributeMappings = attributeMappings;
}
@Nullable
public List<OTStayMapping> getStayMappings() {
return stayMappings;
}
public void setStayMappings(List<OTStayMapping> stayMappings) {
this.stayMappings = stayMappings;
}
@Nullable
public List<OTDeploymentArtifactMapping> getDeploymentArtifactMappings() {
return deploymentArtifactMappings;
}
public void setDeploymentArtifactMappings(List<OTDeploymentArtifactMapping> deploymentArtifactMappings) {
this.deploymentArtifactMappings = deploymentArtifactMappings;
}
}