| /******************************************************************************* |
| * Copyright (c) 2018 Willink Transformations and others. |
| * 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: |
| * Adolfo Sanchez-Barbudo Herrera - initial API and implementation |
| *******************************************************************************/ |
| /** |
| * generated by Xtext 2.10.0 |
| */ |
| package org.eclipse.qvtd.doc.minioclcs.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.qvtd.doc.minioclcs.ImportCS; |
| import org.eclipse.qvtd.doc.minioclcs.MinioclcsPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Import CS</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.qvtd.doc.minioclcs.impl.ImportCSImpl#getAlias <em>Alias</em>}</li> |
| * <li>{@link org.eclipse.qvtd.doc.minioclcs.impl.ImportCSImpl#getUri <em>Uri</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ImportCSImpl extends CSTraceImpl implements ImportCS |
| { |
| /** |
| * 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; |
| |
| /** |
| * The default value of the '{@link #getUri() <em>Uri</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getUri() |
| * @generated |
| * @ordered |
| */ |
| protected static final String URI_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getUri() <em>Uri</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getUri() |
| * @generated |
| * @ordered |
| */ |
| protected String uri = URI_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ImportCSImpl() |
| { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() |
| { |
| return MinioclcsPackage.Literals.IMPORT_CS; |
| } |
| |
| /** |
| * <!-- 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, MinioclcsPackage.IMPORT_CS__ALIAS, oldAlias, alias)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getUri() |
| { |
| return uri; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setUri(String newUri) |
| { |
| String oldUri = uri; |
| uri = newUri; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, MinioclcsPackage.IMPORT_CS__URI, oldUri, uri)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) |
| { |
| switch (featureID) { |
| case MinioclcsPackage.IMPORT_CS__ALIAS: |
| return getAlias(); |
| case MinioclcsPackage.IMPORT_CS__URI: |
| return getUri(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) |
| { |
| switch (featureID) { |
| case MinioclcsPackage.IMPORT_CS__ALIAS: |
| setAlias((String)newValue); |
| return; |
| case MinioclcsPackage.IMPORT_CS__URI: |
| setUri((String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) |
| { |
| switch (featureID) { |
| case MinioclcsPackage.IMPORT_CS__ALIAS: |
| setAlias(ALIAS_EDEFAULT); |
| return; |
| case MinioclcsPackage.IMPORT_CS__URI: |
| setUri(URI_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) |
| { |
| switch (featureID) { |
| case MinioclcsPackage.IMPORT_CS__ALIAS: |
| return ALIAS_EDEFAULT == null ? alias != null : !ALIAS_EDEFAULT.equals(alias); |
| case MinioclcsPackage.IMPORT_CS__URI: |
| return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); |
| } |
| 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(", uri: "); |
| result.append(uri); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //ImportCSImpl |