| /** |
| * Copyright (c) 2014, Loetz GmbH&Co.KG (Heidelberg) |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http{//www.eclipse.org/legal/epl-v10.html |
| * |
| * Based on ideas from Xtext, Xtend, Xcore |
| * |
| * Contributors: |
| * Loetz GmbH&Co.KG - Initial implementation |
| * |
| */ |
| package org.eclipse.osbp.xtext.blip.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.xtext.blip.BlipDSLPackage; |
| import org.eclipse.osbp.xtext.blip.BlipFilter; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Blip Filter</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.blip.impl.BlipFilterImpl#getFilterName <em>Filter Name</em>}</li> |
| * <li>{@link org.eclipse.osbp.xtext.blip.impl.BlipFilterImpl#getFilterValue <em>Filter Value</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class BlipFilterImpl extends BlipLazyResolverImpl implements BlipFilter { |
| /** |
| * The default value of the '{@link #getFilterName() <em>Filter Name</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getFilterName() |
| * @generated |
| * @ordered |
| */ |
| protected static final String FILTER_NAME_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getFilterName() <em>Filter Name</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getFilterName() |
| * @generated |
| * @ordered |
| */ |
| protected String filterName = FILTER_NAME_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getFilterValue() <em>Filter Value</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getFilterValue() |
| * @generated |
| * @ordered |
| */ |
| protected static final String FILTER_VALUE_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getFilterValue() <em>Filter Value</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getFilterValue() |
| * @generated |
| * @ordered |
| */ |
| protected String filterValue = FILTER_VALUE_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected BlipFilterImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return BlipDSLPackage.Literals.BLIP_FILTER; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getFilterName() { |
| return filterName; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setFilterName(String newFilterName) { |
| String oldFilterName = filterName; |
| filterName = newFilterName; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, BlipDSLPackage.BLIP_FILTER__FILTER_NAME, oldFilterName, filterName)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getFilterValue() { |
| return filterValue; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setFilterValue(String newFilterValue) { |
| String oldFilterValue = filterValue; |
| filterValue = newFilterValue; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, BlipDSLPackage.BLIP_FILTER__FILTER_VALUE, oldFilterValue, filterValue)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case BlipDSLPackage.BLIP_FILTER__FILTER_NAME: |
| return getFilterName(); |
| case BlipDSLPackage.BLIP_FILTER__FILTER_VALUE: |
| return getFilterValue(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case BlipDSLPackage.BLIP_FILTER__FILTER_NAME: |
| setFilterName((String)newValue); |
| return; |
| case BlipDSLPackage.BLIP_FILTER__FILTER_VALUE: |
| setFilterValue((String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case BlipDSLPackage.BLIP_FILTER__FILTER_NAME: |
| setFilterName(FILTER_NAME_EDEFAULT); |
| return; |
| case BlipDSLPackage.BLIP_FILTER__FILTER_VALUE: |
| setFilterValue(FILTER_VALUE_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case BlipDSLPackage.BLIP_FILTER__FILTER_NAME: |
| return FILTER_NAME_EDEFAULT == null ? filterName != null : !FILTER_NAME_EDEFAULT.equals(filterName); |
| case BlipDSLPackage.BLIP_FILTER__FILTER_VALUE: |
| return FILTER_VALUE_EDEFAULT == null ? filterValue != null : !FILTER_VALUE_EDEFAULT.equals(filterValue); |
| } |
| 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(" (filterName: "); |
| result.append(filterName); |
| result.append(", filterValue: "); |
| result.append(filterValue); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //BlipFilterImpl |