| /* |
| * Copyright (c) 2005, 2006 IBM Corporation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * IBM - initial API and implementation |
| * |
| * $Id: ReadLinkObjectEndActionOperations.java,v 1.4 2006/01/05 22:43:26 khussey Exp $ |
| */ |
| package org.eclipse.uml2.uml.internal.operations; |
| |
| import java.util.Map; |
| |
| import org.eclipse.emf.common.util.BasicDiagnostic; |
| import org.eclipse.emf.common.util.Diagnostic; |
| import org.eclipse.emf.common.util.DiagnosticChain; |
| |
| import org.eclipse.uml2.uml.ReadLinkObjectEndAction; |
| |
| import org.eclipse.uml2.uml.util.UMLValidator; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * A static utility class that provides operations related to '<em><b>Read Link Object End Action</b></em>' model objects. |
| * <!-- end-user-doc --> |
| * |
| * <p> |
| * The following operations are supported: |
| * <ul> |
| * <li>{@link org.eclipse.uml2.uml.ReadLinkObjectEndAction#validateProperty(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Validate Property</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.ReadLinkObjectEndAction#validateAssociationOfAssociation(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Validate Association Of Association</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.ReadLinkObjectEndAction#validateEndsOfAssociation(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Validate Ends Of Association</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.ReadLinkObjectEndAction#validateTypeOfObject(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Validate Type Of Object</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.ReadLinkObjectEndAction#validateMultiplicityOfObject(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Validate Multiplicity Of Object</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.ReadLinkObjectEndAction#validateTypeOfResult(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Validate Type Of Result</em>}</li> |
| * <li>{@link org.eclipse.uml2.uml.ReadLinkObjectEndAction#validateMultiplicityOfResult(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Validate Multiplicity Of Result</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class ReadLinkObjectEndActionOperations |
| extends ActivityNodeOperations { |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ReadLinkObjectEndActionOperations() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * The property must be an association end. |
| * self.end.association.notEmpty() |
| * <!-- end-model-doc --> |
| * @generated |
| */ |
| public static boolean validateProperty( |
| ReadLinkObjectEndAction readLinkObjectEndAction, |
| DiagnosticChain diagnostics, Map context) { |
| // TODO: implement this method |
| // -> specify the condition that violates the invariant |
| // -> verify the details of the diagnostic, including severity and message |
| // Ensure that you remove @generated or mark it @generated NOT |
| if (false) { |
| if (diagnostics != null) { |
| diagnostics |
| .add(new BasicDiagnostic( |
| Diagnostic.ERROR, |
| UMLValidator.DIAGNOSTIC_SOURCE, |
| UMLValidator.READ_LINK_OBJECT_END_ACTION__PROPERTY, |
| org.eclipse.emf.ecore.plugin.EcorePlugin.INSTANCE |
| .getString( |
| "_UI_GenericInvariant_diagnostic", new Object[]{"validateProperty", org.eclipse.emf.ecore.util.EObjectValidator.getObjectLabel(readLinkObjectEndAction, context)}), //$NON-NLS-1$ //$NON-NLS-2$ |
| new Object[]{readLinkObjectEndAction})); |
| } |
| return false; |
| } |
| return true; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * The association of the association end must be an association class. |
| * self.end.Association.oclIsKindOf(AssociationClass) |
| * <!-- end-model-doc --> |
| * @generated |
| */ |
| public static boolean validateAssociationOfAssociation( |
| ReadLinkObjectEndAction readLinkObjectEndAction, |
| DiagnosticChain diagnostics, Map context) { |
| // TODO: implement this method |
| // -> specify the condition that violates the invariant |
| // -> verify the details of the diagnostic, including severity and message |
| // Ensure that you remove @generated or mark it @generated NOT |
| if (false) { |
| if (diagnostics != null) { |
| diagnostics |
| .add(new BasicDiagnostic( |
| Diagnostic.ERROR, |
| UMLValidator.DIAGNOSTIC_SOURCE, |
| UMLValidator.READ_LINK_OBJECT_END_ACTION__ASSOCIATION_OF_ASSOCIATION, |
| org.eclipse.emf.ecore.plugin.EcorePlugin.INSTANCE |
| .getString( |
| "_UI_GenericInvariant_diagnostic", new Object[]{"validateAssociationOfAssociation", org.eclipse.emf.ecore.util.EObjectValidator.getObjectLabel(readLinkObjectEndAction, context)}), //$NON-NLS-1$ //$NON-NLS-2$ |
| new Object[]{readLinkObjectEndAction})); |
| } |
| return false; |
| } |
| return true; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * The ends of the association must not be static. |
| * self.end.association.memberEnd->forall(e | not e.isStatic) |
| * <!-- end-model-doc --> |
| * @generated |
| */ |
| public static boolean validateEndsOfAssociation( |
| ReadLinkObjectEndAction readLinkObjectEndAction, |
| DiagnosticChain diagnostics, Map context) { |
| // TODO: implement this method |
| // -> specify the condition that violates the invariant |
| // -> verify the details of the diagnostic, including severity and message |
| // Ensure that you remove @generated or mark it @generated NOT |
| if (false) { |
| if (diagnostics != null) { |
| diagnostics |
| .add(new BasicDiagnostic( |
| Diagnostic.ERROR, |
| UMLValidator.DIAGNOSTIC_SOURCE, |
| UMLValidator.READ_LINK_OBJECT_END_ACTION__ENDS_OF_ASSOCIATION, |
| org.eclipse.emf.ecore.plugin.EcorePlugin.INSTANCE |
| .getString( |
| "_UI_GenericInvariant_diagnostic", new Object[]{"validateEndsOfAssociation", org.eclipse.emf.ecore.util.EObjectValidator.getObjectLabel(readLinkObjectEndAction, context)}), //$NON-NLS-1$ //$NON-NLS-2$ |
| new Object[]{readLinkObjectEndAction})); |
| } |
| return false; |
| } |
| return true; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * The type of the object input pin is the association class that owns the association end. |
| * self.object.type = self.end.association |
| * <!-- end-model-doc --> |
| * @generated |
| */ |
| public static boolean validateTypeOfObject( |
| ReadLinkObjectEndAction readLinkObjectEndAction, |
| DiagnosticChain diagnostics, Map context) { |
| // TODO: implement this method |
| // -> specify the condition that violates the invariant |
| // -> verify the details of the diagnostic, including severity and message |
| // Ensure that you remove @generated or mark it @generated NOT |
| if (false) { |
| if (diagnostics != null) { |
| diagnostics |
| .add(new BasicDiagnostic( |
| Diagnostic.ERROR, |
| UMLValidator.DIAGNOSTIC_SOURCE, |
| UMLValidator.READ_LINK_OBJECT_END_ACTION__TYPE_OF_OBJECT, |
| org.eclipse.emf.ecore.plugin.EcorePlugin.INSTANCE |
| .getString( |
| "_UI_GenericInvariant_diagnostic", new Object[]{"validateTypeOfObject", org.eclipse.emf.ecore.util.EObjectValidator.getObjectLabel(readLinkObjectEndAction, context)}), //$NON-NLS-1$ //$NON-NLS-2$ |
| new Object[]{readLinkObjectEndAction})); |
| } |
| return false; |
| } |
| return true; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * The multiplicity of the object input pin is 1..1. |
| * self.object.multiplicity.is(1,1) |
| * <!-- end-model-doc --> |
| * @generated |
| */ |
| public static boolean validateMultiplicityOfObject( |
| ReadLinkObjectEndAction readLinkObjectEndAction, |
| DiagnosticChain diagnostics, Map context) { |
| // TODO: implement this method |
| // -> specify the condition that violates the invariant |
| // -> verify the details of the diagnostic, including severity and message |
| // Ensure that you remove @generated or mark it @generated NOT |
| if (false) { |
| if (diagnostics != null) { |
| diagnostics |
| .add(new BasicDiagnostic( |
| Diagnostic.ERROR, |
| UMLValidator.DIAGNOSTIC_SOURCE, |
| UMLValidator.READ_LINK_OBJECT_END_ACTION__MULTIPLICITY_OF_OBJECT, |
| org.eclipse.emf.ecore.plugin.EcorePlugin.INSTANCE |
| .getString( |
| "_UI_GenericInvariant_diagnostic", new Object[]{"validateMultiplicityOfObject", org.eclipse.emf.ecore.util.EObjectValidator.getObjectLabel(readLinkObjectEndAction, context)}), //$NON-NLS-1$ //$NON-NLS-2$ |
| new Object[]{readLinkObjectEndAction})); |
| } |
| return false; |
| } |
| return true; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * The type of the result output pin is the same as the type of the association end. |
| * self.result.type = self.end.type |
| * <!-- end-model-doc --> |
| * @generated |
| */ |
| public static boolean validateTypeOfResult( |
| ReadLinkObjectEndAction readLinkObjectEndAction, |
| DiagnosticChain diagnostics, Map context) { |
| // TODO: implement this method |
| // -> specify the condition that violates the invariant |
| // -> verify the details of the diagnostic, including severity and message |
| // Ensure that you remove @generated or mark it @generated NOT |
| if (false) { |
| if (diagnostics != null) { |
| diagnostics |
| .add(new BasicDiagnostic( |
| Diagnostic.ERROR, |
| UMLValidator.DIAGNOSTIC_SOURCE, |
| UMLValidator.READ_LINK_OBJECT_END_ACTION__TYPE_OF_RESULT, |
| org.eclipse.emf.ecore.plugin.EcorePlugin.INSTANCE |
| .getString( |
| "_UI_GenericInvariant_diagnostic", new Object[]{"validateTypeOfResult", org.eclipse.emf.ecore.util.EObjectValidator.getObjectLabel(readLinkObjectEndAction, context)}), //$NON-NLS-1$ //$NON-NLS-2$ |
| new Object[]{readLinkObjectEndAction})); |
| } |
| return false; |
| } |
| return true; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * The multiplicity of the result output pin is 1..1. |
| * self.result.multiplicity.is(1,1) |
| * <!-- end-model-doc --> |
| * @generated |
| */ |
| public static boolean validateMultiplicityOfResult( |
| ReadLinkObjectEndAction readLinkObjectEndAction, |
| DiagnosticChain diagnostics, Map context) { |
| // TODO: implement this method |
| // -> specify the condition that violates the invariant |
| // -> verify the details of the diagnostic, including severity and message |
| // Ensure that you remove @generated or mark it @generated NOT |
| if (false) { |
| if (diagnostics != null) { |
| diagnostics |
| .add(new BasicDiagnostic( |
| Diagnostic.ERROR, |
| UMLValidator.DIAGNOSTIC_SOURCE, |
| UMLValidator.READ_LINK_OBJECT_END_ACTION__MULTIPLICITY_OF_RESULT, |
| org.eclipse.emf.ecore.plugin.EcorePlugin.INSTANCE |
| .getString( |
| "_UI_GenericInvariant_diagnostic", new Object[]{"validateMultiplicityOfResult", org.eclipse.emf.ecore.util.EObjectValidator.getObjectLabel(readLinkObjectEndAction, context)}), //$NON-NLS-1$ //$NON-NLS-2$ |
| new Object[]{readLinkObjectEndAction})); |
| } |
| return false; |
| } |
| return true; |
| } |
| |
| } // ReadLinkObjectEndActionOperations |