/** * <copyright> * </copyright> * * $Id$ */ package edu.isistan.uima.unified.typesystems.nlp.impl; import edu.isistan.uima.unified.typesystems.impl.IdentifiableAnnotationImpl; import edu.isistan.uima.unified.typesystems.nlp.Entity; import edu.isistan.uima.unified.typesystems.nlp.NLPPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Entity</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link edu.isistan.uima.unified.typesystems.nlp.impl.EntityImpl#getKind <em>Kind</em>}</li> * </ul> * </p> * * @generated */ public class EntityImpl extends IdentifiableAnnotationImpl implements Entity { /** * The default value of the '{@link #getKind() <em>Kind</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getKind() * @generated * @ordered */ protected static final String KIND_EDEFAULT = null; /** * The cached value of the '{@link #getKind() <em>Kind</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getKind() * @generated * @ordered */ protected String kind = KIND_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected EntityImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return NLPPackage.Literals.ENTITY; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getKind() { return kind; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setKind(String newKind) { String oldKind = kind; kind = newKind; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NLPPackage.ENTITY__KIND, oldKind, kind)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case NLPPackage.ENTITY__KIND: return getKind(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case NLPPackage.ENTITY__KIND: setKind((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case NLPPackage.ENTITY__KIND: setKind(KIND_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case NLPPackage.ENTITY__KIND: return KIND_EDEFAULT == null ? kind != null : !KIND_EDEFAULT.equals(kind); } 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(" (kind: "); result.append(kind); result.append(')'); return result.toString(); } } //EntityImpl