blob: f5972e4612a83219f81dec1d2541e83ba88e327d [file] [log] [blame]
/*****************************************************************************
* Copyright (c) 2009 CEA LIST.
*
*
* 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:
* Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.portandflows.internal.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.papyrus.sysml.portandflows.FlowSpecification;
import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
import org.eclipse.uml2.uml.Interface;
/**
* <!-- begin-user-doc --> An implementation of the model object ' <em><b>Flow Specification</b></em> '. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowSpecificationImpl#getBase_Interface <em>Base Interface</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class FlowSpecificationImpl extends MinimalEObjectImpl.Container implements FlowSpecification {
/**
* The cached value of the '{@link #getBase_Interface() <em>Base Interface</em>}' reference.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @see #getBase_Interface()
* @generated
* @ordered
*/
protected Interface base_Interface;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
protected FlowSpecificationImpl() {
super();
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public Interface basicGetBase_Interface() {
return base_Interface;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PortandflowsPackage.FLOW_SPECIFICATION__BASE_INTERFACE:
if (resolve) {
return getBase_Interface();
}
return basicGetBase_Interface();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PortandflowsPackage.FLOW_SPECIFICATION__BASE_INTERFACE:
return base_Interface != null;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PortandflowsPackage.FLOW_SPECIFICATION__BASE_INTERFACE:
setBase_Interface((Interface) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return PortandflowsPackage.Literals.FLOW_SPECIFICATION;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PortandflowsPackage.FLOW_SPECIFICATION__BASE_INTERFACE:
setBase_Interface((Interface) null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public Interface getBase_Interface() {
if (base_Interface != null && base_Interface.eIsProxy()) {
InternalEObject oldBase_Interface = (InternalEObject) base_Interface;
base_Interface = (Interface) eResolveProxy(oldBase_Interface);
if (base_Interface != oldBase_Interface) {
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, PortandflowsPackage.FLOW_SPECIFICATION__BASE_INTERFACE, oldBase_Interface, base_Interface));
}
}
}
return base_Interface;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public void setBase_Interface(Interface newBase_Interface) {
Interface oldBase_Interface = base_Interface;
base_Interface = newBase_Interface;
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, PortandflowsPackage.FLOW_SPECIFICATION__BASE_INTERFACE, oldBase_Interface, base_Interface));
}
}
} // FlowSpecificationImpl