blob: d8b99298d87868b570a9dd613e35dba284a0d783 [file] [log] [blame]
/**
* 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.requirementgenericcharacteristics.OwnerReqCharac;
import org.eclipse.papyrus.requirements.sysml14.papyrusre.requirementgenericcharacteristics.RequirementGenericCharacteristicsPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Owner 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.OwnerReqCharacImpl#getOwner <em>Owner</em>}</li>
* </ul>
*
* @generated
*/
public class OwnerReqCharacImpl extends MinimalEObjectImpl.Container implements OwnerReqCharac {
/**
* The default value of the '{@link #getOwner() <em>Owner</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getOwner()
* @generated
* @ordered
*/
protected static final String OWNER_EDEFAULT = null;
/**
* The cached value of the '{@link #getOwner() <em>Owner</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getOwner()
* @generated
* @ordered
*/
protected String owner = OWNER_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected OwnerReqCharacImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return RequirementGenericCharacteristicsPackage.Literals.OWNER_REQ_CHARAC;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getOwner() {
return owner;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setOwner(String newOwner) {
String oldOwner = owner;
owner = newOwner;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, RequirementGenericCharacteristicsPackage.OWNER_REQ_CHARAC__OWNER, oldOwner, owner));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case RequirementGenericCharacteristicsPackage.OWNER_REQ_CHARAC__OWNER:
return getOwner();
}
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.OWNER_REQ_CHARAC__OWNER:
setOwner((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case RequirementGenericCharacteristicsPackage.OWNER_REQ_CHARAC__OWNER:
setOwner(OWNER_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case RequirementGenericCharacteristicsPackage.OWNER_REQ_CHARAC__OWNER:
return OWNER_EDEFAULT == null ? owner != null : !OWNER_EDEFAULT.equals(owner);
}
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(" (owner: "); //$NON-NLS-1$
result.append(owner);
result.append(')');
return result.toString();
}
} //OwnerReqCharacImpl