| /** |
| * 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.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; |
| import org.eclipse.osbp.ecview.semantic.uisemantics.UxElementURI; |
| |
| // TODO: Auto-generated Javadoc |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Ux Element URI</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.ecview.semantic.uisemantics.impl.UxElementURIImpl#getEPackage <em>EPackage</em>}</li> |
| * <li>{@link org.eclipse.osbp.ecview.semantic.uisemantics.impl.UxElementURIImpl#getEClass <em>EClass</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class UxElementURIImpl extends MinimalEObjectImpl.Container implements UxElementURI { |
| /** |
| * The cached value of the '{@link #getEPackage() <em>EPackage</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getEPackage() |
| * @generated |
| * @ordered |
| */ |
| protected UxEPackageImport ePackage; |
| |
| /** |
| * The cached value of the '{@link #getEClass() <em>EClass</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getEClass() |
| * @generated |
| * @ordered |
| */ |
| protected EClass eClass; |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @generated |
| */ |
| protected UxElementURIImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the e class |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return UiSemanticsPackage.Literals.UX_ELEMENT_URI; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the cached value of the '{@link #getEPackage() <em>EPackage</em>} |
| * ' reference |
| * @generated |
| */ |
| public UxEPackageImport getEPackage() { |
| if (ePackage != null && ePackage.eIsProxy()) { |
| InternalEObject oldEPackage = (InternalEObject)ePackage; |
| ePackage = (UxEPackageImport)eResolveProxy(oldEPackage); |
| if (ePackage != oldEPackage) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, UiSemanticsPackage.UX_ELEMENT_URI__EPACKAGE, oldEPackage, ePackage)); |
| } |
| } |
| return ePackage; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the ux e package import |
| * @generated |
| */ |
| public UxEPackageImport 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(UxEPackageImport newEPackage) { |
| UxEPackageImport oldEPackage = ePackage; |
| ePackage = newEPackage; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, UiSemanticsPackage.UX_ELEMENT_URI__EPACKAGE, oldEPackage, ePackage)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc -->. |
| * |
| * @return the cached value of the '{@link #getEClass() <em>EClass</em>}' |
| * reference |
| * @generated |
| */ |
| public EClass getEClass() { |
| if (eClass != null && eClass.eIsProxy()) { |
| InternalEObject oldEClass = (InternalEObject)eClass; |
| eClass = (EClass)eResolveProxy(oldEClass); |
| if (eClass != oldEClass) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, UiSemanticsPackage.UX_ELEMENT_URI__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 cached value of the '{@link #getEClass() |
| * <em>EClass</em>}' reference |
| * @generated |
| */ |
| public void setEClass(EClass newEClass) { |
| EClass oldEClass = eClass; |
| eClass = newEClass; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, UiSemanticsPackage.UX_ELEMENT_URI__ECLASS, oldEClass, eClass)); |
| } |
| |
| /** |
| * <!-- 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_ELEMENT_URI__EPACKAGE: |
| if (resolve) return getEPackage(); |
| return basicGetEPackage(); |
| case UiSemanticsPackage.UX_ELEMENT_URI__ECLASS: |
| if (resolve) return getEClass(); |
| return basicGetEClass(); |
| } |
| 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_ELEMENT_URI__EPACKAGE: |
| setEPackage((UxEPackageImport)newValue); |
| return; |
| case UiSemanticsPackage.UX_ELEMENT_URI__ECLASS: |
| setEClass((EClass)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_ELEMENT_URI__EPACKAGE: |
| setEPackage((UxEPackageImport)null); |
| return; |
| case UiSemanticsPackage.UX_ELEMENT_URI__ECLASS: |
| setEClass((EClass)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_ELEMENT_URI__EPACKAGE: |
| return ePackage != null; |
| case UiSemanticsPackage.UX_ELEMENT_URI__ECLASS: |
| return eClass != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //UxElementURIImpl |