blob: d322866d6e99019960ef5e0598d0d024489aa367 [file] [log] [blame]
/*=============================================================================#
# Copyright (c) 2012, 2021 Stephan Wahlbrink and others.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# Stephan Wahlbrink <sw@wahlbrink.eu> - initial API and implementation
#=============================================================================*/
package org.eclipse.statet.rtm.ggplot.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.eclipse.statet.rtm.ggplot.GGPlotPackage;
import org.eclipse.statet.rtm.ggplot.Layer;
import org.eclipse.statet.rtm.rtdata.types.RTypedExpr;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Layer</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.statet.rtm.ggplot.impl.LayerImpl#getData <em>Data</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public abstract class LayerImpl extends EObjectImpl implements Layer {
/**
* The default value of the '{@link #getData() <em>Data</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getData()
* @generated
* @ordered
*/
protected static final RTypedExpr DATA_EDEFAULT= null;
/**
* The cached value of the '{@link #getData() <em>Data</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getData()
* @generated
* @ordered
*/
protected RTypedExpr data= DATA_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected LayerImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return GGPlotPackage.Literals.LAYER;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public RTypedExpr getData() {
return this.data;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setData(final RTypedExpr newData) {
final RTypedExpr oldData= this.data;
this.data= newData;
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, GGPlotPackage.LAYER__DATA, oldData, this.data));
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(final int featureID, final boolean resolve, final boolean coreType) {
switch (featureID) {
case GGPlotPackage.LAYER__DATA:
return getData();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(final int featureID, final Object newValue) {
switch (featureID) {
case GGPlotPackage.LAYER__DATA:
setData((RTypedExpr)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(final int featureID) {
switch (featureID) {
case GGPlotPackage.LAYER__DATA:
setData(DATA_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(final int featureID) {
switch (featureID) {
case GGPlotPackage.LAYER__DATA:
return DATA_EDEFAULT == null ? this.data != null : !DATA_EDEFAULT.equals(this.data);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) {
return super.toString();
}
final StringBuffer result= new StringBuffer(super.toString());
result.append(" (data: "); //$NON-NLS-1$
result.append(this.data);
result.append(')');
return result.toString();
}
} //LayerImpl