| /******************************************************************************* |
| * Copyright (c) 2001, 2005 IBM Corporation and others. |
| * 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 |
| * |
| * Contributors: |
| * IBM Corporation - initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.jst.j2ee.commonarchivecore.looseconfig.internal.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.util.EObjectContainmentWithInverseEList; |
| import org.eclipse.emf.ecore.util.InternalEList; |
| import org.eclipse.jst.j2ee.commonarchivecore.looseconfig.internal.LooseApplication; |
| import org.eclipse.jst.j2ee.commonarchivecore.looseconfig.internal.LooseArchive; |
| import org.eclipse.jst.j2ee.commonarchivecore.looseconfig.internal.LooseconfigPackage; |
| |
| /** |
| * @generated |
| */ |
| public class LooseApplicationImpl extends LooseArchiveImpl implements LooseApplication { |
| /** |
| * @generated This field/method will be replaced during code generation. |
| */ |
| /** |
| * @generated This field/method will be replaced during code generation. |
| */ |
| protected EList looseArchives = null; |
| |
| /** |
| * @generated This field/method will be replaced during code generation. |
| */ |
| protected LooseApplicationImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| protected EClass eStaticClass() { |
| return LooseconfigPackage.Literals.LOOSE_APPLICATION; |
| } |
| |
| /** |
| * @generated This field/method will be replaced during code generation |
| */ |
| public EList getLooseArchives() { |
| if (looseArchives == null) { |
| looseArchives = new EObjectContainmentWithInverseEList(LooseArchive.class, this, LooseconfigPackage.LOOSE_APPLICATION__LOOSE_ARCHIVES, LooseconfigPackage.LOOSE_ARCHIVE__LOOSE_APP); |
| } |
| return looseArchives; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case LooseconfigPackage.LOOSE_APPLICATION__LOOSE_ARCHIVES: |
| return ((InternalEList)getLooseArchives()).basicAdd(otherEnd, msgs); |
| } |
| return super.eInverseAdd(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case LooseconfigPackage.LOOSE_APPLICATION__LOOSE_ARCHIVES: |
| return ((InternalEList)getLooseArchives()).basicRemove(otherEnd, msgs); |
| } |
| return super.eInverseRemove(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case LooseconfigPackage.LOOSE_APPLICATION__LOOSE_ARCHIVES: |
| return getLooseArchives(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case LooseconfigPackage.LOOSE_APPLICATION__LOOSE_ARCHIVES: |
| getLooseArchives().clear(); |
| getLooseArchives().addAll((Collection)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case LooseconfigPackage.LOOSE_APPLICATION__LOOSE_ARCHIVES: |
| getLooseArchives().clear(); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case LooseconfigPackage.LOOSE_APPLICATION__LOOSE_ARCHIVES: |
| return looseArchives != null && !looseArchives.isEmpty(); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| public boolean isEAR() { |
| return true; |
| } |
| |
| |
| } |