/** * 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.AtLocation; import net.certware.evidence.evidence.EvidencePackage; import net.certware.evidence.evidence.Organization; 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>At Location</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link net.certware.evidence.evidence.impl.AtLocationImpl#getLocation <em>Location</em>}</li> * </ul> * </p> * * @generated */ public class AtLocationImpl extends CustodyPropertyImpl implements AtLocation { /** * The cached value of the '{@link #getLocation() <em>Location</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getLocation() * @generated * @ordered */ protected Organization location; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected AtLocationImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return EvidencePackage.Literals.AT_LOCATION; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Organization getLocation() { if (location != null && location.eIsProxy()) { InternalEObject oldLocation = (InternalEObject)location; location = (Organization)eResolveProxy(oldLocation); if (location != oldLocation) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, EvidencePackage.AT_LOCATION__LOCATION, oldLocation, location)); } } return location; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Organization basicGetLocation() { return location; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setLocation(Organization newLocation) { Organization oldLocation = location; location = newLocation; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EvidencePackage.AT_LOCATION__LOCATION, oldLocation, location)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case EvidencePackage.AT_LOCATION__LOCATION: if (resolve) return getLocation(); return basicGetLocation(); } 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.AT_LOCATION__LOCATION: setLocation((Organization)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case EvidencePackage.AT_LOCATION__LOCATION: setLocation((Organization)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case EvidencePackage.AT_LOCATION__LOCATION: return location != null; } return super.eIsSet(featureID); } } //AtLocationImpl