| /**
|
| * Copyright (c) 2010, 2019 Mia-Software and others.
|
| * All rights reserved. This program and the accompanying materials
|
| * are made available under the terms of the Eclipse Public License v2.0
|
| * which accompanies this distribution, and is available at
|
| * http://www.eclipse.org/legal/epl-v20.html
|
| *
|
| * Contributors:
|
| *
|
| * Nicolas Guyomar (Mia-Software) - initial API and implementation
|
| */ |
| package org.eclipse.modisco.jee.webapp.webapp24.impl;
|
|
|
| import java.lang.String;
|
|
|
| import org.eclipse.emf.common.notify.Notification;
|
|
|
| import org.eclipse.emf.ecore.EClass;
|
|
|
| import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
|
|
| import org.eclipse.modisco.jee.webapp.webapp24.DisplayNameType;
|
| import org.eclipse.modisco.jee.webapp.webapp24.Webapp24Package;
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * An implementation of the model object '<em><b>Display Name Type</b></em>'.
|
| * <!-- end-user-doc -->
|
| * <p>
|
| * The following features are implemented:
|
| * <ul>
|
| * <li>{@link org.eclipse.modisco.jee.webapp.webapp24.impl.DisplayNameTypeImpl#getLang <em>Lang</em>}</li>
|
| * </ul>
|
| * </p>
|
| *
|
| * @generated
|
| */
|
| public class DisplayNameTypeImpl extends StringImpl implements DisplayNameType {
|
| /**
|
| * The default value of the '{@link #getLang() <em>Lang</em>}' attribute.
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @see #getLang()
|
| * @generated
|
| * @ordered
|
| */
|
| protected static final String LANG_EDEFAULT = null;
|
|
|
| /**
|
| * The cached value of the '{@link #getLang() <em>Lang</em>}' attribute.
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @see #getLang()
|
| * @generated
|
| * @ordered
|
| */
|
| protected String lang = LANG_EDEFAULT;
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| protected DisplayNameTypeImpl() {
|
| super();
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| @Override
|
| protected EClass eStaticClass() {
|
| return Webapp24Package.Literals.DISPLAY_NAME_TYPE;
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public String getLang() {
|
| return lang;
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public void setLang(String newLang) {
|
| String oldLang = lang;
|
| lang = newLang;
|
| if (eNotificationRequired())
|
| eNotify(new ENotificationImpl(this, Notification.SET, Webapp24Package.DISPLAY_NAME_TYPE__LANG, oldLang, lang));
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| @Override
|
| public Object eGet(int featureID, boolean resolve, boolean coreType) {
|
| switch (featureID) {
|
| case Webapp24Package.DISPLAY_NAME_TYPE__LANG:
|
| return getLang();
|
| }
|
| return super.eGet(featureID, resolve, coreType);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| @Override
|
| public void eSet(int featureID, Object newValue) {
|
| switch (featureID) {
|
| case Webapp24Package.DISPLAY_NAME_TYPE__LANG:
|
| setLang((String)newValue);
|
| return;
|
| }
|
| super.eSet(featureID, newValue);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| @Override
|
| public void eUnset(int featureID) {
|
| switch (featureID) {
|
| case Webapp24Package.DISPLAY_NAME_TYPE__LANG:
|
| setLang(LANG_EDEFAULT);
|
| return;
|
| }
|
| super.eUnset(featureID);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| @Override
|
| public boolean eIsSet(int featureID) {
|
| switch (featureID) {
|
| case Webapp24Package.DISPLAY_NAME_TYPE__LANG:
|
| return LANG_EDEFAULT == null ? lang != null : !LANG_EDEFAULT.equals(lang);
|
| }
|
| 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(" (lang: "); //$NON-NLS-1$
|
| result.append(lang);
|
| result.append(')');
|
| return result.toString();
|
| }
|
|
|
| } //DisplayNameTypeImpl
|