| /** |
| * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * 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: |
| * Florian Pirchner - Initial implementation |
| */ |
| package org.eclipse.osbp.ecview.semantic.uimodel.impl; |
| |
| 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; |
| import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; |
| import org.eclipse.xtext.common.types.JvmTypeReference; |
| import org.eclipse.osbp.ecview.semantic.uimodel.UiBeanSlot; |
| import org.eclipse.osbp.ecview.semantic.uimodel.UiModelPackage; |
| |
| // TODO: Auto-generated Javadoc |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Ui Bean Slot</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.osbp.ecview.semantic.uimodel.impl.UiBeanSlotImpl#getId <em>Id</em>}</li> |
| * <li>{@link org.eclipse.osbp.ecview.semantic.uimodel.impl.UiBeanSlotImpl#getName <em>Name</em>}</li> |
| * <li>{@link org.eclipse.osbp.ecview.semantic.uimodel.impl.UiBeanSlotImpl#getJvmType <em>Jvm Type</em>}</li> |
| * <li>{@link org.eclipse.osbp.ecview.semantic.uimodel.impl.UiBeanSlotImpl#getEClass <em>EClass</em>}</li> |
| * <li>{@link org.eclipse.osbp.ecview.semantic.uimodel.impl.UiBeanSlotImpl#getEventTopic <em>Event Topic</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class UiBeanSlotImpl extends MinimalEObjectImpl.Container implements UiBeanSlot { |
| /** |
| * The default value of the '{@link #getId() <em>Id</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getId() |
| * @generated |
| * @ordered |
| */ |
| protected static final String ID_EDEFAULT = null; |
| /** |
| * The cached value of the '{@link #getId() <em>Id</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getId() |
| * @generated |
| * @ordered |
| */ |
| protected String id = ID_EDEFAULT; |
| /** |
| * The default value of the '{@link #getName() <em>Name</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getName() |
| * @generated |
| * @ordered |
| */ |
| protected static final String NAME_EDEFAULT = null; |
| /** |
| * The cached value of the '{@link #getName() <em>Name</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getName() |
| * @generated |
| * @ordered |
| */ |
| protected String name = NAME_EDEFAULT; |
| /** |
| * The cached value of the '{@link #getJvmType() <em>Jvm Type</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getJvmType() |
| * @generated |
| * @ordered |
| */ |
| protected JvmTypeReference jvmType; |
| |
| /** |
| * The cached value of the '{@link #getEClass() <em>EClass</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getEClass() |
| * @generated |
| * @ordered |
| */ |
| protected EClass eClass; |
| /** |
| * The default value of the '{@link #getEventTopic() <em>Event Topic</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getEventTopic() |
| * @generated |
| * @ordered |
| */ |
| protected static final String EVENT_TOPIC_EDEFAULT = null; |
| /** |
| * The cached value of the '{@link #getEventTopic() <em>Event Topic</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getEventTopic() |
| * @generated |
| * @ordered |
| */ |
| protected String eventTopic = EVENT_TOPIC_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @generated |
| */ |
| protected UiBeanSlotImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the e class |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return UiModelPackage.Literals.UI_BEAN_SLOT; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the cached value of the '{@link #getId() <em>Id</em>}' attribute |
| * @generated |
| */ |
| public String getId() { |
| return id; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param newId |
| * the new cached value of the '{@link #getId() <em>Id</em>}' |
| * attribute |
| * @generated |
| */ |
| public void setId(String newId) { |
| String oldId = id; |
| id = newId; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, UiModelPackage.UI_BEAN_SLOT__ID, oldId, id)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the cached value of the '{@link #getName() <em>Name</em>}' |
| * attribute |
| * @generated |
| */ |
| public String getName() { |
| return name; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param newName |
| * the new cached value of the '{@link #getName() <em>Name</em>}' |
| * attribute |
| * @generated |
| */ |
| public void setName(String newName) { |
| String oldName = name; |
| name = newName; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, UiModelPackage.UI_BEAN_SLOT__NAME, oldName, name)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the cached value of the '{@link #getJvmType() <em>Jvm Type</em>}' |
| * containment reference |
| * @generated |
| */ |
| public JvmTypeReference getJvmType() { |
| if (jvmType != null && jvmType.eIsProxy()) { |
| InternalEObject oldJvmType = (InternalEObject)jvmType; |
| jvmType = (JvmTypeReference)eResolveProxy(oldJvmType); |
| if (jvmType != oldJvmType) { |
| InternalEObject newJvmType = (InternalEObject)jvmType; |
| NotificationChain msgs = oldJvmType.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - UiModelPackage.UI_BEAN_SLOT__JVM_TYPE, null, null); |
| if (newJvmType.eInternalContainer() == null) { |
| msgs = newJvmType.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - UiModelPackage.UI_BEAN_SLOT__JVM_TYPE, null, msgs); |
| } |
| if (msgs != null) msgs.dispatch(); |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, UiModelPackage.UI_BEAN_SLOT__JVM_TYPE, oldJvmType, jvmType)); |
| } |
| } |
| return jvmType; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the jvm type reference |
| * @generated |
| */ |
| public JvmTypeReference basicGetJvmType() { |
| return jvmType; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param newJvmType |
| * the new jvm type |
| * @param msgs |
| * the msgs |
| * @return the notification chain |
| * @generated |
| */ |
| public NotificationChain basicSetJvmType(JvmTypeReference newJvmType, NotificationChain msgs) { |
| JvmTypeReference oldJvmType = jvmType; |
| jvmType = newJvmType; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, UiModelPackage.UI_BEAN_SLOT__JVM_TYPE, oldJvmType, newJvmType); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param newJvmType |
| * the new cached value of the '{@link #getJvmType() |
| * <em>Jvm Type</em>}' containment reference |
| * @generated |
| */ |
| public void setJvmType(JvmTypeReference newJvmType) { |
| if (newJvmType != jvmType) { |
| NotificationChain msgs = null; |
| if (jvmType != null) |
| msgs = ((InternalEObject)jvmType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - UiModelPackage.UI_BEAN_SLOT__JVM_TYPE, null, msgs); |
| if (newJvmType != null) |
| msgs = ((InternalEObject)newJvmType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - UiModelPackage.UI_BEAN_SLOT__JVM_TYPE, null, msgs); |
| msgs = basicSetJvmType(newJvmType, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, UiModelPackage.UI_BEAN_SLOT__JVM_TYPE, newJvmType, newJvmType)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the cached value of the '{@link #getEClass() <em>EClass</em>}' |
| * containment reference |
| * @generated |
| */ |
| public EClass getEClass() { |
| if (eClass != null && eClass.eIsProxy()) { |
| InternalEObject oldEClass = (InternalEObject)eClass; |
| eClass = (EClass)eResolveProxy(oldEClass); |
| if (eClass != oldEClass) { |
| InternalEObject newEClass = (InternalEObject)eClass; |
| NotificationChain msgs = oldEClass.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - UiModelPackage.UI_BEAN_SLOT__ECLASS, null, null); |
| if (newEClass.eInternalContainer() == null) { |
| msgs = newEClass.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - UiModelPackage.UI_BEAN_SLOT__ECLASS, null, msgs); |
| } |
| if (msgs != null) msgs.dispatch(); |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, UiModelPackage.UI_BEAN_SLOT__ECLASS, oldEClass, eClass)); |
| } |
| } |
| return eClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the e class |
| * @generated |
| */ |
| public EClass basicGetEClass() { |
| return eClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param newEClass |
| * the new e class |
| * @param msgs |
| * the msgs |
| * @return the notification chain |
| * @generated |
| */ |
| public NotificationChain basicSetEClass(EClass newEClass, NotificationChain msgs) { |
| EClass oldEClass = eClass; |
| eClass = newEClass; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, UiModelPackage.UI_BEAN_SLOT__ECLASS, oldEClass, newEClass); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param newEClass |
| * the new cached value of the '{@link #getEClass() |
| * <em>EClass</em>}' containment reference |
| * @generated |
| */ |
| public void setEClass(EClass newEClass) { |
| if (newEClass != eClass) { |
| NotificationChain msgs = null; |
| if (eClass != null) |
| msgs = ((InternalEObject)eClass).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - UiModelPackage.UI_BEAN_SLOT__ECLASS, null, msgs); |
| if (newEClass != null) |
| msgs = ((InternalEObject)newEClass).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - UiModelPackage.UI_BEAN_SLOT__ECLASS, null, msgs); |
| msgs = basicSetEClass(newEClass, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, UiModelPackage.UI_BEAN_SLOT__ECLASS, newEClass, newEClass)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the cached value of the '{@link #getEventTopic() |
| * <em>Event Topic</em>}' attribute |
| * @generated |
| */ |
| public String getEventTopic() { |
| return eventTopic; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param newEventTopic |
| * the new cached value of the '{@link #getEventTopic() |
| * <em>Event Topic</em>}' attribute |
| * @generated |
| */ |
| public void setEventTopic(String newEventTopic) { |
| String oldEventTopic = eventTopic; |
| eventTopic = newEventTopic; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, UiModelPackage.UI_BEAN_SLOT__EVENT_TOPIC, oldEventTopic, eventTopic)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param otherEnd |
| * the other end |
| * @param featureID |
| * the feature id |
| * @param msgs |
| * the msgs |
| * @return the notification chain |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case UiModelPackage.UI_BEAN_SLOT__JVM_TYPE: |
| return basicSetJvmType(null, msgs); |
| case UiModelPackage.UI_BEAN_SLOT__ECLASS: |
| return basicSetEClass(null, msgs); |
| } |
| return super.eInverseRemove(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param featureID |
| * the feature id |
| * @param resolve |
| * the resolve |
| * @param coreType |
| * the core type |
| * @return the object |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case UiModelPackage.UI_BEAN_SLOT__ID: |
| return getId(); |
| case UiModelPackage.UI_BEAN_SLOT__NAME: |
| return getName(); |
| case UiModelPackage.UI_BEAN_SLOT__JVM_TYPE: |
| if (resolve) return getJvmType(); |
| return basicGetJvmType(); |
| case UiModelPackage.UI_BEAN_SLOT__ECLASS: |
| if (resolve) return getEClass(); |
| return basicGetEClass(); |
| case UiModelPackage.UI_BEAN_SLOT__EVENT_TOPIC: |
| return getEventTopic(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param featureID |
| * the feature id |
| * @param newValue |
| * the new value |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case UiModelPackage.UI_BEAN_SLOT__ID: |
| setId((String)newValue); |
| return; |
| case UiModelPackage.UI_BEAN_SLOT__NAME: |
| setName((String)newValue); |
| return; |
| case UiModelPackage.UI_BEAN_SLOT__JVM_TYPE: |
| setJvmType((JvmTypeReference)newValue); |
| return; |
| case UiModelPackage.UI_BEAN_SLOT__ECLASS: |
| setEClass((EClass)newValue); |
| return; |
| case UiModelPackage.UI_BEAN_SLOT__EVENT_TOPIC: |
| setEventTopic((String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param featureID |
| * the feature id |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case UiModelPackage.UI_BEAN_SLOT__ID: |
| setId(ID_EDEFAULT); |
| return; |
| case UiModelPackage.UI_BEAN_SLOT__NAME: |
| setName(NAME_EDEFAULT); |
| return; |
| case UiModelPackage.UI_BEAN_SLOT__JVM_TYPE: |
| setJvmType((JvmTypeReference)null); |
| return; |
| case UiModelPackage.UI_BEAN_SLOT__ECLASS: |
| setEClass((EClass)null); |
| return; |
| case UiModelPackage.UI_BEAN_SLOT__EVENT_TOPIC: |
| setEventTopic(EVENT_TOPIC_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param featureID |
| * the feature id |
| * @return true, if successful |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case UiModelPackage.UI_BEAN_SLOT__ID: |
| return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); |
| case UiModelPackage.UI_BEAN_SLOT__NAME: |
| return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); |
| case UiModelPackage.UI_BEAN_SLOT__JVM_TYPE: |
| return jvmType != null; |
| case UiModelPackage.UI_BEAN_SLOT__ECLASS: |
| return eClass != null; |
| case UiModelPackage.UI_BEAN_SLOT__EVENT_TOPIC: |
| return EVENT_TOPIC_EDEFAULT == null ? eventTopic != null : !EVENT_TOPIC_EDEFAULT.equals(eventTopic); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the string |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| if (eIsProxy()) return super.toString(); |
| |
| StringBuffer result = new StringBuffer(super.toString()); |
| result.append(" (id: "); |
| result.append(id); |
| result.append(", name: "); |
| result.append(name); |
| result.append(", eventTopic: "); |
| result.append(eventTopic); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //UiBeanSlotImpl |