| /**
|
| * Copyright (c) 2010, 2019 Mia-Software.
|
| * 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.webapp30.impl;
|
|
|
| import java.util.Collection;
|
|
|
| import org.eclipse.emf.common.notify.NotificationChain;
|
|
|
| import org.eclipse.emf.common.util.EList;
|
|
|
| import org.eclipse.emf.ecore.EClass;
|
| import org.eclipse.emf.ecore.InternalEObject;
|
|
|
| import org.eclipse.emf.ecore.impl.EObjectImpl;
|
|
|
| import org.eclipse.emf.ecore.util.BasicFeatureMap;
|
| import org.eclipse.emf.ecore.util.FeatureMap;
|
| import org.eclipse.emf.ecore.util.InternalEList;
|
|
|
| import org.eclipse.modisco.jee.webapp.webapp30.AbsoluteOrderingType;
|
| import org.eclipse.modisco.jee.webapp.webapp30.JavaIdentifierType;
|
| import org.eclipse.modisco.jee.webapp.webapp30.OrderingOthersType;
|
| import org.eclipse.modisco.jee.webapp.webapp30.Webapp30Package;
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * An implementation of the model object '<em><b>Absolute Ordering Type</b></em>'.
|
| * <!-- end-user-doc -->
|
| * <p>
|
| * The following features are implemented:
|
| * <ul>
|
| * <li>{@link org.eclipse.modisco.jee.webapp.webapp30.impl.AbsoluteOrderingTypeImpl#getGroup <em>Group</em>}</li>
|
| * <li>{@link org.eclipse.modisco.jee.webapp.webapp30.impl.AbsoluteOrderingTypeImpl#getName <em>Name</em>}</li>
|
| * <li>{@link org.eclipse.modisco.jee.webapp.webapp30.impl.AbsoluteOrderingTypeImpl#getOthers <em>Others</em>}</li>
|
| * </ul>
|
| * </p>
|
| *
|
| * @generated
|
| */
|
| public class AbsoluteOrderingTypeImpl extends EObjectImpl implements AbsoluteOrderingType {
|
| /**
|
| * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @see #getGroup()
|
| * @generated
|
| * @ordered
|
| */
|
| protected FeatureMap group;
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| protected AbsoluteOrderingTypeImpl() {
|
| super();
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| @Override
|
| protected EClass eStaticClass() {
|
| return Webapp30Package.eINSTANCE.getAbsoluteOrderingType();
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public FeatureMap getGroup() {
|
| if (group == null) {
|
| group = new BasicFeatureMap(this, Webapp30Package.ABSOLUTE_ORDERING_TYPE__GROUP);
|
| }
|
| return group;
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EList<JavaIdentifierType> getName() {
|
| return getGroup().list(Webapp30Package.eINSTANCE.getAbsoluteOrderingType_Name());
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EList<OrderingOthersType> getOthers() {
|
| return getGroup().list(Webapp30Package.eINSTANCE.getAbsoluteOrderingType_Others());
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| @Override
|
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
|
| switch (featureID) {
|
| case Webapp30Package.ABSOLUTE_ORDERING_TYPE__GROUP:
|
| return ((InternalEList<?>)getGroup()).basicRemove(otherEnd, msgs);
|
| case Webapp30Package.ABSOLUTE_ORDERING_TYPE__NAME:
|
| return ((InternalEList<?>)getName()).basicRemove(otherEnd, msgs);
|
| case Webapp30Package.ABSOLUTE_ORDERING_TYPE__OTHERS:
|
| return ((InternalEList<?>)getOthers()).basicRemove(otherEnd, 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 Webapp30Package.ABSOLUTE_ORDERING_TYPE__GROUP:
|
| if (coreType) return getGroup();
|
| return ((FeatureMap.Internal)getGroup()).getWrapper();
|
| case Webapp30Package.ABSOLUTE_ORDERING_TYPE__NAME:
|
| return getName();
|
| case Webapp30Package.ABSOLUTE_ORDERING_TYPE__OTHERS:
|
| return getOthers();
|
| }
|
| return super.eGet(featureID, resolve, coreType);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| @SuppressWarnings("unchecked")
|
| @Override
|
| public void eSet(int featureID, Object newValue) {
|
| switch (featureID) {
|
| case Webapp30Package.ABSOLUTE_ORDERING_TYPE__GROUP:
|
| ((FeatureMap.Internal)getGroup()).set(newValue);
|
| return;
|
| case Webapp30Package.ABSOLUTE_ORDERING_TYPE__NAME:
|
| getName().clear();
|
| getName().addAll((Collection<? extends JavaIdentifierType>)newValue);
|
| return;
|
| case Webapp30Package.ABSOLUTE_ORDERING_TYPE__OTHERS:
|
| getOthers().clear();
|
| getOthers().addAll((Collection<? extends OrderingOthersType>)newValue);
|
| return;
|
| }
|
| super.eSet(featureID, newValue);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| @Override
|
| public void eUnset(int featureID) {
|
| switch (featureID) {
|
| case Webapp30Package.ABSOLUTE_ORDERING_TYPE__GROUP:
|
| getGroup().clear();
|
| return;
|
| case Webapp30Package.ABSOLUTE_ORDERING_TYPE__NAME:
|
| getName().clear();
|
| return;
|
| case Webapp30Package.ABSOLUTE_ORDERING_TYPE__OTHERS:
|
| getOthers().clear();
|
| return;
|
| }
|
| super.eUnset(featureID);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| @Override
|
| public boolean eIsSet(int featureID) {
|
| switch (featureID) {
|
| case Webapp30Package.ABSOLUTE_ORDERING_TYPE__GROUP:
|
| return group != null && !group.isEmpty();
|
| case Webapp30Package.ABSOLUTE_ORDERING_TYPE__NAME:
|
| return !getName().isEmpty();
|
| case Webapp30Package.ABSOLUTE_ORDERING_TYPE__OTHERS:
|
| return !getOthers().isEmpty();
|
| }
|
| 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(" (group: "); //$NON-NLS-1$
|
| result.append(group);
|
| result.append(')');
|
| return result.toString();
|
| }
|
|
|
| } //AbsoluteOrderingTypeImpl
|