| /** |
| * |
| * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| */ |
| package org.eclipse.osbp.infogrid.model.gridsource.style.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.osbp.infogrid.model.gridsource.style.CxGridCompare; |
| import org.eclipse.osbp.infogrid.model.gridsource.style.CxGridStyleConfigStringToResource; |
| import org.eclipse.osbp.infogrid.model.gridsource.style.CxGridStylePackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Config String To Resource</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.infogrid.model.gridsource.style.impl.CxGridStyleConfigStringToResourceImpl#getValue <em>Value</em>}</li> |
| * <li>{@link org.eclipse.osbp.infogrid.model.gridsource.style.impl.CxGridStyleConfigStringToResourceImpl#getCompare <em>Compare</em>}</li> |
| * <li>{@link org.eclipse.osbp.infogrid.model.gridsource.style.impl.CxGridStyleConfigStringToResourceImpl#getResourceThemePath <em>Resource Theme Path</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class CxGridStyleConfigStringToResourceImpl extends CxGridStyleConfigImpl implements CxGridStyleConfigStringToResource { |
| /** |
| * The default value of the '{@link #getValue() <em>Value</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValue() |
| * @generated |
| * @ordered |
| */ |
| protected static final String VALUE_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValue() |
| * @generated |
| * @ordered |
| */ |
| protected String value = VALUE_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getCompare() <em>Compare</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getCompare() |
| * @generated |
| * @ordered |
| */ |
| protected static final CxGridCompare COMPARE_EDEFAULT = CxGridCompare.EQUAL; |
| |
| /** |
| * The cached value of the '{@link #getCompare() <em>Compare</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getCompare() |
| * @generated |
| * @ordered |
| */ |
| protected CxGridCompare compare = COMPARE_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getResourceThemePath() <em>Resource Theme Path</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getResourceThemePath() |
| * @generated |
| * @ordered |
| */ |
| protected static final String RESOURCE_THEME_PATH_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getResourceThemePath() <em>Resource Theme Path</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getResourceThemePath() |
| * @generated |
| * @ordered |
| */ |
| protected String resourceThemePath = RESOURCE_THEME_PATH_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected CxGridStyleConfigStringToResourceImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return CxGridStylePackage.Literals.CX_GRID_STYLE_CONFIG_STRING_TO_RESOURCE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getValue() { |
| return value; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValue(String newValue) { |
| String oldValue = value; |
| value = newValue; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, CxGridStylePackage.CX_GRID_STYLE_CONFIG_STRING_TO_RESOURCE__VALUE, oldValue, value)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CxGridCompare getCompare() { |
| return compare; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setCompare(CxGridCompare newCompare) { |
| CxGridCompare oldCompare = compare; |
| compare = newCompare == null ? COMPARE_EDEFAULT : newCompare; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, CxGridStylePackage.CX_GRID_STYLE_CONFIG_STRING_TO_RESOURCE__COMPARE, oldCompare, compare)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getResourceThemePath() { |
| return resourceThemePath; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setResourceThemePath(String newResourceThemePath) { |
| String oldResourceThemePath = resourceThemePath; |
| resourceThemePath = newResourceThemePath; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, CxGridStylePackage.CX_GRID_STYLE_CONFIG_STRING_TO_RESOURCE__RESOURCE_THEME_PATH, oldResourceThemePath, resourceThemePath)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case CxGridStylePackage.CX_GRID_STYLE_CONFIG_STRING_TO_RESOURCE__VALUE: |
| return getValue(); |
| case CxGridStylePackage.CX_GRID_STYLE_CONFIG_STRING_TO_RESOURCE__COMPARE: |
| return getCompare(); |
| case CxGridStylePackage.CX_GRID_STYLE_CONFIG_STRING_TO_RESOURCE__RESOURCE_THEME_PATH: |
| return getResourceThemePath(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case CxGridStylePackage.CX_GRID_STYLE_CONFIG_STRING_TO_RESOURCE__VALUE: |
| setValue((String)newValue); |
| return; |
| case CxGridStylePackage.CX_GRID_STYLE_CONFIG_STRING_TO_RESOURCE__COMPARE: |
| setCompare((CxGridCompare)newValue); |
| return; |
| case CxGridStylePackage.CX_GRID_STYLE_CONFIG_STRING_TO_RESOURCE__RESOURCE_THEME_PATH: |
| setResourceThemePath((String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case CxGridStylePackage.CX_GRID_STYLE_CONFIG_STRING_TO_RESOURCE__VALUE: |
| setValue(VALUE_EDEFAULT); |
| return; |
| case CxGridStylePackage.CX_GRID_STYLE_CONFIG_STRING_TO_RESOURCE__COMPARE: |
| setCompare(COMPARE_EDEFAULT); |
| return; |
| case CxGridStylePackage.CX_GRID_STYLE_CONFIG_STRING_TO_RESOURCE__RESOURCE_THEME_PATH: |
| setResourceThemePath(RESOURCE_THEME_PATH_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case CxGridStylePackage.CX_GRID_STYLE_CONFIG_STRING_TO_RESOURCE__VALUE: |
| return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); |
| case CxGridStylePackage.CX_GRID_STYLE_CONFIG_STRING_TO_RESOURCE__COMPARE: |
| return compare != COMPARE_EDEFAULT; |
| case CxGridStylePackage.CX_GRID_STYLE_CONFIG_STRING_TO_RESOURCE__RESOURCE_THEME_PATH: |
| return RESOURCE_THEME_PATH_EDEFAULT == null ? resourceThemePath != null : !RESOURCE_THEME_PATH_EDEFAULT.equals(resourceThemePath); |
| } |
| 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(" (value: "); |
| result.append(value); |
| result.append(", compare: "); |
| result.append(compare); |
| result.append(", resourceThemePath: "); |
| result.append(resourceThemePath); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //CxGridStyleConfigStringToResourceImpl |