diff options
Diffstat (limited to 'extraplugins/bpmn/org.eclipse.papyrus.bpmn/src/org/eclipse/papyrus/bpmn/BPMNProfile/impl/BPMNPropertyImpl.java')
-rw-r--r-- | extraplugins/bpmn/org.eclipse.papyrus.bpmn/src/org/eclipse/papyrus/bpmn/BPMNProfile/impl/BPMNPropertyImpl.java | 300 |
1 files changed, 300 insertions, 0 deletions
diff --git a/extraplugins/bpmn/org.eclipse.papyrus.bpmn/src/org/eclipse/papyrus/bpmn/BPMNProfile/impl/BPMNPropertyImpl.java b/extraplugins/bpmn/org.eclipse.papyrus.bpmn/src/org/eclipse/papyrus/bpmn/BPMNProfile/impl/BPMNPropertyImpl.java new file mode 100644 index 00000000000..e92f3592b41 --- /dev/null +++ b/extraplugins/bpmn/org.eclipse.papyrus.bpmn/src/org/eclipse/papyrus/bpmn/BPMNProfile/impl/BPMNPropertyImpl.java @@ -0,0 +1,300 @@ +/** + */ +package org.eclipse.papyrus.bpmn.BPMNProfile.impl; + +import java.lang.reflect.InvocationTargetException; + +import java.util.Map; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.BasicDiagnostic; +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.DiagnosticChain; +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.emf.ecore.util.EObjectValidator; + +import org.eclipse.papyrus.bpmn.BPMNProfile.BPMNProfilePackage; +import org.eclipse.papyrus.bpmn.BPMNProfile.BPMNProperty; + +import org.eclipse.papyrus.bpmn.BPMNProfile.util.BPMNProfileValidator; + +import org.eclipse.uml2.uml.DataStoreNode; +import org.eclipse.uml2.uml.Property; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>BPMN Property</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.BPMNPropertyImpl#getBase_DataStoreNode <em>Base Data Store Node</em>}</li> + * <li>{@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.BPMNPropertyImpl#getUmlProperty <em>Uml Property</em>}</li> + * </ul> + * + * @generated + */ +public class BPMNPropertyImpl extends ItemAwareElementImpl implements BPMNProperty { + /** + * The cached value of the '{@link #getBase_DataStoreNode() <em>Base Data Store Node</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getBase_DataStoreNode() + * @generated + * @ordered + */ + protected DataStoreNode base_DataStoreNode; + + /** + * The cached value of the '{@link #getUmlProperty() <em>Uml Property</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUmlProperty() + * @generated + * @ordered + */ + protected Property umlProperty; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected BPMNPropertyImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return BPMNProfilePackage.eINSTANCE.getBPMNProperty(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DataStoreNode getBase_DataStoreNode() { + if (base_DataStoreNode != null && base_DataStoreNode.eIsProxy()) { + InternalEObject oldBase_DataStoreNode = (InternalEObject)base_DataStoreNode; + base_DataStoreNode = (DataStoreNode)eResolveProxy(oldBase_DataStoreNode); + if (base_DataStoreNode != oldBase_DataStoreNode) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.BPMN_PROPERTY__BASE_DATA_STORE_NODE, oldBase_DataStoreNode, base_DataStoreNode)); + } + } + return base_DataStoreNode; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DataStoreNode basicGetBase_DataStoreNode() { + return base_DataStoreNode; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setBase_DataStoreNode(DataStoreNode newBase_DataStoreNode) { + DataStoreNode oldBase_DataStoreNode = base_DataStoreNode; + base_DataStoreNode = newBase_DataStoreNode; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.BPMN_PROPERTY__BASE_DATA_STORE_NODE, oldBase_DataStoreNode, base_DataStoreNode)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Property getUmlProperty() { + if (umlProperty != null && umlProperty.eIsProxy()) { + InternalEObject oldUmlProperty = (InternalEObject)umlProperty; + umlProperty = (Property)eResolveProxy(oldUmlProperty); + if (umlProperty != oldUmlProperty) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.BPMN_PROPERTY__UML_PROPERTY, oldUmlProperty, umlProperty)); + } + } + return umlProperty; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Property basicGetUmlProperty() { + return umlProperty; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setUmlProperty(Property newUmlProperty) { + Property oldUmlProperty = umlProperty; + umlProperty = newUmlProperty; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.BPMN_PROPERTY__UML_PROPERTY, oldUmlProperty, umlProperty)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean Propertynotation(DiagnosticChain diagnostics, Map<Object, Object> 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, + BPMNProfileValidator.DIAGNOSTIC_SOURCE, + BPMNProfileValidator.BPMN_PROPERTY__PROPERTYNOTATION, + EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "Propertynotation", EObjectValidator.getObjectLabel(this, context) }), + new Object [] { this })); + } + return false; + } + return true; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean BPMNPropertyapply(DiagnosticChain diagnostics, Map<Object, Object> 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, + BPMNProfileValidator.DIAGNOSTIC_SOURCE, + BPMNProfileValidator.BPMN_PROPERTY__BPMN_PROPERTYAPPLY, + EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "BPMNPropertyapply", EObjectValidator.getObjectLabel(this, context) }), + new Object [] { this })); + } + return false; + } + return true; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case BPMNProfilePackage.BPMN_PROPERTY__BASE_DATA_STORE_NODE: + if (resolve) return getBase_DataStoreNode(); + return basicGetBase_DataStoreNode(); + case BPMNProfilePackage.BPMN_PROPERTY__UML_PROPERTY: + if (resolve) return getUmlProperty(); + return basicGetUmlProperty(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case BPMNProfilePackage.BPMN_PROPERTY__BASE_DATA_STORE_NODE: + setBase_DataStoreNode((DataStoreNode)newValue); + return; + case BPMNProfilePackage.BPMN_PROPERTY__UML_PROPERTY: + setUmlProperty((Property)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case BPMNProfilePackage.BPMN_PROPERTY__BASE_DATA_STORE_NODE: + setBase_DataStoreNode((DataStoreNode)null); + return; + case BPMNProfilePackage.BPMN_PROPERTY__UML_PROPERTY: + setUmlProperty((Property)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case BPMNProfilePackage.BPMN_PROPERTY__BASE_DATA_STORE_NODE: + return base_DataStoreNode != null; + case BPMNProfilePackage.BPMN_PROPERTY__UML_PROPERTY: + return umlProperty != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + @SuppressWarnings("unchecked") + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case BPMNProfilePackage.BPMN_PROPERTY___PROPERTYNOTATION__DIAGNOSTICCHAIN_MAP: + return Propertynotation((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1)); + case BPMNProfilePackage.BPMN_PROPERTY___BPMN_PROPERTYAPPLY__DIAGNOSTICCHAIN_MAP: + return BPMNPropertyapply((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1)); + } + return super.eInvoke(operationID, arguments); + } + +} //BPMNPropertyImpl |