| /** |
| * 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.uisemantics.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EPackage; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; |
| |
| import org.eclipse.osbp.ecview.semantic.uisemantics.UiSemanticsPackage; |
| import org.eclipse.osbp.ecview.semantic.uisemantics.UxEPackageImport; |
| |
| // TODO: Auto-generated Javadoc |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Ux EPackage Import</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.osbp.ecview.semantic.uisemantics.impl.UxEPackageImportImpl#getAlias <em>Alias</em>}</li> |
| * <li>{@link org.eclipse.osbp.ecview.semantic.uisemantics.impl.UxEPackageImportImpl#getEPackage <em>EPackage</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class UxEPackageImportImpl extends MinimalEObjectImpl.Container implements UxEPackageImport { |
| /** |
| * The default value of the '{@link #getAlias() <em>Alias</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getAlias() |
| * @generated |
| * @ordered |
| */ |
| protected static final String ALIAS_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getAlias() <em>Alias</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getAlias() |
| * @generated |
| * @ordered |
| */ |
| protected String alias = ALIAS_EDEFAULT; |
| |
| /** |
| * The cached value of the '{@link #getEPackage() <em>EPackage</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getEPackage() |
| * @generated |
| * @ordered |
| */ |
| protected EPackage ePackage; |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @generated |
| */ |
| protected UxEPackageImportImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the e class |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return UiSemanticsPackage.Literals.UX_EPACKAGE_IMPORT; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the cached value of the '{@link #getAlias() <em>Alias</em>}' |
| * attribute |
| * @generated |
| */ |
| public String getAlias() { |
| return alias; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param newAlias |
| * the new cached value of the '{@link #getAlias() |
| * <em>Alias</em>}' attribute |
| * @generated |
| */ |
| public void setAlias(String newAlias) { |
| String oldAlias = alias; |
| alias = newAlias; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, UiSemanticsPackage.UX_EPACKAGE_IMPORT__ALIAS, oldAlias, alias)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the cached value of the '{@link #getEPackage() <em>EPackage</em>} |
| * ' reference |
| * @generated |
| */ |
| public EPackage getEPackage() { |
| if (ePackage != null && ePackage.eIsProxy()) { |
| InternalEObject oldEPackage = (InternalEObject)ePackage; |
| ePackage = (EPackage)eResolveProxy(oldEPackage); |
| if (ePackage != oldEPackage) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, UiSemanticsPackage.UX_EPACKAGE_IMPORT__EPACKAGE, oldEPackage, ePackage)); |
| } |
| } |
| return ePackage; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the e package |
| * @generated |
| */ |
| public EPackage basicGetEPackage() { |
| return ePackage; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @param newEPackage |
| * the new cached value of the '{@link #getEPackage() |
| * <em>EPackage</em>}' reference |
| * @generated |
| */ |
| public void setEPackage(EPackage newEPackage) { |
| EPackage oldEPackage = ePackage; |
| ePackage = newEPackage; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, UiSemanticsPackage.UX_EPACKAGE_IMPORT__EPACKAGE, oldEPackage, ePackage)); |
| } |
| |
| /** |
| * <!-- 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 UiSemanticsPackage.UX_EPACKAGE_IMPORT__ALIAS: |
| return getAlias(); |
| case UiSemanticsPackage.UX_EPACKAGE_IMPORT__EPACKAGE: |
| if (resolve) return getEPackage(); |
| return basicGetEPackage(); |
| } |
| 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 UiSemanticsPackage.UX_EPACKAGE_IMPORT__ALIAS: |
| setAlias((String)newValue); |
| return; |
| case UiSemanticsPackage.UX_EPACKAGE_IMPORT__EPACKAGE: |
| setEPackage((EPackage)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 UiSemanticsPackage.UX_EPACKAGE_IMPORT__ALIAS: |
| setAlias(ALIAS_EDEFAULT); |
| return; |
| case UiSemanticsPackage.UX_EPACKAGE_IMPORT__EPACKAGE: |
| setEPackage((EPackage)null); |
| 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 UiSemanticsPackage.UX_EPACKAGE_IMPORT__ALIAS: |
| return ALIAS_EDEFAULT == null ? alias != null : !ALIAS_EDEFAULT.equals(alias); |
| case UiSemanticsPackage.UX_EPACKAGE_IMPORT__EPACKAGE: |
| return ePackage != null; |
| } |
| 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(" (alias: "); |
| result.append(alias); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //UxEPackageImportImpl |