/** * <copyright> * </copyright> * * $Id$ */ package org.talend.core.model.properties.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.EObjectImpl; import org.talend.core.model.properties.Information; import org.talend.core.model.properties.InformationLevel; import org.talend.core.model.properties.PropertiesPackage; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Information</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.talend.core.model.properties.impl.InformationImpl#getLevel <em>Level</em>}</li> * <li>{@link org.talend.core.model.properties.impl.InformationImpl#getType <em>Type</em>}</li> * <li>{@link org.talend.core.model.properties.impl.InformationImpl#getText <em>Text</em>}</li> * </ul> * </p> * * @generated */ public class InformationImpl extends EObjectImpl implements Information { /** * The default value of the '{@link #getLevel() <em>Level</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getLevel() * @generated * @ordered */ protected static final InformationLevel LEVEL_EDEFAULT = InformationLevel.DEBUG_LITERAL; /** * The cached value of the '{@link #getLevel() <em>Level</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getLevel() * @generated * @ordered */ protected InformationLevel level = LEVEL_EDEFAULT; /** * The default value of the '{@link #getType() <em>Type</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getType() * @generated * @ordered */ protected static final String TYPE_EDEFAULT = null; /** * The cached value of the '{@link #getType() <em>Type</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getType() * @generated * @ordered */ protected String type = TYPE_EDEFAULT; /** * The default value of the '{@link #getText() <em>Text</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getText() * @generated * @ordered */ protected static final String TEXT_EDEFAULT = null; /** * The cached value of the '{@link #getText() <em>Text</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getText() * @generated * @ordered */ protected String text = TEXT_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected InformationImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return PropertiesPackage.Literals.INFORMATION; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public InformationLevel getLevel() { return level; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setLevel(InformationLevel newLevel) { InformationLevel oldLevel = level; level = newLevel == null ? LEVEL_EDEFAULT : newLevel; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.INFORMATION__LEVEL, oldLevel, level)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getType() { return type; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setType(String newType) { String oldType = type; type = newType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.INFORMATION__TYPE, oldType, type)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getText() { return text; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setText(String newText) { String oldText = text; text = newText; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.INFORMATION__TEXT, oldText, text)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case PropertiesPackage.INFORMATION__LEVEL: return getLevel(); case PropertiesPackage.INFORMATION__TYPE: return getType(); case PropertiesPackage.INFORMATION__TEXT: return getText(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case PropertiesPackage.INFORMATION__LEVEL: setLevel((InformationLevel)newValue); return; case PropertiesPackage.INFORMATION__TYPE: setType((String)newValue); return; case PropertiesPackage.INFORMATION__TEXT: setText((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case PropertiesPackage.INFORMATION__LEVEL: setLevel(LEVEL_EDEFAULT); return; case PropertiesPackage.INFORMATION__TYPE: setType(TYPE_EDEFAULT); return; case PropertiesPackage.INFORMATION__TEXT: setText(TEXT_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case PropertiesPackage.INFORMATION__LEVEL: return level != LEVEL_EDEFAULT; case PropertiesPackage.INFORMATION__TYPE: return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); case PropertiesPackage.INFORMATION__TEXT: return TEXT_EDEFAULT == null ? text != null : !TEXT_EDEFAULT.equals(text); } 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(" (level: "); result.append(level); result.append(", type: "); result.append(type); result.append(", text: "); result.append(text); result.append(')'); return result.toString(); } } //InformationImpl