/** */ package net.gexf_1_2.viz.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.eclipse.emf.ecore.impl.MinimalEObjectImpl; import net.gexf_1_2.gexf.SpellsContent; import net.gexf_1_2.viz.SizeContent; import net.gexf_1_2.viz.VizPackage; /** * <!-- begin-user-doc --> An implementation of the model object '<em><b>Size Content</b></em>'. <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link net.gexf_1_2.viz.impl.SizeContentImpl#getSpells <em>Spells</em>}</li> * <li>{@link net.gexf_1_2.viz.impl.SizeContentImpl#getEnd <em>End</em>}</li> * <li>{@link net.gexf_1_2.viz.impl.SizeContentImpl#getEndopen <em>Endopen</em>}</li> * <li>{@link net.gexf_1_2.viz.impl.SizeContentImpl#getStart <em>Start</em>}</li> * <li>{@link net.gexf_1_2.viz.impl.SizeContentImpl#getStartopen <em>Startopen</em>}</li> * <li>{@link net.gexf_1_2.viz.impl.SizeContentImpl#getValue <em>Value</em>}</li> * </ul> * * @generated */ public class SizeContentImpl extends MinimalEObjectImpl.Container implements SizeContent { /** * The cached value of the '{@link #getSpells() <em>Spells</em>}' containment reference. <!-- begin-user-doc --> * <!-- end-user-doc --> * * @see #getSpells() * @generated * @ordered */ protected SpellsContent spells; /** * The default value of the '{@link #getEnd() <em>End</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc * --> * * @see #getEnd() * @generated * @ordered */ protected static final Object END_EDEFAULT = null; /** * The cached value of the '{@link #getEnd() <em>End</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * * @see #getEnd() * @generated * @ordered */ protected Object end = END_EDEFAULT; /** * The default value of the '{@link #getEndopen() <em>Endopen</em>}' attribute. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @see #getEndopen() * @generated * @ordered */ protected static final Object ENDOPEN_EDEFAULT = null; /** * The cached value of the '{@link #getEndopen() <em>Endopen</em>}' attribute. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @see #getEndopen() * @generated * @ordered */ protected Object endopen = ENDOPEN_EDEFAULT; /** * The default value of the '{@link #getStart() <em>Start</em>}' attribute. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @see #getStart() * @generated * @ordered */ protected static final Object START_EDEFAULT = null; /** * The cached value of the '{@link #getStart() <em>Start</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc * --> * * @see #getStart() * @generated * @ordered */ protected Object start = START_EDEFAULT; /** * The default value of the '{@link #getStartopen() <em>Startopen</em>}' attribute. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @see #getStartopen() * @generated * @ordered */ protected static final Object STARTOPEN_EDEFAULT = null; /** * The cached value of the '{@link #getStartopen() <em>Startopen</em>}' attribute. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @see #getStartopen() * @generated * @ordered */ protected Object startopen = STARTOPEN_EDEFAULT; /** * The default value of the '{@link #getValue() <em>Value</em>}' attribute. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @see #getValue() * @generated * @ordered */ protected static final float VALUE_EDEFAULT = 0.0F; /** * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc * --> * * @see #getValue() * @generated * @ordered */ protected float value = VALUE_EDEFAULT; /** * This is true if the Value attribute has been set. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ protected boolean valueESet; /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ protected SizeContentImpl() { super(); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override protected EClass eStaticClass() { return VizPackage.Literals.SIZE_CONTENT; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public SpellsContent getSpells() { return spells; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ public NotificationChain basicSetSpells(SpellsContent newSpells, NotificationChain msgs) { SpellsContent oldSpells = spells; spells = newSpells; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, VizPackage.SIZE_CONTENT__SPELLS, oldSpells, newSpells); if (msgs == null) { msgs = notification; } else { msgs.add(notification); } } return msgs; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public void setSpells(SpellsContent newSpells) { if (newSpells != spells) { NotificationChain msgs = null; if (spells != null) { msgs = ((InternalEObject) spells).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - VizPackage.SIZE_CONTENT__SPELLS, null, msgs); } if (newSpells != null) { msgs = ((InternalEObject) newSpells).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - VizPackage.SIZE_CONTENT__SPELLS, null, msgs); } msgs = basicSetSpells(newSpells, msgs); if (msgs != null) { msgs.dispatch(); } } else if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, VizPackage.SIZE_CONTENT__SPELLS, newSpells, newSpells)); } } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public Object getEnd() { return end; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public void setEnd(Object newEnd) { Object oldEnd = end; end = newEnd; if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, VizPackage.SIZE_CONTENT__END, oldEnd, end)); } } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public Object getEndopen() { return endopen; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public void setEndopen(Object newEndopen) { Object oldEndopen = endopen; endopen = newEndopen; if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, VizPackage.SIZE_CONTENT__ENDOPEN, oldEndopen, endopen)); } } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public Object getStart() { return start; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public void setStart(Object newStart) { Object oldStart = start; start = newStart; if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, VizPackage.SIZE_CONTENT__START, oldStart, start)); } } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public Object getStartopen() { return startopen; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public void setStartopen(Object newStartopen) { Object oldStartopen = startopen; startopen = newStartopen; if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, VizPackage.SIZE_CONTENT__STARTOPEN, oldStartopen, startopen)); } } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public float getValue() { return value; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public void setValue(float newValue) { float oldValue = value; value = newValue; boolean oldValueESet = valueESet; valueESet = true; if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, VizPackage.SIZE_CONTENT__VALUE, oldValue, value, !oldValueESet)); } } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public void unsetValue() { float oldValue = value; boolean oldValueESet = valueESet; value = VALUE_EDEFAULT; valueESet = false; if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.UNSET, VizPackage.SIZE_CONTENT__VALUE, oldValue, VALUE_EDEFAULT, oldValueESet)); } } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public boolean isSetValue() { return valueESet; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case VizPackage.SIZE_CONTENT__SPELLS: return basicSetSpells(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case VizPackage.SIZE_CONTENT__SPELLS: return getSpells(); case VizPackage.SIZE_CONTENT__END: return getEnd(); case VizPackage.SIZE_CONTENT__ENDOPEN: return getEndopen(); case VizPackage.SIZE_CONTENT__START: return getStart(); case VizPackage.SIZE_CONTENT__STARTOPEN: return getStartopen(); case VizPackage.SIZE_CONTENT__VALUE: return getValue(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case VizPackage.SIZE_CONTENT__SPELLS: setSpells((SpellsContent) newValue); return; case VizPackage.SIZE_CONTENT__END: setEnd(newValue); return; case VizPackage.SIZE_CONTENT__ENDOPEN: setEndopen(newValue); return; case VizPackage.SIZE_CONTENT__START: setStart(newValue); return; case VizPackage.SIZE_CONTENT__STARTOPEN: setStartopen(newValue); return; case VizPackage.SIZE_CONTENT__VALUE: setValue((Float) newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case VizPackage.SIZE_CONTENT__SPELLS: setSpells((SpellsContent) null); return; case VizPackage.SIZE_CONTENT__END: setEnd(END_EDEFAULT); return; case VizPackage.SIZE_CONTENT__ENDOPEN: setEndopen(ENDOPEN_EDEFAULT); return; case VizPackage.SIZE_CONTENT__START: setStart(START_EDEFAULT); return; case VizPackage.SIZE_CONTENT__STARTOPEN: setStartopen(STARTOPEN_EDEFAULT); return; case VizPackage.SIZE_CONTENT__VALUE: unsetValue(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case VizPackage.SIZE_CONTENT__SPELLS: return spells != null; case VizPackage.SIZE_CONTENT__END: return END_EDEFAULT == null ? end != null : !END_EDEFAULT.equals(end); case VizPackage.SIZE_CONTENT__ENDOPEN: return ENDOPEN_EDEFAULT == null ? endopen != null : !ENDOPEN_EDEFAULT.equals(endopen); case VizPackage.SIZE_CONTENT__START: return START_EDEFAULT == null ? start != null : !START_EDEFAULT.equals(start); case VizPackage.SIZE_CONTENT__STARTOPEN: return STARTOPEN_EDEFAULT == null ? startopen != null : !STARTOPEN_EDEFAULT.equals(startopen); case VizPackage.SIZE_CONTENT__VALUE: return isSetValue(); } 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(" (end: "); result.append(end); result.append(", endopen: "); result.append(endopen); result.append(", start: "); result.append(start); result.append(", startopen: "); result.append(startopen); result.append(", value: "); if (valueESet) { result.append(value); } else { result.append("<unset>"); } result.append(')'); return result.toString(); } } // SizeContentImpl