/** * 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.docker.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.docker.DockerPackage; import org.occiware.clouddesigner.occi.docker.Link; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Link</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link org.occiware.clouddesigner.occi.docker.impl.LinkImpl#getAlias <em>Alias</em>}</li> * </ul> * * @generated */ public class LinkImpl extends org.occiware.clouddesigner.occi.impl.LinkImpl implements Link { /** * The default value of the '{@link #getAlias() <em>Alias</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getAlias() * @generated * @ordered */ protected static final String ALIAS_EDEFAULT = null; /** * The cached value of the '{@link #getAlias() <em>Alias</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getAlias() * @generated * @ordered */ protected String alias = ALIAS_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected LinkImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return DockerPackage.Literals.LINK; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getAlias() { return alias; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setAlias(String newAlias) { String oldAlias = alias; alias = newAlias; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.LINK__ALIAS, oldAlias, alias)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DockerPackage.LINK__ALIAS: return getAlias(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DockerPackage.LINK__ALIAS: setAlias((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DockerPackage.LINK__ALIAS: setAlias(ALIAS_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DockerPackage.LINK__ALIAS: return ALIAS_EDEFAULT == null ? alias != null : !ALIAS_EDEFAULT.equals(alias); } 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(" (alias: "); result.append(alias); result.append(')'); return result.toString(); } } //LinkImpl