/** * Copyright (c) 2011 Object Management Group (SAEM metamodel) * Copyright (c) 2010-2011 United States Government as represented by the Administrator for The National Aeronautics and Space Administration. All Rights Reserved. */ package net.certware.evidence.evidence.impl; import net.certware.evidence.evidence.CollectionMethod; import net.certware.evidence.evidence.EvidencePackage; import net.certware.evidence.evidence.UsingProcess; 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; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Using Process</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link net.certware.evidence.evidence.impl.UsingProcessImpl#getMethod <em>Method</em>}</li> * </ul> * </p> * * @generated */ public class UsingProcessImpl extends CustodyPropertyImpl implements UsingProcess { /** * The cached value of the '{@link #getMethod() <em>Method</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getMethod() * @generated * @ordered */ protected CollectionMethod method; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected UsingProcessImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return EvidencePackage.Literals.USING_PROCESS; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public CollectionMethod getMethod() { if (method != null && method.eIsProxy()) { InternalEObject oldMethod = (InternalEObject)method; method = (CollectionMethod)eResolveProxy(oldMethod); if (method != oldMethod) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, EvidencePackage.USING_PROCESS__METHOD, oldMethod, method)); } } return method; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public CollectionMethod basicGetMethod() { return method; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setMethod(CollectionMethod newMethod) { CollectionMethod oldMethod = method; method = newMethod; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EvidencePackage.USING_PROCESS__METHOD, oldMethod, method)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case EvidencePackage.USING_PROCESS__METHOD: if (resolve) return getMethod(); return basicGetMethod(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case EvidencePackage.USING_PROCESS__METHOD: setMethod((CollectionMethod)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case EvidencePackage.USING_PROCESS__METHOD: setMethod((CollectionMethod)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case EvidencePackage.USING_PROCESS__METHOD: return method != null; } return super.eIsSet(featureID); } } //UsingProcessImpl