blob: f44d7ec3d6616d7904686cc4bef125968ffa01b3 [file] [log] [blame]
/**
* Copyright (c) 2016 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:
* CEA LIST - Initial API and implementation
*
*/
package org.omg.smm.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.omg.smm.EquivalentMeasureRelationship;
import org.omg.smm.Operation;
import org.omg.smm.SmmPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Equivalent Measure Relationship</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.omg.smm.impl.EquivalentMeasureRelationshipImpl#getMapping <em>Mapping</em>}</li>
* </ul>
*
* @generated
*/
public class EquivalentMeasureRelationshipImpl extends MeasureRelationshipImpl implements EquivalentMeasureRelationship {
/**
* The cached value of the '{@link #getMapping() <em>Mapping</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMapping()
* @generated
* @ordered
*/
protected Operation mapping;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EquivalentMeasureRelationshipImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SmmPackage.Literals.EQUIVALENT_MEASURE_RELATIONSHIP;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Operation getMapping() {
if (mapping != null && mapping.eIsProxy()) {
InternalEObject oldMapping = (InternalEObject)mapping;
mapping = (Operation)eResolveProxy(oldMapping);
if (mapping != oldMapping) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, SmmPackage.EQUIVALENT_MEASURE_RELATIONSHIP__MAPPING, oldMapping, mapping));
}
}
return mapping;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Operation basicGetMapping() {
return mapping;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setMapping(Operation newMapping) {
Operation oldMapping = mapping;
mapping = newMapping;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SmmPackage.EQUIVALENT_MEASURE_RELATIONSHIP__MAPPING, oldMapping, mapping));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SmmPackage.EQUIVALENT_MEASURE_RELATIONSHIP__MAPPING:
if (resolve) return getMapping();
return basicGetMapping();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SmmPackage.EQUIVALENT_MEASURE_RELATIONSHIP__MAPPING:
setMapping((Operation)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SmmPackage.EQUIVALENT_MEASURE_RELATIONSHIP__MAPPING:
setMapping((Operation)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SmmPackage.EQUIVALENT_MEASURE_RELATIONSHIP__MAPPING:
return mapping != null;
}
return super.eIsSet(featureID);
}
} //EquivalentMeasureRelationshipImpl