| 1 | /** |
| 2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
| 3 | * |
| 4 | * $Id$ |
| 5 | */ |
| 6 | package de.uka.ipd.sdq.pcm.core.entity.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.util.CompositionValidator; |
| 17 | import de.uka.ipd.sdq.pcm.core.entity.*; |
| 18 | import de.uka.ipd.sdq.pcm.core.entity.ComposedProvidingRequiringEntity; |
| 19 | import de.uka.ipd.sdq.pcm.core.entity.Entity; |
| 20 | import de.uka.ipd.sdq.pcm.core.entity.EntityPackage; |
| 21 | import de.uka.ipd.sdq.pcm.core.entity.InterfaceProvidingEntity; |
| 22 | import de.uka.ipd.sdq.pcm.core.entity.InterfaceProvidingRequiringEntity; |
| 23 | import de.uka.ipd.sdq.pcm.core.entity.InterfaceRequiringEntity; |
| 24 | import de.uka.ipd.sdq.pcm.core.entity.NamedElement; |
| 25 | import de.uka.ipd.sdq.pcm.core.entity.ResourceInterfaceProvidingEntity; |
| 26 | import de.uka.ipd.sdq.pcm.core.entity.ResourceInterfaceProvidingRequiringEntity; |
| 27 | import de.uka.ipd.sdq.pcm.core.entity.ResourceInterfaceRequiringEntity; |
| 28 | import de.uka.ipd.sdq.pcm.core.entity.ResourceProvidedRole; |
| 29 | import de.uka.ipd.sdq.pcm.core.entity.ResourceRequiredRole; |
| 30 | |
| 31 | /** |
| 32 | * <!-- begin-user-doc --> |
| 33 | * The <b>Validator</b> for the model. |
| 34 | * <!-- end-user-doc --> |
| 35 | * @see de.uka.ipd.sdq.pcm.core.entity.EntityPackage |
| 36 | * @generated |
| 37 | */ |
| 38 | public class EntityValidator extends EObjectValidator { |
| 39 | /** |
| 40 | * <!-- begin-user-doc --> |
| 41 | * <!-- end-user-doc --> |
| 42 | * @generated |
| 43 | */ |
| 44 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
| 45 | |
| 46 | /** |
| 47 | * The cached model package |
| 48 | * <!-- begin-user-doc --> |
| 49 | * <!-- end-user-doc --> |
| 50 | * @generated |
| 51 | */ |
| 52 | public static final EntityValidator INSTANCE = new EntityValidator(); |
| 53 | |
| 54 | /** |
| 55 | * 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. |
| 56 | * <!-- begin-user-doc --> |
| 57 | * <!-- end-user-doc --> |
| 58 | * @see org.eclipse.emf.common.util.Diagnostic#getSource() |
| 59 | * @see org.eclipse.emf.common.util.Diagnostic#getCode() |
| 60 | * @generated |
| 61 | */ |
| 62 | public static final String DIAGNOSTIC_SOURCE = "de.uka.ipd.sdq.pcm.core.entity"; |
| 63 | |
| 64 | /** |
| 65 | * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint 'Provided Roles Must Be Bound' of 'Composed Providing Requiring Entity'. |
| 66 | * <!-- begin-user-doc --> |
| 67 | * <!-- end-user-doc --> |
| 68 | * @generated |
| 69 | */ |
| 70 | public static final int COMPOSED_PROVIDING_REQUIRING_ENTITY__PROVIDED_ROLES_MUST_BE_BOUND = 1; |
| 71 | |
| 72 | /** |
| 73 | * A constant with a fixed name that can be used as the base value for additional hand written constants. |
| 74 | * <!-- begin-user-doc --> |
| 75 | * <!-- end-user-doc --> |
| 76 | * @generated |
| 77 | */ |
| 78 | private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 1; |
| 79 | |
| 80 | /** |
| 81 | * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class. |
| 82 | * <!-- begin-user-doc --> |
| 83 | * <!-- end-user-doc --> |
| 84 | * @generated |
| 85 | */ |
| 86 | protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT; |
| 87 | |
| 88 | /** |
| 89 | * The cached base package validator. |
| 90 | * <!-- begin-user-doc --> |
| 91 | * <!-- end-user-doc --> |
| 92 | * @generated |
| 93 | */ |
| 94 | protected IdentifierValidator identifierValidator; |
| 95 | |
| 96 | /** |
| 97 | * The cached base package validator. |
| 98 | * <!-- begin-user-doc --> |
| 99 | * <!-- end-user-doc --> |
| 100 | * @generated |
| 101 | */ |
| 102 | protected CompositionValidator compositionValidator; |
| 103 | |
| 104 | /** |
| 105 | * Creates an instance of the switch. |
| 106 | * <!-- begin-user-doc --> |
| 107 | * <!-- end-user-doc --> |
| 108 | * @generated |
| 109 | */ |
| 110 | public EntityValidator() { |
| 111 | super(); |
| 112 | identifierValidator = IdentifierValidator.INSTANCE; |
| 113 | compositionValidator = CompositionValidator.INSTANCE; |
| 114 | } |
| 115 | |
| 116 | /** |
| 117 | * Returns the package of this validator switch. |
| 118 | * <!-- begin-user-doc --> |
| 119 | * <!-- end-user-doc --> |
| 120 | * @generated |
| 121 | */ |
| 122 | @Override |
| 123 | protected EPackage getEPackage() { |
| 124 | return EntityPackage.eINSTANCE; |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * Calls <code>validateXXX</code> for the corresponding classifier of the model. |
| 129 | * <!-- begin-user-doc --> |
| 130 | * <!-- end-user-doc --> |
| 131 | * @generated |
| 132 | */ |
| 133 | @Override |
| 134 | protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 135 | switch (classifierID) { |
| 136 | case EntityPackage.RESOURCE_PROVIDED_ROLE: |
| 137 | return validateResourceProvidedRole((ResourceProvidedRole)value, diagnostics, context); |
| 138 | case EntityPackage.INTERFACE_PROVIDING_REQUIRING_ENTITY: |
| 139 | return validateInterfaceProvidingRequiringEntity((InterfaceProvidingRequiringEntity)value, diagnostics, context); |
| 140 | case EntityPackage.INTERFACE_PROVIDING_ENTITY: |
| 141 | return validateInterfaceProvidingEntity((InterfaceProvidingEntity)value, diagnostics, context); |
| 142 | case EntityPackage.INTERFACE_REQUIRING_ENTITY: |
| 143 | return validateInterfaceRequiringEntity((InterfaceRequiringEntity)value, diagnostics, context); |
| 144 | case EntityPackage.RESOURCE_INTERFACE_REQUIRING_ENTITY: |
| 145 | return validateResourceInterfaceRequiringEntity((ResourceInterfaceRequiringEntity)value, diagnostics, context); |
| 146 | case EntityPackage.RESOURCE_REQUIRED_ROLE: |
| 147 | return validateResourceRequiredRole((ResourceRequiredRole)value, diagnostics, context); |
| 148 | case EntityPackage.RESOURCE_INTERFACE_PROVIDING_ENTITY: |
| 149 | return validateResourceInterfaceProvidingEntity((ResourceInterfaceProvidingEntity)value, diagnostics, context); |
| 150 | case EntityPackage.COMPOSED_PROVIDING_REQUIRING_ENTITY: |
| 151 | return validateComposedProvidingRequiringEntity((ComposedProvidingRequiringEntity)value, diagnostics, context); |
| 152 | case EntityPackage.NAMED_ELEMENT: |
| 153 | return validateNamedElement((NamedElement)value, diagnostics, context); |
| 154 | case EntityPackage.RESOURCE_INTERFACE_PROVIDING_REQUIRING_ENTITY: |
| 155 | return validateResourceInterfaceProvidingRequiringEntity((ResourceInterfaceProvidingRequiringEntity)value, diagnostics, context); |
| 156 | case EntityPackage.ENTITY: |
| 157 | return validateEntity((Entity)value, diagnostics, context); |
| 158 | default: |
| 159 | return true; |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | /** |
| 164 | * <!-- begin-user-doc --> |
| 165 | * <!-- end-user-doc --> |
| 166 | * @generated |
| 167 | */ |
| 168 | public boolean validateResourceProvidedRole(ResourceProvidedRole resourceProvidedRole, DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 169 | boolean result = validate_EveryMultiplicityConforms(resourceProvidedRole, diagnostics, context); |
| 170 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(resourceProvidedRole, diagnostics, context); |
| 171 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(resourceProvidedRole, diagnostics, context); |
| 172 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(resourceProvidedRole, diagnostics, context); |
| 173 | if (result || diagnostics != null) result &= validate_UniqueID(resourceProvidedRole, diagnostics, context); |
| 174 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(resourceProvidedRole, diagnostics, context); |
| 175 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(resourceProvidedRole, diagnostics, context); |
| 176 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(resourceProvidedRole, diagnostics, context); |
| 177 | return result; |
| 178 | } |
| 179 | |
| 180 | /** |
| 181 | * <!-- begin-user-doc --> |
| 182 | * <!-- end-user-doc --> |
| 183 | * @generated |
| 184 | */ |
| 185 | public boolean validateNamedElement(NamedElement namedElement, DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 186 | return validate_EveryDefaultConstraint(namedElement, diagnostics, context); |
| 187 | } |
| 188 | |
| 189 | /** |
| 190 | * <!-- begin-user-doc --> |
| 191 | * <!-- end-user-doc --> |
| 192 | * @generated |
| 193 | */ |
| 194 | public boolean validateResourceInterfaceProvidingRequiringEntity(ResourceInterfaceProvidingRequiringEntity resourceInterfaceProvidingRequiringEntity, DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 195 | boolean result = validate_EveryMultiplicityConforms(resourceInterfaceProvidingRequiringEntity, diagnostics, context); |
| 196 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(resourceInterfaceProvidingRequiringEntity, diagnostics, context); |
| 197 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(resourceInterfaceProvidingRequiringEntity, diagnostics, context); |
| 198 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(resourceInterfaceProvidingRequiringEntity, diagnostics, context); |
| 199 | if (result || diagnostics != null) result &= validate_UniqueID(resourceInterfaceProvidingRequiringEntity, diagnostics, context); |
| 200 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(resourceInterfaceProvidingRequiringEntity, diagnostics, context); |
| 201 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(resourceInterfaceProvidingRequiringEntity, diagnostics, context); |
| 202 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(resourceInterfaceProvidingRequiringEntity, diagnostics, context); |
| 203 | return result; |
| 204 | } |
| 205 | |
| 206 | /** |
| 207 | * <!-- begin-user-doc --> |
| 208 | * <!-- end-user-doc --> |
| 209 | * @generated |
| 210 | */ |
| 211 | public boolean validateInterfaceProvidingEntity(InterfaceProvidingEntity interfaceProvidingEntity, DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 212 | boolean result = validate_EveryMultiplicityConforms(interfaceProvidingEntity, diagnostics, context); |
| 213 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(interfaceProvidingEntity, diagnostics, context); |
| 214 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(interfaceProvidingEntity, diagnostics, context); |
| 215 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(interfaceProvidingEntity, diagnostics, context); |
| 216 | if (result || diagnostics != null) result &= validate_UniqueID(interfaceProvidingEntity, diagnostics, context); |
| 217 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(interfaceProvidingEntity, diagnostics, context); |
| 218 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(interfaceProvidingEntity, diagnostics, context); |
| 219 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(interfaceProvidingEntity, diagnostics, context); |
| 220 | return result; |
| 221 | } |
| 222 | |
| 223 | /** |
| 224 | * <!-- begin-user-doc --> |
| 225 | * <!-- end-user-doc --> |
| 226 | * @generated |
| 227 | */ |
| 228 | public boolean validateInterfaceProvidingRequiringEntity(InterfaceProvidingRequiringEntity interfaceProvidingRequiringEntity, DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 229 | boolean result = validate_EveryMultiplicityConforms(interfaceProvidingRequiringEntity, diagnostics, context); |
| 230 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(interfaceProvidingRequiringEntity, diagnostics, context); |
| 231 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(interfaceProvidingRequiringEntity, diagnostics, context); |
| 232 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(interfaceProvidingRequiringEntity, diagnostics, context); |
| 233 | if (result || diagnostics != null) result &= validate_UniqueID(interfaceProvidingRequiringEntity, diagnostics, context); |
| 234 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(interfaceProvidingRequiringEntity, diagnostics, context); |
| 235 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(interfaceProvidingRequiringEntity, diagnostics, context); |
| 236 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(interfaceProvidingRequiringEntity, diagnostics, context); |
| 237 | return result; |
| 238 | } |
| 239 | |
| 240 | /** |
| 241 | * <!-- begin-user-doc --> |
| 242 | * <!-- end-user-doc --> |
| 243 | * @generated |
| 244 | */ |
| 245 | public boolean validateInterfaceRequiringEntity(InterfaceRequiringEntity interfaceRequiringEntity, DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 246 | boolean result = validate_EveryMultiplicityConforms(interfaceRequiringEntity, diagnostics, context); |
| 247 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(interfaceRequiringEntity, diagnostics, context); |
| 248 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(interfaceRequiringEntity, diagnostics, context); |
| 249 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(interfaceRequiringEntity, diagnostics, context); |
| 250 | if (result || diagnostics != null) result &= validate_UniqueID(interfaceRequiringEntity, diagnostics, context); |
| 251 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(interfaceRequiringEntity, diagnostics, context); |
| 252 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(interfaceRequiringEntity, diagnostics, context); |
| 253 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(interfaceRequiringEntity, diagnostics, context); |
| 254 | return result; |
| 255 | } |
| 256 | |
| 257 | /** |
| 258 | * <!-- begin-user-doc --> |
| 259 | * <!-- end-user-doc --> |
| 260 | * @generated |
| 261 | */ |
| 262 | public boolean validateResourceInterfaceRequiringEntity(ResourceInterfaceRequiringEntity resourceInterfaceRequiringEntity, DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 263 | boolean result = validate_EveryMultiplicityConforms(resourceInterfaceRequiringEntity, diagnostics, context); |
| 264 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(resourceInterfaceRequiringEntity, diagnostics, context); |
| 265 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(resourceInterfaceRequiringEntity, diagnostics, context); |
| 266 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(resourceInterfaceRequiringEntity, diagnostics, context); |
| 267 | if (result || diagnostics != null) result &= validate_UniqueID(resourceInterfaceRequiringEntity, diagnostics, context); |
| 268 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(resourceInterfaceRequiringEntity, diagnostics, context); |
| 269 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(resourceInterfaceRequiringEntity, diagnostics, context); |
| 270 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(resourceInterfaceRequiringEntity, diagnostics, context); |
| 271 | return result; |
| 272 | } |
| 273 | |
| 274 | /** |
| 275 | * <!-- begin-user-doc --> |
| 276 | * <!-- end-user-doc --> |
| 277 | * @generated |
| 278 | */ |
| 279 | public boolean validateResourceRequiredRole(ResourceRequiredRole resourceRequiredRole, DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 280 | boolean result = validate_EveryMultiplicityConforms(resourceRequiredRole, diagnostics, context); |
| 281 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(resourceRequiredRole, diagnostics, context); |
| 282 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(resourceRequiredRole, diagnostics, context); |
| 283 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(resourceRequiredRole, diagnostics, context); |
| 284 | if (result || diagnostics != null) result &= validate_UniqueID(resourceRequiredRole, diagnostics, context); |
| 285 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(resourceRequiredRole, diagnostics, context); |
| 286 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(resourceRequiredRole, diagnostics, context); |
| 287 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(resourceRequiredRole, diagnostics, context); |
| 288 | return result; |
| 289 | } |
| 290 | |
| 291 | /** |
| 292 | * <!-- begin-user-doc --> |
| 293 | * <!-- end-user-doc --> |
| 294 | * @generated |
| 295 | */ |
| 296 | public boolean validateComposedProvidingRequiringEntity(ComposedProvidingRequiringEntity composedProvidingRequiringEntity, DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 297 | boolean result = validate_EveryMultiplicityConforms(composedProvidingRequiringEntity, diagnostics, context); |
| 298 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(composedProvidingRequiringEntity, diagnostics, context); |
| 299 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(composedProvidingRequiringEntity, diagnostics, context); |
| 300 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(composedProvidingRequiringEntity, diagnostics, context); |
| 301 | if (result || diagnostics != null) result &= validate_UniqueID(composedProvidingRequiringEntity, diagnostics, context); |
| 302 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(composedProvidingRequiringEntity, diagnostics, context); |
| 303 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(composedProvidingRequiringEntity, diagnostics, context); |
| 304 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(composedProvidingRequiringEntity, diagnostics, context); |
| 305 | if (result || diagnostics != null) result &= compositionValidator.validateComposedStructure_MultipleConnectorsConstraint(composedProvidingRequiringEntity, diagnostics, context); |
| 306 | if (result || diagnostics != null) result &= compositionValidator.validateComposedStructure_MultipleConnectorsConstraintForAssemblyConnectors(composedProvidingRequiringEntity, diagnostics, context); |
| 307 | if (result || diagnostics != null) result &= validateComposedProvidingRequiringEntity_ProvidedRolesMustBeBound(composedProvidingRequiringEntity, diagnostics, context); |
| 308 | return result; |
| 309 | } |
| 310 | |
| 311 | /** |
| 312 | * Validates the ProvidedRolesMustBeBound constraint of '<em>Composed Providing Requiring Entity</em>'. |
| 313 | * <!-- begin-user-doc --> |
| 314 | * <!-- end-user-doc --> |
| 315 | * @generated |
| 316 | */ |
| 317 | public boolean validateComposedProvidingRequiringEntity_ProvidedRolesMustBeBound(ComposedProvidingRequiringEntity composedProvidingRequiringEntity, DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 318 | return composedProvidingRequiringEntity.ProvidedRolesMustBeBound(diagnostics, context); |
| 319 | } |
| 320 | |
| 321 | /** |
| 322 | * <!-- begin-user-doc --> |
| 323 | * <!-- end-user-doc --> |
| 324 | * @generated |
| 325 | */ |
| 326 | public boolean validateResourceInterfaceProvidingEntity(ResourceInterfaceProvidingEntity resourceInterfaceProvidingEntity, DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 327 | boolean result = validate_EveryMultiplicityConforms(resourceInterfaceProvidingEntity, diagnostics, context); |
| 328 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(resourceInterfaceProvidingEntity, diagnostics, context); |
| 329 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(resourceInterfaceProvidingEntity, diagnostics, context); |
| 330 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(resourceInterfaceProvidingEntity, diagnostics, context); |
| 331 | if (result || diagnostics != null) result &= validate_UniqueID(resourceInterfaceProvidingEntity, diagnostics, context); |
| 332 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(resourceInterfaceProvidingEntity, diagnostics, context); |
| 333 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(resourceInterfaceProvidingEntity, diagnostics, context); |
| 334 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(resourceInterfaceProvidingEntity, diagnostics, context); |
| 335 | return result; |
| 336 | } |
| 337 | |
| 338 | /** |
| 339 | * <!-- begin-user-doc --> |
| 340 | * <!-- end-user-doc --> |
| 341 | * @generated |
| 342 | */ |
| 343 | public boolean validateEntity(Entity entity, DiagnosticChain diagnostics, Map<Object, Object> context) { |
| 344 | boolean result = validate_EveryMultiplicityConforms(entity, diagnostics, context); |
| 345 | if (result || diagnostics != null) result &= validate_EveryDataValueConforms(entity, diagnostics, context); |
| 346 | if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(entity, diagnostics, context); |
| 347 | if (result || diagnostics != null) result &= validate_EveryProxyResolves(entity, diagnostics, context); |
| 348 | if (result || diagnostics != null) result &= validate_UniqueID(entity, diagnostics, context); |
| 349 | if (result || diagnostics != null) result &= validate_EveryKeyUnique(entity, diagnostics, context); |
| 350 | if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(entity, diagnostics, context); |
| 351 | if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(entity, diagnostics, context); |
| 352 | return result; |
| 353 | } |
| 354 | |
| 355 | /** |
| 356 | * Returns the resource locator that will be used to fetch messages for this validator's diagnostics. |
| 357 | * <!-- begin-user-doc --> |
| 358 | * <!-- end-user-doc --> |
| 359 | * @generated |
| 360 | */ |
| 361 | @Override |
| 362 | public ResourceLocator getResourceLocator() { |
| 363 | // TODO |
| 364 | // Specialize this to return a resource locator for messages specific to this validator. |
| 365 | // Ensure that you remove @generated or mark it @generated NOT |
| 366 | return super.getResourceLocator(); |
| 367 | } |
| 368 | |
| 369 | } //EntityValidator |