All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openxma.dsl.dom.model.impl.TrimFunctionImpl Maven / Gradle / Ivy

/**
 * 
 * 
 *
 * $Id$
 */
package org.openxma.dsl.dom.model.impl;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.openxma.dsl.dom.DomPackage;
import org.openxma.dsl.dom.model.Expression;
import org.openxma.dsl.dom.model.StringLiteralValue;
import org.openxma.dsl.dom.model.TrimFunction;

/**
 * 
 * An implementation of the model object 'Trim Function'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.openxma.dsl.dom.model.impl.TrimFunctionImpl#getFunction Function}
  • *
  • {@link org.openxma.dsl.dom.model.impl.TrimFunctionImpl#getMode Mode}
  • *
  • {@link org.openxma.dsl.dom.model.impl.TrimFunctionImpl#getCharacter Character}
  • *
  • {@link org.openxma.dsl.dom.model.impl.TrimFunctionImpl#getFrom From}
  • *
*

* * @generated */ public class TrimFunctionImpl extends ExpressionImpl implements TrimFunction { /** * The default value of the '{@link #getFunction() Function}' attribute. * * * @see #getFunction() * @generated * @ordered */ protected static final String FUNCTION_EDEFAULT = null; /** * The cached value of the '{@link #getFunction() Function}' attribute. * * * @see #getFunction() * @generated * @ordered */ protected String function = FUNCTION_EDEFAULT; /** * The default value of the '{@link #getMode() Mode}' attribute. * * * @see #getMode() * @generated * @ordered */ protected static final String MODE_EDEFAULT = null; /** * The cached value of the '{@link #getMode() Mode}' attribute. * * * @see #getMode() * @generated * @ordered */ protected String mode = MODE_EDEFAULT; /** * The cached value of the '{@link #getCharacter() Character}' containment reference. * * * @see #getCharacter() * @generated * @ordered */ protected StringLiteralValue character; /** * The cached value of the '{@link #getFrom() From}' containment reference. * * * @see #getFrom() * @generated * @ordered */ protected Expression from; /** * * * @generated */ protected TrimFunctionImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return DomPackage.Literals.TRIM_FUNCTION; } /** * * * @generated */ public String getFunction() { return function; } /** * * * @generated */ public void setFunction(String newFunction) { String oldFunction = function; function = newFunction; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.TRIM_FUNCTION__FUNCTION, oldFunction, function)); } /** * * * @generated */ public String getMode() { return mode; } /** * * * @generated */ public void setMode(String newMode) { String oldMode = mode; mode = newMode; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.TRIM_FUNCTION__MODE, oldMode, mode)); } /** * * * @generated */ public StringLiteralValue getCharacter() { return character; } /** * * * @generated */ public NotificationChain basicSetCharacter(StringLiteralValue newCharacter, NotificationChain msgs) { StringLiteralValue oldCharacter = character; character = newCharacter; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DomPackage.TRIM_FUNCTION__CHARACTER, oldCharacter, newCharacter); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setCharacter(StringLiteralValue newCharacter) { if (newCharacter != character) { NotificationChain msgs = null; if (character != null) msgs = ((InternalEObject)character).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DomPackage.TRIM_FUNCTION__CHARACTER, null, msgs); if (newCharacter != null) msgs = ((InternalEObject)newCharacter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DomPackage.TRIM_FUNCTION__CHARACTER, null, msgs); msgs = basicSetCharacter(newCharacter, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.TRIM_FUNCTION__CHARACTER, newCharacter, newCharacter)); } /** * * * @generated */ public Expression getFrom() { return from; } /** * * * @generated */ public NotificationChain basicSetFrom(Expression newFrom, NotificationChain msgs) { Expression oldFrom = from; from = newFrom; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DomPackage.TRIM_FUNCTION__FROM, oldFrom, newFrom); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setFrom(Expression newFrom) { if (newFrom != from) { NotificationChain msgs = null; if (from != null) msgs = ((InternalEObject)from).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DomPackage.TRIM_FUNCTION__FROM, null, msgs); if (newFrom != null) msgs = ((InternalEObject)newFrom).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DomPackage.TRIM_FUNCTION__FROM, null, msgs); msgs = basicSetFrom(newFrom, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.TRIM_FUNCTION__FROM, newFrom, newFrom)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case DomPackage.TRIM_FUNCTION__CHARACTER: return basicSetCharacter(null, msgs); case DomPackage.TRIM_FUNCTION__FROM: return basicSetFrom(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DomPackage.TRIM_FUNCTION__FUNCTION: return getFunction(); case DomPackage.TRIM_FUNCTION__MODE: return getMode(); case DomPackage.TRIM_FUNCTION__CHARACTER: return getCharacter(); case DomPackage.TRIM_FUNCTION__FROM: return getFrom(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DomPackage.TRIM_FUNCTION__FUNCTION: setFunction((String)newValue); return; case DomPackage.TRIM_FUNCTION__MODE: setMode((String)newValue); return; case DomPackage.TRIM_FUNCTION__CHARACTER: setCharacter((StringLiteralValue)newValue); return; case DomPackage.TRIM_FUNCTION__FROM: setFrom((Expression)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DomPackage.TRIM_FUNCTION__FUNCTION: setFunction(FUNCTION_EDEFAULT); return; case DomPackage.TRIM_FUNCTION__MODE: setMode(MODE_EDEFAULT); return; case DomPackage.TRIM_FUNCTION__CHARACTER: setCharacter((StringLiteralValue)null); return; case DomPackage.TRIM_FUNCTION__FROM: setFrom((Expression)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DomPackage.TRIM_FUNCTION__FUNCTION: return FUNCTION_EDEFAULT == null ? function != null : !FUNCTION_EDEFAULT.equals(function); case DomPackage.TRIM_FUNCTION__MODE: return MODE_EDEFAULT == null ? mode != null : !MODE_EDEFAULT.equals(mode); case DomPackage.TRIM_FUNCTION__CHARACTER: return character != null; case DomPackage.TRIM_FUNCTION__FROM: return from != null; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (function: "); result.append(function); result.append(", mode: "); result.append(mode); result.append(')'); return result.toString(); } } //TrimFunctionImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy