1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package com.finalist.mmbase.uml;
16
17 import org.omg.uml.foundation.core.ModelElement;
18
19 /***
20 * Value object that models all MMbase relations define in UML.
21 * Both dependencies and associations are supported.
22 *
23 * Copyright 2003 Finalist IT-Group -- all rights reserved
24 *
25 * @author Kors van Beem.
26 * @version $Revision: 1.3 $, $Date: 2004/10/23 08:54:39 $
27 *
28 */
29 public class MMBaseRelationVo {
30
31 private String type;
32 private String sourceName;
33 private String targetName;
34 private String sourceCardinalityLower;
35 private String sourceCardinalityUpper;
36 private String targetCardinalityLower;
37 private String targetCardinalityUpper;
38 private String directed;
39 private String targetRoleName;
40 private ModelElement targetModelElement;
41
42 /***
43 * The constructor
44 *
45 * @param type Stereotype on an attribute.
46 * @param sourceName Classname on sourceside of the relation.
47 * @param targetName Classname on targetside of the relation.
48 * @param sourceCardinalityLower Minimum cardinality on the sourceside of the relation.
49 * @param sourceCardinalityUpper Maximum cardinality on the sourceside of the relation.
50 * @param targetCardinalityLower Minimum cardinality on the targetside of the relation.
51 * @param targetCardinalityUpper Maximum cardinality on the targetside of the relation.
52 * @param directed Defines if the relation is directed or undirected.
53 * @param targetRoleName Contains the role of the association.
54 * @param targetModelElement Contains a link to the modelElement on the otherside of the relation.
55
56 */
57 public MMBaseRelationVo (String type,
58 String sourceName,
59 String targetName,
60 String sourceCardinalityLower,
61 String sourceCardinalityUpper,
62 String targetCardinalityLower,
63 String targetCardinalityUpper,
64 String directed,
65 String targetRoleName,
66 ModelElement targetModelElement) {
67
68 this.type = type;
69 this.sourceName = sourceName;
70 this.targetName = targetName;
71 this.sourceCardinalityLower = sourceCardinalityLower;
72 this.sourceCardinalityUpper = sourceCardinalityUpper;
73 this.targetCardinalityLower = targetCardinalityLower;
74 this.targetCardinalityUpper = targetCardinalityUpper;
75 this.directed = directed;
76 this.targetRoleName = targetRoleName;
77 this.targetModelElement = targetModelElement;
78 }
79
80 /***
81 * Getter of the type.
82 * @return the type.
83 */
84 public String getType() {
85 return type;
86 }
87
88 /***
89 * Setter of the stereo type.
90 * @param type the stereotype
91 */
92 public void setType(String type) {
93 this.type = type;
94 }
95
96 /***
97 * Getter of the sourcename.
98 * @return the sourceName.
99 */
100 public String getSourceName() {
101 return sourceName;
102 }
103
104 /***
105 * Setter of the sourcename.
106 * @param sourceName the sourceName
107 */
108 public void setSourceName(String sourceName) {
109 this.sourceName = sourceName;
110 }
111
112 /***
113 * Getter of the targetname.
114 * @return the targetName.
115 */
116 public String getTargetName() {
117 return targetName;
118 }
119
120 /***
121 * Setter of the targetname.
122 * @param targetName the targetName
123 */
124 public void setTargetName(String targetName) {
125 this.targetName = targetName;
126 }
127
128 /***
129 * Getter of the sourceCardinalityLower.
130 * @return the sourceCardinalityLower.
131 */
132 public String getSourceCardinalityLower() {
133 return sourceCardinalityLower;
134 }
135
136 /***
137 * Setter of the sourceCardinalityLower.
138 * @param sourceCardinalityLower the sourceCardinalityLower
139 */
140 public void setSourceCardinalityLower(String sourceCardinalityLower) {
141 this.sourceCardinalityLower = sourceCardinalityLower;
142 }
143
144 /***
145 * Getter of the sourceCardinalityUpper.
146 * @return the sourceCardinalityUpper.
147 */
148 public String getSourceCardinalityUpper() {
149 return sourceCardinalityUpper;
150 }
151
152 /***
153 * Setter of the sourceCardinalityUpper.
154 * @param sourceCardinalityUpper the sourceCardinalityUpper
155 */
156 public void setSourceCardinalityUpper(String sourceCardinalityUpper) {
157 this.sourceCardinalityUpper = sourceCardinalityUpper;
158 }
159
160 /***
161 * Getter of the targetCardinalityLower.
162 * @return the targetCardinalityLower.
163 */
164 public String getTargetCardinalityLower() {
165 return targetCardinalityLower;
166 }
167
168 /***
169 * Setter of the targetCardinalityLower.
170 * @param targetCardinalityLower the targetCardinalityLower
171 */
172 public void setTargetCardinalityLower(String targetCardinalityLower) {
173 this.targetCardinalityLower = targetCardinalityLower;
174 }
175
176 /***
177 * Getter of the targetCardinalityUpper.
178 * @return the targetCardinalityUpper.
179 */
180 public String getTargetCardinalityUpper() {
181 return targetCardinalityUpper;
182 }
183
184 /***
185 * Setter of the targetCardinalityUpper.
186 * @param targetCardinalityUpper the targetCardinalityUpper
187 */
188 public void setTargetCardinalityUpper(String targetCardinalityUpper) {
189 this.targetCardinalityUpper = targetCardinalityUpper;
190 }
191
192 /***
193 * Getter of the directed value.
194 * @return the directed value.
195 */
196 public String getDirected() {
197 return directed;
198 }
199
200 /***
201 * Setter of the directed.
202 * @param directed the directed value
203 */
204 public void setDirected(String directed) {
205 this.directed = directed;
206 }
207
208 /***
209 * Getter of the targetRoleName value.
210 * @return the targetRoleName value.
211 */
212 public String getTargetRoleName() {
213 return targetRoleName;
214 }
215
216 /***
217 * Setter of the targetRoleName.
218 * @param targetRoleName the targetRoleName value
219 */
220 public void setTargetRoleName(String targetRoleName) {
221 this.targetRoleName = targetRoleName;
222 }
223
224 /***
225 * Getter of the target object.
226 * @return An object of the UMLAssociationEnd class.
227 */
228 public ModelElement getTargetModelElement() {
229 return targetModelElement;
230 }
231
232 /***
233 * Setter of the targetModelElement.
234 * @param targetModelElement the targetModelElement
235 */
236 public void setTargetModelElement(ModelElement targetModelElement) {
237 this.targetModelElement = targetModelElement;
238 }
239
240 }