/***************************************************************************** | |
* Copyright (c) 2011 - 2014 University of Padova, Intecs | |
* | |
* | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v2.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v20.html | |
* | |
* | |
*****************************************************************************/ | |
package org.polarsys.chess.chessmlprofile.Core.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.papyrus.MARTE.MARTE_AnalysisModel.GQAM.impl.GaResourcesPlatformImpl; | |
import org.eclipse.uml2.uml.InstanceSpecification; | |
import org.polarsys.chess.chessmlprofile.Core.CHGaResourcePlatform; | |
import org.polarsys.chess.chessmlprofile.Core.CorePackage; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model object '<em><b>CH Ga Resource Platform</b></em>'. | |
* <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* </p> | |
* <ul> | |
* <li>{@link org.polarsys.chess.chessmlprofile.Core.impl.CHGaResourcePlatformImpl#getBase_InstanceSpecification <em>Base Instance Specification</em>}</li> | |
* <li>{@link org.polarsys.chess.chessmlprofile.Core.impl.CHGaResourcePlatformImpl#getBase_Package <em>Base Package</em>}</li> | |
* </ul> | |
* | |
* @generated | |
*/ | |
public class CHGaResourcePlatformImpl extends GaResourcesPlatformImpl implements CHGaResourcePlatform { | |
/** | |
* The cached value of the '{@link #getBase_InstanceSpecification() <em>Base Instance Specification</em>}' reference. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getBase_InstanceSpecification() | |
* @generated | |
* @ordered | |
*/ | |
protected InstanceSpecification base_InstanceSpecification; | |
/** | |
* The cached value of the '{@link #getBase_Package() <em>Base Package</em>}' reference. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getBase_Package() | |
* @generated | |
* @ordered | |
*/ | |
protected org.eclipse.uml2.uml.Package base_Package; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected CHGaResourcePlatformImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return CorePackage.Literals.CH_GA_RESOURCE_PLATFORM; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public InstanceSpecification getBase_InstanceSpecification() { | |
if (base_InstanceSpecification != null && base_InstanceSpecification.eIsProxy()) { | |
InternalEObject oldBase_InstanceSpecification = (InternalEObject)base_InstanceSpecification; | |
base_InstanceSpecification = (InstanceSpecification)eResolveProxy(oldBase_InstanceSpecification); | |
if (base_InstanceSpecification != oldBase_InstanceSpecification) { | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.RESOLVE, CorePackage.CH_GA_RESOURCE_PLATFORM__BASE_INSTANCE_SPECIFICATION, oldBase_InstanceSpecification, base_InstanceSpecification)); | |
} | |
} | |
return base_InstanceSpecification; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public InstanceSpecification basicGetBase_InstanceSpecification() { | |
return base_InstanceSpecification; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public void setBase_InstanceSpecification(InstanceSpecification newBase_InstanceSpecification) { | |
InstanceSpecification oldBase_InstanceSpecification = base_InstanceSpecification; | |
base_InstanceSpecification = newBase_InstanceSpecification; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.CH_GA_RESOURCE_PLATFORM__BASE_INSTANCE_SPECIFICATION, oldBase_InstanceSpecification, base_InstanceSpecification)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public org.eclipse.uml2.uml.Package getBase_Package() { | |
if (base_Package != null && base_Package.eIsProxy()) { | |
InternalEObject oldBase_Package = (InternalEObject)base_Package; | |
base_Package = (org.eclipse.uml2.uml.Package)eResolveProxy(oldBase_Package); | |
if (base_Package != oldBase_Package) { | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.RESOLVE, CorePackage.CH_GA_RESOURCE_PLATFORM__BASE_PACKAGE, oldBase_Package, base_Package)); | |
} | |
} | |
return base_Package; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public org.eclipse.uml2.uml.Package basicGetBase_Package() { | |
return base_Package; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public void setBase_Package(org.eclipse.uml2.uml.Package newBase_Package) { | |
org.eclipse.uml2.uml.Package oldBase_Package = base_Package; | |
base_Package = newBase_Package; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.CH_GA_RESOURCE_PLATFORM__BASE_PACKAGE, oldBase_Package, base_Package)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Object eGet(int featureID, boolean resolve, boolean coreType) { | |
switch (featureID) { | |
case CorePackage.CH_GA_RESOURCE_PLATFORM__BASE_INSTANCE_SPECIFICATION: | |
if (resolve) return getBase_InstanceSpecification(); | |
return basicGetBase_InstanceSpecification(); | |
case CorePackage.CH_GA_RESOURCE_PLATFORM__BASE_PACKAGE: | |
if (resolve) return getBase_Package(); | |
return basicGetBase_Package(); | |
} | |
return super.eGet(featureID, resolve, coreType); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eSet(int featureID, Object newValue) { | |
switch (featureID) { | |
case CorePackage.CH_GA_RESOURCE_PLATFORM__BASE_INSTANCE_SPECIFICATION: | |
setBase_InstanceSpecification((InstanceSpecification)newValue); | |
return; | |
case CorePackage.CH_GA_RESOURCE_PLATFORM__BASE_PACKAGE: | |
setBase_Package((org.eclipse.uml2.uml.Package)newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) { | |
switch (featureID) { | |
case CorePackage.CH_GA_RESOURCE_PLATFORM__BASE_INSTANCE_SPECIFICATION: | |
setBase_InstanceSpecification((InstanceSpecification)null); | |
return; | |
case CorePackage.CH_GA_RESOURCE_PLATFORM__BASE_PACKAGE: | |
setBase_Package((org.eclipse.uml2.uml.Package)null); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) { | |
switch (featureID) { | |
case CorePackage.CH_GA_RESOURCE_PLATFORM__BASE_INSTANCE_SPECIFICATION: | |
return base_InstanceSpecification != null; | |
case CorePackage.CH_GA_RESOURCE_PLATFORM__BASE_PACKAGE: | |
return base_Package != null; | |
} | |
return super.eIsSet(featureID); | |
} | |
} //CHGaResourcePlatformImpl |