Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/OCL/OclModelElement.java')
-rw-r--r--plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/OCL/OclModelElement.java231
1 files changed, 231 insertions, 0 deletions
diff --git a/plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/OCL/OclModelElement.java b/plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/OCL/OclModelElement.java
new file mode 100644
index 00000000..0f2c940c
--- /dev/null
+++ b/plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/OCL/OclModelElement.java
@@ -0,0 +1,231 @@
+/**
+ * Copyright (c) 2008, 2012, 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ * Dennis Wagelaar (Vrije Universiteit Brussel)
+ */
+package org.eclipse.m2m.atl.common.OCL;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Ocl Model Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.m2m.atl.common.OCL.OclModelElement#getModel <em>Model</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.m2m.atl.common.OCL.OCLPackage#getOclModelElement()
+ * @model kind="class"
+ * @generated
+ */
+public class OclModelElement extends OclType {
+ /**
+ * The cached value of the '{@link #getModel() <em>Model</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getModel()
+ * @generated
+ * @ordered
+ */
+ protected OclModel model;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected OclModelElement() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return OCLPackage.Literals.OCL_MODEL_ELEMENT;
+ }
+
+ /**
+ * Returns the value of the '<em><b>Model</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.m2m.atl.common.OCL.OclModel#getElements <em>Elements</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Model</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Model</em>' reference.
+ * @see #setModel(OclModel)
+ * @see org.eclipse.m2m.atl.common.OCL.OCLPackage#getOclModelElement_Model()
+ * @see org.eclipse.m2m.atl.common.OCL.OclModel#getElements
+ * @model opposite="elements" required="true" ordered="false"
+ * @generated
+ */
+ public OclModel getModel() {
+ if (model != null && model.eIsProxy()) {
+ InternalEObject oldModel = (InternalEObject)model;
+ model = (OclModel)eResolveProxy(oldModel);
+ if (model != oldModel) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, OCLPackage.OCL_MODEL_ELEMENT__MODEL, oldModel, model));
+ }
+ }
+ return model;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public OclModel basicGetModel() {
+ return model;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetModel(OclModel newModel, NotificationChain msgs) {
+ OclModel oldModel = model;
+ model = newModel;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OCLPackage.OCL_MODEL_ELEMENT__MODEL, oldModel, newModel);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * Sets the value of the '{@link org.eclipse.m2m.atl.common.OCL.OclModelElement#getModel <em>Model</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Model</em>' reference.
+ * @see #getModel()
+ * @generated
+ */
+ public void setModel(OclModel newModel) {
+ if (newModel != model) {
+ NotificationChain msgs = null;
+ if (model != null)
+ msgs = ((InternalEObject)model).eInverseRemove(this, OCLPackage.OCL_MODEL__ELEMENTS, OclModel.class, msgs);
+ if (newModel != null)
+ msgs = ((InternalEObject)newModel).eInverseAdd(this, OCLPackage.OCL_MODEL__ELEMENTS, OclModel.class, msgs);
+ msgs = basicSetModel(newModel, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, OCLPackage.OCL_MODEL_ELEMENT__MODEL, newModel, newModel));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case OCLPackage.OCL_MODEL_ELEMENT__MODEL:
+ if (model != null)
+ msgs = ((InternalEObject)model).eInverseRemove(this, OCLPackage.OCL_MODEL__ELEMENTS, OclModel.class, msgs);
+ return basicSetModel((OclModel)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case OCLPackage.OCL_MODEL_ELEMENT__MODEL:
+ return basicSetModel(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case OCLPackage.OCL_MODEL_ELEMENT__MODEL:
+ if (resolve) return getModel();
+ return basicGetModel();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case OCLPackage.OCL_MODEL_ELEMENT__MODEL:
+ setModel((OclModel)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case OCLPackage.OCL_MODEL_ELEMENT__MODEL:
+ setModel((OclModel)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case OCLPackage.OCL_MODEL_ELEMENT__MODEL:
+ return model != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // OclModelElement

Back to the top