1 | /** |
2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
3 | * |
4 | * $Id$ |
5 | */ |
6 | package de.uka.ipd.sdq.pcm.usagemodel.util; |
7 | |
8 | import java.util.Map; |
9 | |
10 | import org.eclipse.emf.common.util.DiagnosticChain; |
11 | import org.eclipse.emf.common.util.ResourceLocator; |
12 | import org.eclipse.emf.ecore.EPackage; |
13 | import org.eclipse.emf.ecore.util.EObjectValidator; |
14 | |
15 | import de.uka.ipd.sdq.identifier.util.IdentifierValidator; |
16 | import de.uka.ipd.sdq.pcm.usagemodel.*; |
17 | import de.uka.ipd.sdq.pcm.usagemodel.AbstractUserAction; |
18 | import de.uka.ipd.sdq.pcm.usagemodel.Branch; |
19 | import de.uka.ipd.sdq.pcm.usagemodel.BranchTransition; |
20 | import de.uka.ipd.sdq.pcm.usagemodel.ClosedWorkload; |
21 | import de.uka.ipd.sdq.pcm.usagemodel.Delay; |
22 | import de.uka.ipd.sdq.pcm.usagemodel.EntryLevelSystemCall; |
23 | import de.uka.ipd.sdq.pcm.usagemodel.Loop; |
24 | import de.uka.ipd.sdq.pcm.usagemodel.OpenWorkload; |
25 | import de.uka.ipd.sdq.pcm.usagemodel.ScenarioBehaviour; |
26 | import de.uka.ipd.sdq.pcm.usagemodel.Start; |
27 | import de.uka.ipd.sdq.pcm.usagemodel.Stop; |
28 | import de.uka.ipd.sdq.pcm.usagemodel.UsageModel; |
29 | import de.uka.ipd.sdq.pcm.usagemodel.UsageScenario; |
30 | import de.uka.ipd.sdq.pcm.usagemodel.UsagemodelPackage; |
31 | import de.uka.ipd.sdq.pcm.usagemodel.UserData; |
32 | import de.uka.ipd.sdq.pcm.usagemodel.Workload; |
33 | |
34 | /** |
35 | * <!-- begin-user-doc --> |
36 | * The <b>Validator</b> for the model. |
37 | * <!-- end-user-doc --> |
38 | * @see de.uka.ipd.sdq.pcm.usagemodel.UsagemodelPackage |
39 | * @generated |
40 | */ |
41 | public class UsagemodelValidator extends EObjectValidator { |
42 | /** |
43 | * <!-- begin-user-doc --> |
44 | * <!-- end-user-doc --> |
45 | * @generated |
46 | */ |
47 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
48 | |
49 | /** |
50 | * The cached model package |
51 | * <!-- begin-user-doc --> |
52 | * <!-- end-user-doc --> |
53 | * @generated |
54 | */ |
55 | public static final UsagemodelValidator INSTANCE = new UsagemodelValidator(); |
56 | |
57 | /** |
58 | * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package. |
59 | * <!-- begin-user-doc --> |
60 | * <!-- end-user-doc --> |
61 | * @see org.eclipse.emf.common.util.Diagnostic#getSource() |
62 | * @see org.eclipse.emf.common.util.Diagnostic#getCode() |
63 | * @generated |
64 | */ |
65 | public static final String DIAGNOSTIC_SOURCE = "de.uka.ipd.sdq.pcm.usagemodel"; |
66 | |
67 | /** |
68 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Entry Level System Call Must Reference Provided Role Of ASystem' of 'Entry Level System Call'. |
69 | * <!-- begin-user-doc --> |
70 | * <!-- end-user-doc --> |
71 | * @generated |
72 | */ |
73 | public static final int ENTRY_LEVEL_SYSTEM_CALL__ENTRY_LEVEL_SYSTEM_CALL_MUST_REFERENCE_PROVIDED_ROLE_OF_ASYSTEM = 1; |
74 | |
75 | /** |
76 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Entry Level System Call Signature Must Match Its Provided Role' of 'Entry Level System Call'. |
77 | * <!-- begin-user-doc --> |
78 | * <!-- end-user-doc --> |
79 | * @generated |
80 | */ |
81 | public static final int ENTRY_LEVEL_SYSTEM_CALL__ENTRY_LEVEL_SYSTEM_CALL_SIGNATURE_MUST_MATCH_ITS_PROVIDED_ROLE = 2; |
82 | |
83 | /** |
84 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Exactlyonestart' of 'Scenario Behaviour'. |
85 | * <!-- begin-user-doc --> |
86 | * <!-- end-user-doc --> |
87 | * @generated |
88 | */ |
89 | public static final int SCENARIO_BEHAVIOUR__EXACTLYONESTART = 3; |
90 | |
91 | /** |
92 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Exactlyonestop' of 'Scenario Behaviour'. |
93 | * <!-- begin-user-doc --> |
94 | * <!-- end-user-doc --> |
95 | * @generated |
96 | */ |
97 | public static final int SCENARIO_BEHAVIOUR__EXACTLYONESTOP = 4; |
98 | |
99 | /** |
100 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Eachuseractionexcept Startand Stopmusthaveapredecessorandsuccessor' of 'Scenario Behaviour'. |
101 | * <!-- begin-user-doc --> |
102 | * <!-- end-user-doc --> |
103 | * @generated |
104 | */ |
105 | public static final int SCENARIO_BEHAVIOUR__EACHUSERACTIONEXCEPT_STARTAND_STOPMUSTHAVEAPREDECESSORANDSUCCESSOR = 5; |
106 | |
107 | /** |
108 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'All Branch Probabilities Must Sum Up To1' of 'Branch'. |
109 | * <!-- begin-user-doc --> |
110 | * <!-- end-user-doc --> |
111 | * @generated |
112 | */ |
113 | public static final int BRANCH__ALL_BRANCH_PROBABILITIES_MUST_SUM_UP_TO1 = 6; |
114 | |
115 | /** |
116 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Stop Has No Successor' of 'Stop'. |
117 | * <!-- begin-user-doc --> |
118 | * <!-- end-user-doc --> |
119 | * @generated |
120 | */ |
121 | public static final int STOP__STOP_HAS_NO_SUCCESSOR = 7; |
122 | |
123 | /** |
124 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Start Has No Predecessor' of 'Start'. |
125 | * <!-- begin-user-doc --> |
126 | * <!-- end-user-doc --> |
127 | * @generated |
128 | */ |
129 | public static final int START__START_HAS_NO_PREDECESSOR = 8; |
130 | |
131 | /** |
132 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Inter Arrival Time In Open Workload Needs To Be Specified' of 'Open Workload'. |
133 | * <!-- begin-user-doc --> |
134 | * <!-- end-user-doc --> |
135 | * @generated |
136 | */ |
137 | public static final int OPEN_WORKLOAD__INTER_ARRIVAL_TIME_IN_OPEN_WORKLOAD_NEEDS_TO_BE_SPECIFIED = 9; |
138 | |
139 | /** |
140 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Population In Closed Workload Needs To Be Specified' of 'Closed Workload'. |
141 | * <!-- begin-user-doc --> |
142 | * <!-- end-user-doc --> |
143 | * @generated |
144 | */ |
145 | public static final int CLOSED_WORKLOAD__POPULATION_IN_CLOSED_WORKLOAD_NEEDS_TO_BE_SPECIFIED = 10; |
146 | |
147 | /** |
148 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Think Time In Closed Workload Needs To Be Specified' of 'Closed Workload'. |
149 | * <!-- begin-user-doc --> |
150 | * <!-- end-user-doc --> |
151 | * @generated |
152 | */ |
153 | public static final int CLOSED_WORKLOAD__THINK_TIME_IN_CLOSED_WORKLOAD_NEEDS_TO_BE_SPECIFIED = 11; |
154 | |
155 | /** |
156 | * A constant with a fixed name that can be used as the base value for additional hand written constants. |
157 | * <!-- begin-user-doc --> |
158 | * <!-- end-user-doc --> |
159 | * @generated |
160 | */ |
161 | private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 11; |
162 | |
163 | /** |
164 | * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class. |
165 | * <!-- begin-user-doc --> |
166 | * <!-- end-user-doc --> |
167 | * @generated |
168 | */ |
169 | protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT; |
170 | |
171 | /** |
172 | * The cached base package validator. |
173 | * <!-- begin-user-doc --> |
174 | * <!-- end-user-doc --> |
175 | * @generated |
176 | */ |
177 | protected IdentifierValidator identifierValidator; |
178 | |
179 | /** |
180 | * Creates an instance of the switch. |
181 | * <!-- begin-user-doc --> |
182 | * <!-- end-user-doc --> |
183 | * @generated |
184 | */ |
185 | public UsagemodelValidator() { |
186 | super(); |
187 | identifierValidator = IdentifierValidator.INSTANCE; |
188 | } |
189 | |
190 | /** |
191 | * Returns the package of this validator switch. |
192 | * <!-- begin-user-doc --> |
193 | * <!-- end-user-doc --> |
194 | * @generated |
195 | */ |
196 | @Override |
197 | protected EPackage getEPackage() { |
198 | return UsagemodelPackage.eINSTANCE; |
199 | } |
200 | |
201 | /** |
202 | * Calls <code>validateXXX</code> for the corresponding classifier of the model. |
203 | * <!-- begin-user-doc --> |
204 | * <!-- end-user-doc --> |
205 | * @generated |
206 | */ |
207 | @Override |
208 | protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) { |
209 | switch (classifierID) { |
210 | case UsagemodelPackage.WORKLOAD: |
211 | return validateWorkload((Workload)value, diagnostics, context); |
212 | case UsagemodelPackage.USAGE_SCENARIO: |
213 | return validateUsageScenario((UsageScenario)value, diagnostics, context); |
214 | case UsagemodelPackage.USER_DATA: |
215 | return validateUserData((UserData)value, diagnostics, context); |
216 | case UsagemodelPackage.USAGE_MODEL: |
217 | return validateUsageModel((UsageModel)value, diagnostics, context); |
218 | case UsagemodelPackage.ENTRY_LEVEL_SYSTEM_CALL: |
219 | return validateEntryLevelSystemCall((EntryLevelSystemCall)value, diagnostics, context); |
220 | case UsagemodelPackage.ABSTRACT_USER_ACTION: |
221 | return validateAbstractUserAction((AbstractUserAction)value, diagnostics, context); |
222 | case UsagemodelPackage.SCENARIO_BEHAVIOUR: |
223 | return validateScenarioBehaviour((ScenarioBehaviour)value, diagnostics, context); |
224 | case UsagemodelPackage.BRANCH_TRANSITION: |
225 | return validateBranchTransition((BranchTransition)value, diagnostics, context); |
226 | case UsagemodelPackage.BRANCH: |
227 | return validateBranch((Branch)value, diagnostics, context); |
228 | case UsagemodelPackage.LOOP: |
229 | return validateLoop((Loop)value, diagnostics, context); |
230 | case UsagemodelPackage.STOP: |
231 | return validateStop((Stop)value, diagnostics, context); |
232 | case UsagemodelPackage.START: |
233 | return validateStart((Start)value, diagnostics, context); |
234 | case UsagemodelPackage.OPEN_WORKLOAD: |
235 | return validateOpenWorkload((OpenWorkload)value, diagnostics, context); |
236 | case UsagemodelPackage.DELAY: |
237 | return validateDelay((Delay)value, diagnostics, context); |
238 | case UsagemodelPackage.CLOSED_WORKLOAD: |
239 | return validateClosedWorkload((ClosedWorkload)value, diagnostics, context); |
240 | default: |
241 | return true; |
242 | } |
243 | } |
244 | |
245 | /** |
246 | * <!-- begin-user-doc --> |
247 | * <!-- end-user-doc --> |
248 | * @generated |
249 | */ |
250 | public boolean validateWorkload(Workload workload, DiagnosticChain diagnostics, Map<Object, Object> context) { |
251 | return validate_EveryDefaultConstraint(workload, diagnostics, context); |
252 | } |
253 | |
254 | /** |
255 | * <!-- begin-user-doc --> |
256 | * <!-- end-user-doc --> |
257 | * @generated |
258 | */ |
259 | public boolean validateUsageScenario(UsageScenario usageScenario, DiagnosticChain diagnostics, Map<Object, Object> context) { |
260 | boolean result = validate_EveryMultiplicityConforms(usageScenario, diagnostics, context); |
261 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(usageScenario, diagnostics, context); |
262 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(usageScenario, diagnostics, context); |
263 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(usageScenario, diagnostics, context); |
264 | if (result || diagnostics != null) result &= validate_UniqueID(usageScenario, diagnostics, context); |
265 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(usageScenario, diagnostics, context); |
266 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(usageScenario, diagnostics, context); |
267 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(usageScenario, diagnostics, context); |
268 | return result; |
269 | } |
270 | |
271 | /** |
272 | * <!-- begin-user-doc --> |
273 | * <!-- end-user-doc --> |
274 | * @generated |
275 | */ |
276 | public boolean validateScenarioBehaviour(ScenarioBehaviour scenarioBehaviour, DiagnosticChain diagnostics, Map<Object, Object> context) { |
277 | boolean result = validate_EveryMultiplicityConforms(scenarioBehaviour, diagnostics, context); |
278 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(scenarioBehaviour, diagnostics, context); |
279 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(scenarioBehaviour, diagnostics, context); |
280 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(scenarioBehaviour, diagnostics, context); |
281 | if (result || diagnostics != null) result &= validate_UniqueID(scenarioBehaviour, diagnostics, context); |
282 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(scenarioBehaviour, diagnostics, context); |
283 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(scenarioBehaviour, diagnostics, context); |
284 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(scenarioBehaviour, diagnostics, context); |
285 | if (result || diagnostics != null) result &= validateScenarioBehaviour_Exactlyonestart(scenarioBehaviour, diagnostics, context); |
286 | if (result || diagnostics != null) result &= validateScenarioBehaviour_Exactlyonestop(scenarioBehaviour, diagnostics, context); |
287 | if (result || diagnostics != null) result &= validateScenarioBehaviour_EachuseractionexceptStartandStopmusthaveapredecessorandsuccessor(scenarioBehaviour, diagnostics, context); |
288 | return result; |
289 | } |
290 | |
291 | /** |
292 | * Validates the Exactlyonestart constraint of '<em>Scenario Behaviour</em>'. |
293 | * <!-- begin-user-doc --> |
294 | * <!-- end-user-doc --> |
295 | * @generated |
296 | */ |
297 | public boolean validateScenarioBehaviour_Exactlyonestart(ScenarioBehaviour scenarioBehaviour, DiagnosticChain diagnostics, Map<Object, Object> context) { |
298 | return scenarioBehaviour.Exactlyonestart(diagnostics, context); |
299 | } |
300 | |
301 | /** |
302 | * Validates the Exactlyonestop constraint of '<em>Scenario Behaviour</em>'. |
303 | * <!-- begin-user-doc --> |
304 | * <!-- end-user-doc --> |
305 | * @generated |
306 | */ |
307 | public boolean validateScenarioBehaviour_Exactlyonestop(ScenarioBehaviour scenarioBehaviour, DiagnosticChain diagnostics, Map<Object, Object> context) { |
308 | return scenarioBehaviour.Exactlyonestop(diagnostics, context); |
309 | } |
310 | |
311 | /** |
312 | * Validates the EachuseractionexceptStartandStopmusthaveapredecessorandsuccessor constraint of '<em>Scenario Behaviour</em>'. |
313 | * <!-- begin-user-doc --> |
314 | * <!-- end-user-doc --> |
315 | * @generated |
316 | */ |
317 | public boolean validateScenarioBehaviour_EachuseractionexceptStartandStopmusthaveapredecessorandsuccessor(ScenarioBehaviour scenarioBehaviour, DiagnosticChain diagnostics, Map<Object, Object> context) { |
318 | return scenarioBehaviour.EachuseractionexceptStartandStopmusthaveapredecessorandsuccessor(diagnostics, context); |
319 | } |
320 | |
321 | /** |
322 | * <!-- begin-user-doc --> |
323 | * <!-- end-user-doc --> |
324 | * @generated |
325 | */ |
326 | public boolean validateAbstractUserAction(AbstractUserAction abstractUserAction, DiagnosticChain diagnostics, Map<Object, Object> context) { |
327 | boolean result = validate_EveryMultiplicityConforms(abstractUserAction, diagnostics, context); |
328 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(abstractUserAction, diagnostics, context); |
329 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(abstractUserAction, diagnostics, context); |
330 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(abstractUserAction, diagnostics, context); |
331 | if (result || diagnostics != null) result &= validate_UniqueID(abstractUserAction, diagnostics, context); |
332 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(abstractUserAction, diagnostics, context); |
333 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(abstractUserAction, diagnostics, context); |
334 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(abstractUserAction, diagnostics, context); |
335 | return result; |
336 | } |
337 | |
338 | /** |
339 | * <!-- begin-user-doc --> |
340 | * <!-- end-user-doc --> |
341 | * @generated |
342 | */ |
343 | public boolean validateBranchTransition(BranchTransition branchTransition, DiagnosticChain diagnostics, Map<Object, Object> context) { |
344 | return validate_EveryDefaultConstraint(branchTransition, diagnostics, context); |
345 | } |
346 | |
347 | /** |
348 | * <!-- begin-user-doc --> |
349 | * <!-- end-user-doc --> |
350 | * @generated |
351 | */ |
352 | public boolean validateBranch(Branch branch, DiagnosticChain diagnostics, Map<Object, Object> context) { |
353 | boolean result = validate_EveryMultiplicityConforms(branch, diagnostics, context); |
354 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(branch, diagnostics, context); |
355 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(branch, diagnostics, context); |
356 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(branch, diagnostics, context); |
357 | if (result || diagnostics != null) result &= validate_UniqueID(branch, diagnostics, context); |
358 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(branch, diagnostics, context); |
359 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(branch, diagnostics, context); |
360 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(branch, diagnostics, context); |
361 | if (result || diagnostics != null) result &= validateBranch_AllBranchProbabilitiesMustSumUpTo1(branch, diagnostics, context); |
362 | return result; |
363 | } |
364 | |
365 | /** |
366 | * Validates the AllBranchProbabilitiesMustSumUpTo1 constraint of '<em>Branch</em>'. |
367 | * <!-- begin-user-doc --> |
368 | * <!-- end-user-doc --> |
369 | * @generated |
370 | */ |
371 | public boolean validateBranch_AllBranchProbabilitiesMustSumUpTo1(Branch branch, DiagnosticChain diagnostics, Map<Object, Object> context) { |
372 | return branch.AllBranchProbabilitiesMustSumUpTo1(diagnostics, context); |
373 | } |
374 | |
375 | /** |
376 | * <!-- begin-user-doc --> |
377 | * <!-- end-user-doc --> |
378 | * @generated |
379 | */ |
380 | public boolean validateLoop(Loop loop, DiagnosticChain diagnostics, Map<Object, Object> context) { |
381 | boolean result = validate_EveryMultiplicityConforms(loop, diagnostics, context); |
382 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(loop, diagnostics, context); |
383 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(loop, diagnostics, context); |
384 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(loop, diagnostics, context); |
385 | if (result || diagnostics != null) result &= validate_UniqueID(loop, diagnostics, context); |
386 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(loop, diagnostics, context); |
387 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(loop, diagnostics, context); |
388 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(loop, diagnostics, context); |
389 | return result; |
390 | } |
391 | |
392 | /** |
393 | * <!-- begin-user-doc --> |
394 | * <!-- end-user-doc --> |
395 | * @generated |
396 | */ |
397 | public boolean validateUsageModel(UsageModel usageModel, DiagnosticChain diagnostics, Map<Object, Object> context) { |
398 | return validate_EveryDefaultConstraint(usageModel, diagnostics, context); |
399 | } |
400 | |
401 | /** |
402 | * <!-- begin-user-doc --> |
403 | * <!-- end-user-doc --> |
404 | * @generated |
405 | */ |
406 | public boolean validateStop(Stop stop, DiagnosticChain diagnostics, Map<Object, Object> context) { |
407 | boolean result = validate_EveryMultiplicityConforms(stop, diagnostics, context); |
408 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(stop, diagnostics, context); |
409 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(stop, diagnostics, context); |
410 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(stop, diagnostics, context); |
411 | if (result || diagnostics != null) result &= validate_UniqueID(stop, diagnostics, context); |
412 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(stop, diagnostics, context); |
413 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(stop, diagnostics, context); |
414 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(stop, diagnostics, context); |
415 | if (result || diagnostics != null) result &= validateStop_StopHasNoSuccessor(stop, diagnostics, context); |
416 | return result; |
417 | } |
418 | |
419 | /** |
420 | * Validates the StopHasNoSuccessor constraint of '<em>Stop</em>'. |
421 | * <!-- begin-user-doc --> |
422 | * <!-- end-user-doc --> |
423 | * @generated |
424 | */ |
425 | public boolean validateStop_StopHasNoSuccessor(Stop stop, DiagnosticChain diagnostics, Map<Object, Object> context) { |
426 | return stop.StopHasNoSuccessor(diagnostics, context); |
427 | } |
428 | |
429 | /** |
430 | * <!-- begin-user-doc --> |
431 | * <!-- end-user-doc --> |
432 | * @generated |
433 | */ |
434 | public boolean validateStart(Start start, DiagnosticChain diagnostics, Map<Object, Object> context) { |
435 | boolean result = validate_EveryMultiplicityConforms(start, diagnostics, context); |
436 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(start, diagnostics, context); |
437 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(start, diagnostics, context); |
438 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(start, diagnostics, context); |
439 | if (result || diagnostics != null) result &= validate_UniqueID(start, diagnostics, context); |
440 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(start, diagnostics, context); |
441 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(start, diagnostics, context); |
442 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(start, diagnostics, context); |
443 | if (result || diagnostics != null) result &= validateStart_StartHasNoPredecessor(start, diagnostics, context); |
444 | return result; |
445 | } |
446 | |
447 | /** |
448 | * Validates the StartHasNoPredecessor constraint of '<em>Start</em>'. |
449 | * <!-- begin-user-doc --> |
450 | * <!-- end-user-doc --> |
451 | * @generated |
452 | */ |
453 | public boolean validateStart_StartHasNoPredecessor(Start start, DiagnosticChain diagnostics, Map<Object, Object> context) { |
454 | return start.StartHasNoPredecessor(diagnostics, context); |
455 | } |
456 | |
457 | /** |
458 | * <!-- begin-user-doc --> |
459 | * <!-- end-user-doc --> |
460 | * @generated |
461 | */ |
462 | public boolean validateOpenWorkload(OpenWorkload openWorkload, DiagnosticChain diagnostics, Map<Object, Object> context) { |
463 | boolean result = validate_EveryMultiplicityConforms(openWorkload, diagnostics, context); |
464 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(openWorkload, diagnostics, context); |
465 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(openWorkload, diagnostics, context); |
466 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(openWorkload, diagnostics, context); |
467 | if (result || diagnostics != null) result &= validate_UniqueID(openWorkload, diagnostics, context); |
468 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(openWorkload, diagnostics, context); |
469 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(openWorkload, diagnostics, context); |
470 | if (result || diagnostics != null) result &= validateOpenWorkload_InterArrivalTimeInOpenWorkloadNeedsToBeSpecified(openWorkload, diagnostics, context); |
471 | return result; |
472 | } |
473 | |
474 | /** |
475 | * Validates the InterArrivalTimeInOpenWorkloadNeedsToBeSpecified constraint of '<em>Open Workload</em>'. |
476 | * <!-- begin-user-doc --> |
477 | * <!-- end-user-doc --> |
478 | * @generated |
479 | */ |
480 | public boolean validateOpenWorkload_InterArrivalTimeInOpenWorkloadNeedsToBeSpecified(OpenWorkload openWorkload, DiagnosticChain diagnostics, Map<Object, Object> context) { |
481 | return openWorkload.InterArrivalTimeInOpenWorkloadNeedsToBeSpecified(diagnostics, context); |
482 | } |
483 | |
484 | /** |
485 | * <!-- begin-user-doc --> |
486 | * <!-- end-user-doc --> |
487 | * @generated |
488 | */ |
489 | public boolean validateEntryLevelSystemCall(EntryLevelSystemCall entryLevelSystemCall, DiagnosticChain diagnostics, Map<Object, Object> context) { |
490 | boolean result = validate_EveryMultiplicityConforms(entryLevelSystemCall, diagnostics, context); |
491 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(entryLevelSystemCall, diagnostics, context); |
492 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(entryLevelSystemCall, diagnostics, context); |
493 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(entryLevelSystemCall, diagnostics, context); |
494 | if (result || diagnostics != null) result &= validate_UniqueID(entryLevelSystemCall, diagnostics, context); |
495 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(entryLevelSystemCall, diagnostics, context); |
496 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(entryLevelSystemCall, diagnostics, context); |
497 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(entryLevelSystemCall, diagnostics, context); |
498 | if (result || diagnostics != null) result &= validateEntryLevelSystemCall_EntryLevelSystemCallMustReferenceProvidedRoleOfASystem(entryLevelSystemCall, diagnostics, context); |
499 | if (result || diagnostics != null) result &= validateEntryLevelSystemCall_EntryLevelSystemCallSignatureMustMatchItsProvidedRole(entryLevelSystemCall, diagnostics, context); |
500 | return result; |
501 | } |
502 | |
503 | /** |
504 | * Validates the EntryLevelSystemCallMustReferenceProvidedRoleOfASystem constraint of '<em>Entry Level System Call</em>'. |
505 | * <!-- begin-user-doc --> |
506 | * <!-- end-user-doc --> |
507 | * @generated |
508 | */ |
509 | public boolean validateEntryLevelSystemCall_EntryLevelSystemCallMustReferenceProvidedRoleOfASystem(EntryLevelSystemCall entryLevelSystemCall, DiagnosticChain diagnostics, Map<Object, Object> context) { |
510 | return entryLevelSystemCall.EntryLevelSystemCallMustReferenceProvidedRoleOfASystem(diagnostics, context); |
511 | } |
512 | |
513 | /** |
514 | * Validates the EntryLevelSystemCallSignatureMustMatchItsProvidedRole constraint of '<em>Entry Level System Call</em>'. |
515 | * <!-- begin-user-doc --> |
516 | * <!-- end-user-doc --> |
517 | * @generated |
518 | */ |
519 | public boolean validateEntryLevelSystemCall_EntryLevelSystemCallSignatureMustMatchItsProvidedRole(EntryLevelSystemCall entryLevelSystemCall, DiagnosticChain diagnostics, Map<Object, Object> context) { |
520 | return entryLevelSystemCall.EntryLevelSystemCallSignatureMustMatchItsProvidedRole(diagnostics, context); |
521 | } |
522 | |
523 | /** |
524 | * <!-- begin-user-doc --> |
525 | * <!-- end-user-doc --> |
526 | * @generated |
527 | */ |
528 | public boolean validateClosedWorkload(ClosedWorkload closedWorkload, DiagnosticChain diagnostics, Map<Object, Object> context) { |
529 | boolean result = validate_EveryMultiplicityConforms(closedWorkload, diagnostics, context); |
530 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(closedWorkload, diagnostics, context); |
531 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(closedWorkload, diagnostics, context); |
532 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(closedWorkload, diagnostics, context); |
533 | if (result || diagnostics != null) result &= validate_UniqueID(closedWorkload, diagnostics, context); |
534 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(closedWorkload, diagnostics, context); |
535 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(closedWorkload, diagnostics, context); |
536 | if (result || diagnostics != null) result &= validateClosedWorkload_PopulationInClosedWorkloadNeedsToBeSpecified(closedWorkload, diagnostics, context); |
537 | if (result || diagnostics != null) result &= validateClosedWorkload_ThinkTimeInClosedWorkloadNeedsToBeSpecified(closedWorkload, diagnostics, context); |
538 | return result; |
539 | } |
540 | |
541 | /** |
542 | * Validates the PopulationInClosedWorkloadNeedsToBeSpecified constraint of '<em>Closed Workload</em>'. |
543 | * <!-- begin-user-doc --> |
544 | * <!-- end-user-doc --> |
545 | * @generated |
546 | */ |
547 | public boolean validateClosedWorkload_PopulationInClosedWorkloadNeedsToBeSpecified(ClosedWorkload closedWorkload, DiagnosticChain diagnostics, Map<Object, Object> context) { |
548 | return closedWorkload.PopulationInClosedWorkloadNeedsToBeSpecified(diagnostics, context); |
549 | } |
550 | |
551 | /** |
552 | * Validates the ThinkTimeInClosedWorkloadNeedsToBeSpecified constraint of '<em>Closed Workload</em>'. |
553 | * <!-- begin-user-doc --> |
554 | * <!-- end-user-doc --> |
555 | * @generated |
556 | */ |
557 | public boolean validateClosedWorkload_ThinkTimeInClosedWorkloadNeedsToBeSpecified(ClosedWorkload closedWorkload, DiagnosticChain diagnostics, Map<Object, Object> context) { |
558 | return closedWorkload.ThinkTimeInClosedWorkloadNeedsToBeSpecified(diagnostics, context); |
559 | } |
560 | |
561 | /** |
562 | * Returns the resource locator that will be used to fetch messages for this validator's diagnostics. |
563 | * <!-- begin-user-doc --> |
564 | * <!-- end-user-doc --> |
565 | * @generated |
566 | */ |
567 | @Override |
568 | public ResourceLocator getResourceLocator() { |
569 | // TODO |
570 | // Specialize this to return a resource locator for messages specific to this validator. |
571 | // Ensure that you remove @generated or mark it @generated NOT |
572 | return super.getResourceLocator(); |
573 | } |
574 | |
575 | /** |
576 | * <!-- begin-user-doc --> |
577 | * <!-- end-user-doc --> |
578 | * @generated |
579 | */ |
580 | public boolean validateDelay(Delay delay, DiagnosticChain diagnostics, Map<Object, Object> context) { |
581 | boolean result = validate_EveryMultiplicityConforms(delay, diagnostics, context); |
582 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(delay, diagnostics, context); |
583 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(delay, diagnostics, context); |
584 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(delay, diagnostics, context); |
585 | if (result || diagnostics != null) result &= validate_UniqueID(delay, diagnostics, context); |
586 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(delay, diagnostics, context); |
587 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(delay, diagnostics, context); |
588 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(delay, diagnostics, context); |
589 | return result; |
590 | } |
591 | |
592 | /** |
593 | * <!-- begin-user-doc --> |
594 | * <!-- end-user-doc --> |
595 | * @generated |
596 | */ |
597 | public boolean validateUserData(UserData userData, DiagnosticChain diagnostics, Map<Object, Object> context) { |
598 | return validate_EveryDefaultConstraint(userData, diagnostics, context); |
599 | } |
600 | |
601 | } //UsagemodelValidator |