blob: 3dc80770c91c74844ddd00802d45a91418e27157 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 Fundación Tecnalia Research & Innovation.
*
* 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:
* Huascar Espinoza - initial API and implementation
* Alejandra Ruíz - initial API and implementation
* Idoya Del Río - initial API and implementation
* Mari Carmen Palacios - initial API and implementation
* Angel López - initial API and implementation
*******************************************************************************/
/**
*/
package org.eclipse.opencert.sam.agree.agreement.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.opencert.sam.agree.agreement.AgreementPackage;
import org.eclipse.opencert.sam.agree.agreement.simple;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>simple</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.opencert.sam.agree.agreement.impl.simpleImpl#getVerb <em>Verb</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class simpleImpl extends MinimalEObjectImpl.Container implements simple
{
/**
* The default value of the '{@link #getVerb() <em>Verb</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getVerb()
* @generated
* @ordered
*/
protected static final String VERB_EDEFAULT = null;
/**
* The cached value of the '{@link #getVerb() <em>Verb</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getVerb()
* @generated
* @ordered
*/
protected String verb = VERB_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected simpleImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass()
{
return AgreementPackage.Literals.SIMPLE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getVerb()
{
return verb;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setVerb(String newVerb)
{
String oldVerb = verb;
verb = newVerb;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AgreementPackage.SIMPLE__VERB, oldVerb, verb));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case AgreementPackage.SIMPLE__VERB:
return getVerb();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case AgreementPackage.SIMPLE__VERB:
setVerb((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case AgreementPackage.SIMPLE__VERB:
setVerb(VERB_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case AgreementPackage.SIMPLE__VERB:
return VERB_EDEFAULT == null ? verb != null : !VERB_EDEFAULT.equals(verb);
}
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(" (verb: ");
result.append(verb);
result.append(')');
return result.toString();
}
} //simpleImpl