/** * Copyright (c) 2015-2016 Inria * 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: * - Fawaz Paraiso <fawaz.paraiso@inria.fr> * - Philippe Merle <philippe.merle@inria.fr> */ package org.occiware.clouddesigner.occi.cloud.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.occiware.clouddesigner.occi.cloud.CloudPackage; import org.occiware.clouddesigner.occi.cloud.Machine_CloudSigma; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Machine Cloud Sigma</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link org.occiware.clouddesigner.occi.cloud.impl.Machine_CloudSigmaImpl#getProvider <em>Provider</em>}</li> * <li>{@link org.occiware.clouddesigner.occi.cloud.impl.Machine_CloudSigmaImpl#getEmail <em>Email</em>}</li> * <li>{@link org.occiware.clouddesigner.occi.cloud.impl.Machine_CloudSigmaImpl#getPassword <em>Password</em>}</li> * </ul> * * @generated */ public class Machine_CloudSigmaImpl extends MachineImpl implements Machine_CloudSigma { /** * The default value of the '{@link #getProvider() <em>Provider</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getProvider() * @generated * @ordered */ protected static final String PROVIDER_EDEFAULT = null; /** * The cached value of the '{@link #getProvider() <em>Provider</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getProvider() * @generated * @ordered */ protected String provider = PROVIDER_EDEFAULT; /** * The default value of the '{@link #getEmail() <em>Email</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getEmail() * @generated * @ordered */ protected static final String EMAIL_EDEFAULT = null; /** * The cached value of the '{@link #getEmail() <em>Email</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getEmail() * @generated * @ordered */ protected String email = EMAIL_EDEFAULT; /** * The default value of the '{@link #getPassword() <em>Password</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getPassword() * @generated * @ordered */ protected static final String PASSWORD_EDEFAULT = null; /** * The cached value of the '{@link #getPassword() <em>Password</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getPassword() * @generated * @ordered */ protected String password = PASSWORD_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Machine_CloudSigmaImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return CloudPackage.Literals.MACHINE_CLOUD_SIGMA; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getProvider() { return provider; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setProvider(String newProvider) { String oldProvider = provider; provider = newProvider; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CloudPackage.MACHINE_CLOUD_SIGMA__PROVIDER, oldProvider, provider)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getEmail() { return email; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setEmail(String newEmail) { String oldEmail = email; email = newEmail; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CloudPackage.MACHINE_CLOUD_SIGMA__EMAIL, oldEmail, email)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getPassword() { return password; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setPassword(String newPassword) { String oldPassword = password; password = newPassword; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CloudPackage.MACHINE_CLOUD_SIGMA__PASSWORD, oldPassword, password)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case CloudPackage.MACHINE_CLOUD_SIGMA__PROVIDER: return getProvider(); case CloudPackage.MACHINE_CLOUD_SIGMA__EMAIL: return getEmail(); case CloudPackage.MACHINE_CLOUD_SIGMA__PASSWORD: return getPassword(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case CloudPackage.MACHINE_CLOUD_SIGMA__PROVIDER: setProvider((String)newValue); return; case CloudPackage.MACHINE_CLOUD_SIGMA__EMAIL: setEmail((String)newValue); return; case CloudPackage.MACHINE_CLOUD_SIGMA__PASSWORD: setPassword((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case CloudPackage.MACHINE_CLOUD_SIGMA__PROVIDER: setProvider(PROVIDER_EDEFAULT); return; case CloudPackage.MACHINE_CLOUD_SIGMA__EMAIL: setEmail(EMAIL_EDEFAULT); return; case CloudPackage.MACHINE_CLOUD_SIGMA__PASSWORD: setPassword(PASSWORD_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case CloudPackage.MACHINE_CLOUD_SIGMA__PROVIDER: return PROVIDER_EDEFAULT == null ? provider != null : !PROVIDER_EDEFAULT.equals(provider); case CloudPackage.MACHINE_CLOUD_SIGMA__EMAIL: return EMAIL_EDEFAULT == null ? email != null : !EMAIL_EDEFAULT.equals(email); case CloudPackage.MACHINE_CLOUD_SIGMA__PASSWORD: return PASSWORD_EDEFAULT == null ? password != null : !PASSWORD_EDEFAULT.equals(password); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (provider: "); result.append(provider); result.append(", email: "); result.append(email); result.append(", password: "); result.append(password); result.append(')'); return result.toString(); } } //Machine_CloudSigmaImpl