| /** |
| * Copyright (c) 2017 CEA LIST. |
| * |
| * 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: |
| * Sébastien Gerard (CEA LIST) <sebastien.gerard@cea.fr> - Initial API and implementation |
| * Yupanqui Munoz Julho (CEA LIST) <yupanqui.munozjulho@cea.fr> - Initial API and implementation |
| * |
| */ |
| package org.eclipse.papyrus.requirements.sysml14.papyrusre.requirementgenericcharacteristics.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; |
| |
| import org.eclipse.papyrus.requirements.sysml14.papyrusre.modellibrary.papyrusrestandardutils.requirementclassificationconcerns.QualityKind; |
| import org.eclipse.papyrus.requirements.sysml14.papyrusre.requirementgenericcharacteristics.QualityNatureReqCharac; |
| import org.eclipse.papyrus.requirements.sysml14.papyrusre.requirementgenericcharacteristics.RequirementGenericCharacteristicsPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Quality Nature Req Charac</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.papyrus.requirements.sysml14.papyrusre.requirementgenericcharacteristics.impl.QualityNatureReqCharacImpl#getQualityNature <em>Quality Nature</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class QualityNatureReqCharacImpl extends MinimalEObjectImpl.Container implements QualityNatureReqCharac { |
| /** |
| * The default value of the '{@link #getQualityNature() <em>Quality Nature</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getQualityNature() |
| * @generated |
| * @ordered |
| */ |
| protected static final QualityKind QUALITY_NATURE_EDEFAULT = QualityKind.ADAPTABILITY; |
| |
| /** |
| * The cached value of the '{@link #getQualityNature() <em>Quality Nature</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getQualityNature() |
| * @generated |
| * @ordered |
| */ |
| protected QualityKind qualityNature = QUALITY_NATURE_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected QualityNatureReqCharacImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return RequirementGenericCharacteristicsPackage.Literals.QUALITY_NATURE_REQ_CHARAC; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public QualityKind getQualityNature() { |
| return qualityNature; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setQualityNature(QualityKind newQualityNature) { |
| QualityKind oldQualityNature = qualityNature; |
| qualityNature = newQualityNature == null ? QUALITY_NATURE_EDEFAULT : newQualityNature; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, RequirementGenericCharacteristicsPackage.QUALITY_NATURE_REQ_CHARAC__QUALITY_NATURE, oldQualityNature, qualityNature)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case RequirementGenericCharacteristicsPackage.QUALITY_NATURE_REQ_CHARAC__QUALITY_NATURE: |
| return getQualityNature(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case RequirementGenericCharacteristicsPackage.QUALITY_NATURE_REQ_CHARAC__QUALITY_NATURE: |
| setQualityNature((QualityKind)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case RequirementGenericCharacteristicsPackage.QUALITY_NATURE_REQ_CHARAC__QUALITY_NATURE: |
| setQualityNature(QUALITY_NATURE_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case RequirementGenericCharacteristicsPackage.QUALITY_NATURE_REQ_CHARAC__QUALITY_NATURE: |
| return qualityNature != QUALITY_NATURE_EDEFAULT; |
| } |
| 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(" (qualityNature: "); //$NON-NLS-1$ |
| result.append(qualityNature); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //QualityNatureReqCharacImpl |