1 | /** |
2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
3 | * |
4 | * $Id$ |
5 | */ |
6 | package de.uka.ipd.sdq.pcm.core.composition.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.core.composition.*; |
17 | import de.uka.ipd.sdq.pcm.core.composition.AssemblyConnector; |
18 | import de.uka.ipd.sdq.pcm.core.composition.AssemblyContext; |
19 | import de.uka.ipd.sdq.pcm.core.composition.AssemblyEventConnector; |
20 | import de.uka.ipd.sdq.pcm.core.composition.AssemblyInfrastructureConnector; |
21 | import de.uka.ipd.sdq.pcm.core.composition.ComposedStructure; |
22 | import de.uka.ipd.sdq.pcm.core.composition.CompositionPackage; |
23 | import de.uka.ipd.sdq.pcm.core.composition.Connector; |
24 | import de.uka.ipd.sdq.pcm.core.composition.DelegationConnector; |
25 | import de.uka.ipd.sdq.pcm.core.composition.EventChannel; |
26 | import de.uka.ipd.sdq.pcm.core.composition.EventChannelSinkConnector; |
27 | import de.uka.ipd.sdq.pcm.core.composition.EventChannelSourceConnector; |
28 | import de.uka.ipd.sdq.pcm.core.composition.ProvidedDelegationConnector; |
29 | import de.uka.ipd.sdq.pcm.core.composition.ProvidedInfrastructureDelegationConnector; |
30 | import de.uka.ipd.sdq.pcm.core.composition.RequiredDelegationConnector; |
31 | import de.uka.ipd.sdq.pcm.core.composition.RequiredInfrastructureDelegationConnector; |
32 | import de.uka.ipd.sdq.pcm.core.composition.RequiredResourceDelegationConnector; |
33 | import de.uka.ipd.sdq.pcm.core.composition.ResourceRequiredDelegationConnector; |
34 | import de.uka.ipd.sdq.pcm.core.composition.SinkDelegationConnector; |
35 | import de.uka.ipd.sdq.pcm.core.composition.SourceDelegationConnector; |
36 | |
37 | /** |
38 | * <!-- begin-user-doc --> |
39 | * The <b>Validator</b> for the model. |
40 | * <!-- end-user-doc --> |
41 | * @see de.uka.ipd.sdq.pcm.core.composition.CompositionPackage |
42 | * @generated |
43 | */ |
44 | public class CompositionValidator extends EObjectValidator { |
45 | /** |
46 | * <!-- begin-user-doc --> |
47 | * <!-- end-user-doc --> |
48 | * @generated |
49 | */ |
50 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
51 | |
52 | /** |
53 | * The cached model package |
54 | * <!-- begin-user-doc --> |
55 | * <!-- end-user-doc --> |
56 | * @generated |
57 | */ |
58 | public static final CompositionValidator INSTANCE = new CompositionValidator(); |
59 | |
60 | /** |
61 | * 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. |
62 | * <!-- begin-user-doc --> |
63 | * <!-- end-user-doc --> |
64 | * @see org.eclipse.emf.common.util.Diagnostic#getSource() |
65 | * @see org.eclipse.emf.common.util.Diagnostic#getCode() |
66 | * @generated |
67 | */ |
68 | public static final String DIAGNOSTIC_SOURCE = "de.uka.ipd.sdq.pcm.core.composition"; |
69 | |
70 | /** |
71 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Provided Delegation Connectorandtheconnected Componentmustbepartofthesamecompositestructure' of 'Provided Delegation Connector'. |
72 | * <!-- begin-user-doc --> |
73 | * <!-- end-user-doc --> |
74 | * @generated |
75 | */ |
76 | public static final int PROVIDED_DELEGATION_CONNECTOR__PROVIDED_DELEGATION_CONNECTORANDTHECONNECTED_COMPONENTMUSTBEPARTOFTHESAMECOMPOSITESTRUCTURE = 3; |
77 | |
78 | /** |
79 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Component Of Assembly Context And Inner Role Providing Component Need To Be The Same' of 'Provided Delegation Connector'. |
80 | * <!-- begin-user-doc --> |
81 | * <!-- end-user-doc --> |
82 | * @generated |
83 | */ |
84 | public static final int PROVIDED_DELEGATION_CONNECTOR__COMPONENT_OF_ASSEMBLY_CONTEXT_AND_INNER_ROLE_PROVIDING_COMPONENT_NEED_TO_BE_THE_SAME = 4; |
85 | |
86 | /** |
87 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Required Delegation Connectorandtheconnected Componentmustbepartofthesamecompositestructure' of 'Required Delegation Connector'. |
88 | * <!-- begin-user-doc --> |
89 | * <!-- end-user-doc --> |
90 | * @generated |
91 | */ |
92 | public static final int REQUIRED_DELEGATION_CONNECTOR__REQUIRED_DELEGATION_CONNECTORANDTHECONNECTED_COMPONENTMUSTBEPARTOFTHESAMECOMPOSITESTRUCTURE = 5; |
93 | |
94 | /** |
95 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Component Of Assembly Context And Inner Role Requiring Component Need To Be The Same' of 'Required Delegation Connector'. |
96 | * <!-- begin-user-doc --> |
97 | * <!-- end-user-doc --> |
98 | * @generated |
99 | */ |
100 | public static final int REQUIRED_DELEGATION_CONNECTOR__COMPONENT_OF_ASSEMBLY_CONTEXT_AND_INNER_ROLE_REQUIRING_COMPONENT_NEED_TO_BE_THE_SAME = 6; |
101 | |
102 | /** |
103 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Requiring Entity Of Outer Required Role Must Be The Same As The Parent Of The Required Delegation Connector' of 'Required Delegation Connector'. |
104 | * <!-- begin-user-doc --> |
105 | * <!-- end-user-doc --> |
106 | * @generated |
107 | */ |
108 | public static final int REQUIRED_DELEGATION_CONNECTOR__REQUIRING_ENTITY_OF_OUTER_REQUIRED_ROLE_MUST_BE_THE_SAME_AS_THE_PARENT_OF_THE_REQUIRED_DELEGATION_CONNECTOR = 7; |
109 | |
110 | /** |
111 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Assembly Connectors Referenced Provided Roles And Child Context Must Match' of 'Assembly Connector'. |
112 | * <!-- begin-user-doc --> |
113 | * <!-- end-user-doc --> |
114 | * @generated |
115 | */ |
116 | public static final int ASSEMBLY_CONNECTOR__ASSEMBLY_CONNECTORS_REFERENCED_PROVIDED_ROLES_AND_CHILD_CONTEXT_MUST_MATCH = 8; |
117 | |
118 | /** |
119 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Assembly Connectors Referenced Required Role And Child Context Must Match' of 'Assembly Connector'. |
120 | * <!-- begin-user-doc --> |
121 | * <!-- end-user-doc --> |
122 | * @generated |
123 | */ |
124 | public static final int ASSEMBLY_CONNECTOR__ASSEMBLY_CONNECTORS_REFERENCED_REQUIRED_ROLE_AND_CHILD_CONTEXT_MUST_MATCH = 9; |
125 | |
126 | /** |
127 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Assembly Connectors Referenced Interfaces Must Match' of 'Assembly Connector'. |
128 | * <!-- begin-user-doc --> |
129 | * <!-- end-user-doc --> |
130 | * @generated |
131 | */ |
132 | public static final int ASSEMBLY_CONNECTOR__ASSEMBLY_CONNECTORS_REFERENCED_INTERFACES_MUST_MATCH = 10; |
133 | |
134 | /** |
135 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Multiple Connectors Constraint' of 'Composed Structure'. |
136 | * <!-- begin-user-doc --> |
137 | * <!-- end-user-doc --> |
138 | * @generated |
139 | */ |
140 | public static final int COMPOSED_STRUCTURE__MULTIPLE_CONNECTORS_CONSTRAINT = 1; |
141 | |
142 | /** |
143 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Multiple Connectors Constraint For Assembly Connectors' of 'Composed Structure'. |
144 | * <!-- begin-user-doc --> |
145 | * <!-- end-user-doc --> |
146 | * @generated |
147 | */ |
148 | public static final int COMPOSED_STRUCTURE__MULTIPLE_CONNECTORS_CONSTRAINT_FOR_ASSEMBLY_CONNECTORS = 2; |
149 | |
150 | /** |
151 | * A constant with a fixed name that can be used as the base value for additional hand written constants. |
152 | * <!-- begin-user-doc --> |
153 | * <!-- end-user-doc --> |
154 | * @generated |
155 | */ |
156 | private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 10; |
157 | |
158 | /** |
159 | * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class. |
160 | * <!-- begin-user-doc --> |
161 | * <!-- end-user-doc --> |
162 | * @generated |
163 | */ |
164 | protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT; |
165 | |
166 | /** |
167 | * The cached base package validator. |
168 | * <!-- begin-user-doc --> |
169 | * <!-- end-user-doc --> |
170 | * @generated |
171 | */ |
172 | protected IdentifierValidator identifierValidator; |
173 | |
174 | /** |
175 | * Creates an instance of the switch. |
176 | * <!-- begin-user-doc --> |
177 | * <!-- end-user-doc --> |
178 | * @generated |
179 | */ |
180 | public CompositionValidator() { |
181 | super(); |
182 | identifierValidator = IdentifierValidator.INSTANCE; |
183 | } |
184 | |
185 | /** |
186 | * Returns the package of this validator switch. |
187 | * <!-- begin-user-doc --> |
188 | * <!-- end-user-doc --> |
189 | * @generated |
190 | */ |
191 | @Override |
192 | protected EPackage getEPackage() { |
193 | return CompositionPackage.eINSTANCE; |
194 | } |
195 | |
196 | /** |
197 | * Calls <code>validateXXX</code> for the corresponding classifier of the model. |
198 | * <!-- begin-user-doc --> |
199 | * <!-- end-user-doc --> |
200 | * @generated |
201 | */ |
202 | @Override |
203 | protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) { |
204 | switch (classifierID) { |
205 | case CompositionPackage.DELEGATION_CONNECTOR: |
206 | return validateDelegationConnector((DelegationConnector)value, diagnostics, context); |
207 | case CompositionPackage.CONNECTOR: |
208 | return validateConnector((Connector)value, diagnostics, context); |
209 | case CompositionPackage.COMPOSED_STRUCTURE: |
210 | return validateComposedStructure((ComposedStructure)value, diagnostics, context); |
211 | case CompositionPackage.RESOURCE_REQUIRED_DELEGATION_CONNECTOR: |
212 | return validateResourceRequiredDelegationConnector((ResourceRequiredDelegationConnector)value, diagnostics, context); |
213 | case CompositionPackage.EVENT_CHANNEL: |
214 | return validateEventChannel((EventChannel)value, diagnostics, context); |
215 | case CompositionPackage.EVENT_CHANNEL_SOURCE_CONNECTOR: |
216 | return validateEventChannelSourceConnector((EventChannelSourceConnector)value, diagnostics, context); |
217 | case CompositionPackage.EVENT_CHANNEL_SINK_CONNECTOR: |
218 | return validateEventChannelSinkConnector((EventChannelSinkConnector)value, diagnostics, context); |
219 | case CompositionPackage.PROVIDED_DELEGATION_CONNECTOR: |
220 | return validateProvidedDelegationConnector((ProvidedDelegationConnector)value, diagnostics, context); |
221 | case CompositionPackage.REQUIRED_DELEGATION_CONNECTOR: |
222 | return validateRequiredDelegationConnector((RequiredDelegationConnector)value, diagnostics, context); |
223 | case CompositionPackage.ASSEMBLY_CONNECTOR: |
224 | return validateAssemblyConnector((AssemblyConnector)value, diagnostics, context); |
225 | case CompositionPackage.ASSEMBLY_EVENT_CONNECTOR: |
226 | return validateAssemblyEventConnector((AssemblyEventConnector)value, diagnostics, context); |
227 | case CompositionPackage.SOURCE_DELEGATION_CONNECTOR: |
228 | return validateSourceDelegationConnector((SourceDelegationConnector)value, diagnostics, context); |
229 | case CompositionPackage.SINK_DELEGATION_CONNECTOR: |
230 | return validateSinkDelegationConnector((SinkDelegationConnector)value, diagnostics, context); |
231 | case CompositionPackage.ASSEMBLY_INFRASTRUCTURE_CONNECTOR: |
232 | return validateAssemblyInfrastructureConnector((AssemblyInfrastructureConnector)value, diagnostics, context); |
233 | case CompositionPackage.PROVIDED_INFRASTRUCTURE_DELEGATION_CONNECTOR: |
234 | return validateProvidedInfrastructureDelegationConnector((ProvidedInfrastructureDelegationConnector)value, diagnostics, context); |
235 | case CompositionPackage.REQUIRED_INFRASTRUCTURE_DELEGATION_CONNECTOR: |
236 | return validateRequiredInfrastructureDelegationConnector((RequiredInfrastructureDelegationConnector)value, diagnostics, context); |
237 | case CompositionPackage.REQUIRED_RESOURCE_DELEGATION_CONNECTOR: |
238 | return validateRequiredResourceDelegationConnector((RequiredResourceDelegationConnector)value, diagnostics, context); |
239 | case CompositionPackage.ASSEMBLY_CONTEXT: |
240 | return validateAssemblyContext((AssemblyContext)value, diagnostics, context); |
241 | default: |
242 | return true; |
243 | } |
244 | } |
245 | |
246 | /** |
247 | * <!-- begin-user-doc --> |
248 | * <!-- end-user-doc --> |
249 | * @generated |
250 | */ |
251 | public boolean validateDelegationConnector(DelegationConnector delegationConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
252 | boolean result = validate_EveryMultiplicityConforms(delegationConnector, diagnostics, context); |
253 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(delegationConnector, diagnostics, context); |
254 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(delegationConnector, diagnostics, context); |
255 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(delegationConnector, diagnostics, context); |
256 | if (result || diagnostics != null) result &= validate_UniqueID(delegationConnector, diagnostics, context); |
257 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(delegationConnector, diagnostics, context); |
258 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(delegationConnector, diagnostics, context); |
259 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(delegationConnector, diagnostics, context); |
260 | return result; |
261 | } |
262 | |
263 | /** |
264 | * <!-- begin-user-doc --> |
265 | * <!-- end-user-doc --> |
266 | * @generated |
267 | */ |
268 | public boolean validateConnector(Connector connector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
269 | boolean result = validate_EveryMultiplicityConforms(connector, diagnostics, context); |
270 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(connector, diagnostics, context); |
271 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(connector, diagnostics, context); |
272 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(connector, diagnostics, context); |
273 | if (result || diagnostics != null) result &= validate_UniqueID(connector, diagnostics, context); |
274 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(connector, diagnostics, context); |
275 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(connector, diagnostics, context); |
276 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(connector, diagnostics, context); |
277 | return result; |
278 | } |
279 | |
280 | /** |
281 | * <!-- begin-user-doc --> |
282 | * <!-- end-user-doc --> |
283 | * @generated |
284 | */ |
285 | public boolean validateProvidedDelegationConnector(ProvidedDelegationConnector providedDelegationConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
286 | boolean result = validate_EveryMultiplicityConforms(providedDelegationConnector, diagnostics, context); |
287 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(providedDelegationConnector, diagnostics, context); |
288 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(providedDelegationConnector, diagnostics, context); |
289 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(providedDelegationConnector, diagnostics, context); |
290 | if (result || diagnostics != null) result &= validate_UniqueID(providedDelegationConnector, diagnostics, context); |
291 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(providedDelegationConnector, diagnostics, context); |
292 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(providedDelegationConnector, diagnostics, context); |
293 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(providedDelegationConnector, diagnostics, context); |
294 | if (result || diagnostics != null) result &= validateProvidedDelegationConnector_ProvidedDelegationConnectorandtheconnectedComponentmustbepartofthesamecompositestructure(providedDelegationConnector, diagnostics, context); |
295 | if (result || diagnostics != null) result &= validateProvidedDelegationConnector_ComponentOfAssemblyContextAndInnerRoleProvidingComponentNeedToBeTheSame(providedDelegationConnector, diagnostics, context); |
296 | return result; |
297 | } |
298 | |
299 | /** |
300 | * Validates the ProvidedDelegationConnectorandtheconnectedComponentmustbepartofthesamecompositestructure constraint of '<em>Provided Delegation Connector</em>'. |
301 | * <!-- begin-user-doc --> |
302 | * <!-- end-user-doc --> |
303 | * @generated |
304 | */ |
305 | public boolean validateProvidedDelegationConnector_ProvidedDelegationConnectorandtheconnectedComponentmustbepartofthesamecompositestructure(ProvidedDelegationConnector providedDelegationConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
306 | return providedDelegationConnector.ProvidedDelegationConnectorandtheconnectedComponentmustbepartofthesamecompositestructure(diagnostics, context); |
307 | } |
308 | |
309 | /** |
310 | * Validates the ComponentOfAssemblyContextAndInnerRoleProvidingComponentNeedToBeTheSame constraint of '<em>Provided Delegation Connector</em>'. |
311 | * <!-- begin-user-doc --> |
312 | * <!-- end-user-doc --> |
313 | * @generated |
314 | */ |
315 | public boolean validateProvidedDelegationConnector_ComponentOfAssemblyContextAndInnerRoleProvidingComponentNeedToBeTheSame(ProvidedDelegationConnector providedDelegationConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
316 | return providedDelegationConnector.ComponentOfAssemblyContextAndInnerRoleProvidingComponentNeedToBeTheSame(diagnostics, context); |
317 | } |
318 | |
319 | /** |
320 | * <!-- begin-user-doc --> |
321 | * <!-- end-user-doc --> |
322 | * @generated |
323 | */ |
324 | public boolean validateAssemblyContext(AssemblyContext assemblyContext, DiagnosticChain diagnostics, Map<Object, Object> context) { |
325 | boolean result = validate_EveryMultiplicityConforms(assemblyContext, diagnostics, context); |
326 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(assemblyContext, diagnostics, context); |
327 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(assemblyContext, diagnostics, context); |
328 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(assemblyContext, diagnostics, context); |
329 | if (result || diagnostics != null) result &= validate_UniqueID(assemblyContext, diagnostics, context); |
330 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(assemblyContext, diagnostics, context); |
331 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(assemblyContext, diagnostics, context); |
332 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(assemblyContext, diagnostics, context); |
333 | return result; |
334 | } |
335 | |
336 | /** |
337 | * Returns the resource locator that will be used to fetch messages for this validator's diagnostics. |
338 | * <!-- begin-user-doc --> |
339 | * <!-- end-user-doc --> |
340 | * @generated |
341 | */ |
342 | @Override |
343 | public ResourceLocator getResourceLocator() { |
344 | // TODO |
345 | // Specialize this to return a resource locator for messages specific to this validator. |
346 | // Ensure that you remove @generated or mark it @generated NOT |
347 | return super.getResourceLocator(); |
348 | } |
349 | |
350 | /** |
351 | * <!-- begin-user-doc --> |
352 | * <!-- end-user-doc --> |
353 | * @generated |
354 | */ |
355 | public boolean validateRequiredDelegationConnector(RequiredDelegationConnector requiredDelegationConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
356 | boolean result = validate_EveryMultiplicityConforms(requiredDelegationConnector, diagnostics, context); |
357 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(requiredDelegationConnector, diagnostics, context); |
358 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(requiredDelegationConnector, diagnostics, context); |
359 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(requiredDelegationConnector, diagnostics, context); |
360 | if (result || diagnostics != null) result &= validate_UniqueID(requiredDelegationConnector, diagnostics, context); |
361 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(requiredDelegationConnector, diagnostics, context); |
362 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(requiredDelegationConnector, diagnostics, context); |
363 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(requiredDelegationConnector, diagnostics, context); |
364 | if (result || diagnostics != null) result &= validateRequiredDelegationConnector_RequiredDelegationConnectorandtheconnectedComponentmustbepartofthesamecompositestructure(requiredDelegationConnector, diagnostics, context); |
365 | if (result || diagnostics != null) result &= validateRequiredDelegationConnector_ComponentOfAssemblyContextAndInnerRoleRequiringComponentNeedToBeTheSame(requiredDelegationConnector, diagnostics, context); |
366 | if (result || diagnostics != null) result &= validateRequiredDelegationConnector_RequiringEntityOfOuterRequiredRoleMustBeTheSameAsTheParentOfTheRequiredDelegationConnector(requiredDelegationConnector, diagnostics, context); |
367 | return result; |
368 | } |
369 | |
370 | /** |
371 | * Validates the RequiredDelegationConnectorandtheconnectedComponentmustbepartofthesamecompositestructure constraint of '<em>Required Delegation Connector</em>'. |
372 | * <!-- begin-user-doc --> |
373 | * <!-- end-user-doc --> |
374 | * @generated |
375 | */ |
376 | public boolean validateRequiredDelegationConnector_RequiredDelegationConnectorandtheconnectedComponentmustbepartofthesamecompositestructure(RequiredDelegationConnector requiredDelegationConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
377 | return requiredDelegationConnector.RequiredDelegationConnectorandtheconnectedComponentmustbepartofthesamecompositestructure(diagnostics, context); |
378 | } |
379 | |
380 | /** |
381 | * Validates the ComponentOfAssemblyContextAndInnerRoleRequiringComponentNeedToBeTheSame constraint of '<em>Required Delegation Connector</em>'. |
382 | * <!-- begin-user-doc --> |
383 | * <!-- end-user-doc --> |
384 | * @generated |
385 | */ |
386 | public boolean validateRequiredDelegationConnector_ComponentOfAssemblyContextAndInnerRoleRequiringComponentNeedToBeTheSame(RequiredDelegationConnector requiredDelegationConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
387 | return requiredDelegationConnector.ComponentOfAssemblyContextAndInnerRoleRequiringComponentNeedToBeTheSame(diagnostics, context); |
388 | } |
389 | |
390 | /** |
391 | * Validates the RequiringEntityOfOuterRequiredRoleMustBeTheSameAsTheParentOfTheRequiredDelegationConnector constraint of '<em>Required Delegation Connector</em>'. |
392 | * <!-- begin-user-doc --> |
393 | * <!-- end-user-doc --> |
394 | * @generated |
395 | */ |
396 | public boolean validateRequiredDelegationConnector_RequiringEntityOfOuterRequiredRoleMustBeTheSameAsTheParentOfTheRequiredDelegationConnector(RequiredDelegationConnector requiredDelegationConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
397 | return requiredDelegationConnector.RequiringEntityOfOuterRequiredRoleMustBeTheSameAsTheParentOfTheRequiredDelegationConnector(diagnostics, context); |
398 | } |
399 | |
400 | /** |
401 | * <!-- begin-user-doc --> |
402 | * <!-- end-user-doc --> |
403 | * @generated |
404 | */ |
405 | public boolean validateAssemblyConnector(AssemblyConnector assemblyConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
406 | boolean result = validate_EveryMultiplicityConforms(assemblyConnector, diagnostics, context); |
407 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(assemblyConnector, diagnostics, context); |
408 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(assemblyConnector, diagnostics, context); |
409 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(assemblyConnector, diagnostics, context); |
410 | if (result || diagnostics != null) result &= validate_UniqueID(assemblyConnector, diagnostics, context); |
411 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(assemblyConnector, diagnostics, context); |
412 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(assemblyConnector, diagnostics, context); |
413 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(assemblyConnector, diagnostics, context); |
414 | if (result || diagnostics != null) result &= validateAssemblyConnector_AssemblyConnectorsReferencedProvidedRolesAndChildContextMustMatch(assemblyConnector, diagnostics, context); |
415 | if (result || diagnostics != null) result &= validateAssemblyConnector_AssemblyConnectorsReferencedRequiredRoleAndChildContextMustMatch(assemblyConnector, diagnostics, context); |
416 | if (result || diagnostics != null) result &= validateAssemblyConnector_AssemblyConnectorsReferencedInterfacesMustMatch(assemblyConnector, diagnostics, context); |
417 | return result; |
418 | } |
419 | |
420 | /** |
421 | * Validates the AssemblyConnectorsReferencedProvidedRolesAndChildContextMustMatch constraint of '<em>Assembly Connector</em>'. |
422 | * <!-- begin-user-doc --> |
423 | * <!-- end-user-doc --> |
424 | * @generated |
425 | */ |
426 | public boolean validateAssemblyConnector_AssemblyConnectorsReferencedProvidedRolesAndChildContextMustMatch(AssemblyConnector assemblyConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
427 | return assemblyConnector.AssemblyConnectorsReferencedProvidedRolesAndChildContextMustMatch(diagnostics, context); |
428 | } |
429 | |
430 | /** |
431 | * Validates the AssemblyConnectorsReferencedRequiredRoleAndChildContextMustMatch constraint of '<em>Assembly Connector</em>'. |
432 | * <!-- begin-user-doc --> |
433 | * <!-- end-user-doc --> |
434 | * @generated |
435 | */ |
436 | public boolean validateAssemblyConnector_AssemblyConnectorsReferencedRequiredRoleAndChildContextMustMatch(AssemblyConnector assemblyConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
437 | return assemblyConnector.AssemblyConnectorsReferencedRequiredRoleAndChildContextMustMatch(diagnostics, context); |
438 | } |
439 | |
440 | /** |
441 | * Validates the AssemblyConnectorsReferencedInterfacesMustMatch constraint of '<em>Assembly Connector</em>'. |
442 | * <!-- begin-user-doc --> |
443 | * <!-- end-user-doc --> |
444 | * @generated |
445 | */ |
446 | public boolean validateAssemblyConnector_AssemblyConnectorsReferencedInterfacesMustMatch(AssemblyConnector assemblyConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
447 | return assemblyConnector.AssemblyConnectorsReferencedInterfacesMustMatch(diagnostics, context); |
448 | } |
449 | |
450 | /** |
451 | * <!-- begin-user-doc --> |
452 | * <!-- end-user-doc --> |
453 | * @generated |
454 | */ |
455 | public boolean validateResourceRequiredDelegationConnector(ResourceRequiredDelegationConnector resourceRequiredDelegationConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
456 | return validate_EveryDefaultConstraint(resourceRequiredDelegationConnector, diagnostics, context); |
457 | } |
458 | |
459 | /** |
460 | * <!-- begin-user-doc --> |
461 | * <!-- end-user-doc --> |
462 | * @generated |
463 | */ |
464 | public boolean validateEventChannel(EventChannel eventChannel, DiagnosticChain diagnostics, Map<Object, Object> context) { |
465 | boolean result = validate_EveryMultiplicityConforms(eventChannel, diagnostics, context); |
466 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(eventChannel, diagnostics, context); |
467 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(eventChannel, diagnostics, context); |
468 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(eventChannel, diagnostics, context); |
469 | if (result || diagnostics != null) result &= validate_UniqueID(eventChannel, diagnostics, context); |
470 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(eventChannel, diagnostics, context); |
471 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(eventChannel, diagnostics, context); |
472 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(eventChannel, diagnostics, context); |
473 | return result; |
474 | } |
475 | |
476 | /** |
477 | * <!-- begin-user-doc --> |
478 | * <!-- end-user-doc --> |
479 | * @generated |
480 | */ |
481 | public boolean validateAssemblyEventConnector(AssemblyEventConnector assemblyEventConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
482 | boolean result = validate_EveryMultiplicityConforms(assemblyEventConnector, diagnostics, context); |
483 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(assemblyEventConnector, diagnostics, context); |
484 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(assemblyEventConnector, diagnostics, context); |
485 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(assemblyEventConnector, diagnostics, context); |
486 | if (result || diagnostics != null) result &= validate_UniqueID(assemblyEventConnector, diagnostics, context); |
487 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(assemblyEventConnector, diagnostics, context); |
488 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(assemblyEventConnector, diagnostics, context); |
489 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(assemblyEventConnector, diagnostics, context); |
490 | return result; |
491 | } |
492 | |
493 | /** |
494 | * <!-- begin-user-doc --> |
495 | * <!-- end-user-doc --> |
496 | * @generated |
497 | */ |
498 | public boolean validateSourceDelegationConnector(SourceDelegationConnector sourceDelegationConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
499 | boolean result = validate_EveryMultiplicityConforms(sourceDelegationConnector, diagnostics, context); |
500 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(sourceDelegationConnector, diagnostics, context); |
501 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(sourceDelegationConnector, diagnostics, context); |
502 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(sourceDelegationConnector, diagnostics, context); |
503 | if (result || diagnostics != null) result &= validate_UniqueID(sourceDelegationConnector, diagnostics, context); |
504 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(sourceDelegationConnector, diagnostics, context); |
505 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(sourceDelegationConnector, diagnostics, context); |
506 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(sourceDelegationConnector, diagnostics, context); |
507 | return result; |
508 | } |
509 | |
510 | /** |
511 | * <!-- begin-user-doc --> |
512 | * <!-- end-user-doc --> |
513 | * @generated |
514 | */ |
515 | public boolean validateSinkDelegationConnector(SinkDelegationConnector sinkDelegationConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
516 | boolean result = validate_EveryMultiplicityConforms(sinkDelegationConnector, diagnostics, context); |
517 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(sinkDelegationConnector, diagnostics, context); |
518 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(sinkDelegationConnector, diagnostics, context); |
519 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(sinkDelegationConnector, diagnostics, context); |
520 | if (result || diagnostics != null) result &= validate_UniqueID(sinkDelegationConnector, diagnostics, context); |
521 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(sinkDelegationConnector, diagnostics, context); |
522 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(sinkDelegationConnector, diagnostics, context); |
523 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(sinkDelegationConnector, diagnostics, context); |
524 | return result; |
525 | } |
526 | |
527 | /** |
528 | * <!-- begin-user-doc --> |
529 | * <!-- end-user-doc --> |
530 | * @generated |
531 | */ |
532 | public boolean validateAssemblyInfrastructureConnector(AssemblyInfrastructureConnector assemblyInfrastructureConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
533 | boolean result = validate_EveryMultiplicityConforms(assemblyInfrastructureConnector, diagnostics, context); |
534 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(assemblyInfrastructureConnector, diagnostics, context); |
535 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(assemblyInfrastructureConnector, diagnostics, context); |
536 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(assemblyInfrastructureConnector, diagnostics, context); |
537 | if (result || diagnostics != null) result &= validate_UniqueID(assemblyInfrastructureConnector, diagnostics, context); |
538 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(assemblyInfrastructureConnector, diagnostics, context); |
539 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(assemblyInfrastructureConnector, diagnostics, context); |
540 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(assemblyInfrastructureConnector, diagnostics, context); |
541 | return result; |
542 | } |
543 | |
544 | /** |
545 | * <!-- begin-user-doc --> |
546 | * <!-- end-user-doc --> |
547 | * @generated |
548 | */ |
549 | public boolean validateRequiredInfrastructureDelegationConnector(RequiredInfrastructureDelegationConnector requiredInfrastructureDelegationConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
550 | boolean result = validate_EveryMultiplicityConforms(requiredInfrastructureDelegationConnector, diagnostics, context); |
551 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(requiredInfrastructureDelegationConnector, diagnostics, context); |
552 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(requiredInfrastructureDelegationConnector, diagnostics, context); |
553 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(requiredInfrastructureDelegationConnector, diagnostics, context); |
554 | if (result || diagnostics != null) result &= validate_UniqueID(requiredInfrastructureDelegationConnector, diagnostics, context); |
555 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(requiredInfrastructureDelegationConnector, diagnostics, context); |
556 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(requiredInfrastructureDelegationConnector, diagnostics, context); |
557 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(requiredInfrastructureDelegationConnector, diagnostics, context); |
558 | return result; |
559 | } |
560 | |
561 | /** |
562 | * <!-- begin-user-doc --> |
563 | * <!-- end-user-doc --> |
564 | * @generated |
565 | */ |
566 | public boolean validateProvidedInfrastructureDelegationConnector(ProvidedInfrastructureDelegationConnector providedInfrastructureDelegationConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
567 | boolean result = validate_EveryMultiplicityConforms(providedInfrastructureDelegationConnector, diagnostics, context); |
568 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(providedInfrastructureDelegationConnector, diagnostics, context); |
569 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(providedInfrastructureDelegationConnector, diagnostics, context); |
570 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(providedInfrastructureDelegationConnector, diagnostics, context); |
571 | if (result || diagnostics != null) result &= validate_UniqueID(providedInfrastructureDelegationConnector, diagnostics, context); |
572 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(providedInfrastructureDelegationConnector, diagnostics, context); |
573 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(providedInfrastructureDelegationConnector, diagnostics, context); |
574 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(providedInfrastructureDelegationConnector, diagnostics, context); |
575 | return result; |
576 | } |
577 | |
578 | /** |
579 | * <!-- begin-user-doc --> |
580 | * <!-- end-user-doc --> |
581 | * @generated |
582 | */ |
583 | public boolean validateRequiredResourceDelegationConnector(RequiredResourceDelegationConnector requiredResourceDelegationConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
584 | boolean result = validate_EveryMultiplicityConforms(requiredResourceDelegationConnector, diagnostics, context); |
585 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(requiredResourceDelegationConnector, diagnostics, context); |
586 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(requiredResourceDelegationConnector, diagnostics, context); |
587 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(requiredResourceDelegationConnector, diagnostics, context); |
588 | if (result || diagnostics != null) result &= validate_UniqueID(requiredResourceDelegationConnector, diagnostics, context); |
589 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(requiredResourceDelegationConnector, diagnostics, context); |
590 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(requiredResourceDelegationConnector, diagnostics, context); |
591 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(requiredResourceDelegationConnector, diagnostics, context); |
592 | return result; |
593 | } |
594 | |
595 | /** |
596 | * <!-- begin-user-doc --> |
597 | * <!-- end-user-doc --> |
598 | * @generated |
599 | */ |
600 | public boolean validateEventChannelSinkConnector(EventChannelSinkConnector eventChannelSinkConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
601 | boolean result = validate_EveryMultiplicityConforms(eventChannelSinkConnector, diagnostics, context); |
602 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(eventChannelSinkConnector, diagnostics, context); |
603 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(eventChannelSinkConnector, diagnostics, context); |
604 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(eventChannelSinkConnector, diagnostics, context); |
605 | if (result || diagnostics != null) result &= validate_UniqueID(eventChannelSinkConnector, diagnostics, context); |
606 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(eventChannelSinkConnector, diagnostics, context); |
607 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(eventChannelSinkConnector, diagnostics, context); |
608 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(eventChannelSinkConnector, diagnostics, context); |
609 | return result; |
610 | } |
611 | |
612 | /** |
613 | * <!-- begin-user-doc --> |
614 | * <!-- end-user-doc --> |
615 | * @generated |
616 | */ |
617 | public boolean validateEventChannelSourceConnector(EventChannelSourceConnector eventChannelSourceConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { |
618 | boolean result = validate_EveryMultiplicityConforms(eventChannelSourceConnector, diagnostics, context); |
619 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(eventChannelSourceConnector, diagnostics, context); |
620 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(eventChannelSourceConnector, diagnostics, context); |
621 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(eventChannelSourceConnector, diagnostics, context); |
622 | if (result || diagnostics != null) result &= validate_UniqueID(eventChannelSourceConnector, diagnostics, context); |
623 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(eventChannelSourceConnector, diagnostics, context); |
624 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(eventChannelSourceConnector, diagnostics, context); |
625 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(eventChannelSourceConnector, diagnostics, context); |
626 | return result; |
627 | } |
628 | |
629 | /** |
630 | * <!-- begin-user-doc --> |
631 | * <!-- end-user-doc --> |
632 | * @generated |
633 | */ |
634 | public boolean validateComposedStructure(ComposedStructure composedStructure, DiagnosticChain diagnostics, Map<Object, Object> context) { |
635 | boolean result = validate_EveryMultiplicityConforms(composedStructure, diagnostics, context); |
636 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(composedStructure, diagnostics, context); |
637 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(composedStructure, diagnostics, context); |
638 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(composedStructure, diagnostics, context); |
639 | if (result || diagnostics != null) result &= validate_UniqueID(composedStructure, diagnostics, context); |
640 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(composedStructure, diagnostics, context); |
641 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(composedStructure, diagnostics, context); |
642 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(composedStructure, diagnostics, context); |
643 | if (result || diagnostics != null) result &= validateComposedStructure_MultipleConnectorsConstraint(composedStructure, diagnostics, context); |
644 | if (result || diagnostics != null) result &= validateComposedStructure_MultipleConnectorsConstraintForAssemblyConnectors(composedStructure, diagnostics, context); |
645 | return result; |
646 | } |
647 | |
648 | /** |
649 | * Validates the MultipleConnectorsConstraint constraint of '<em>Composed Structure</em>'. |
650 | * <!-- begin-user-doc --> |
651 | * <!-- end-user-doc --> |
652 | * @generated |
653 | */ |
654 | public boolean validateComposedStructure_MultipleConnectorsConstraint(ComposedStructure composedStructure, DiagnosticChain diagnostics, Map<Object, Object> context) { |
655 | return composedStructure.MultipleConnectorsConstraint(diagnostics, context); |
656 | } |
657 | |
658 | /** |
659 | * Validates the MultipleConnectorsConstraintForAssemblyConnectors constraint of '<em>Composed Structure</em>'. |
660 | * <!-- begin-user-doc --> |
661 | * <!-- end-user-doc --> |
662 | * @generated |
663 | */ |
664 | public boolean validateComposedStructure_MultipleConnectorsConstraintForAssemblyConnectors(ComposedStructure composedStructure, DiagnosticChain diagnostics, Map<Object, Object> context) { |
665 | return composedStructure.MultipleConnectorsConstraintForAssemblyConnectors(diagnostics, context); |
666 | } |
667 | |
668 | } //CompositionValidator |