/** */ package net.opengis.wcs20.impl; import java.util.Collection; import net.opengis.wcs20.Section; import net.opengis.wcs20.Sections; import net.opengis.wcs20.Wcs20Package; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.emf.ecore.util.EDataTypeEList; import org.eclipse.emf.ecore.util.EObjectResolvingEList; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Sections</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link net.opengis.wcs20.impl.SectionsImpl#getSection <em>Section</em>}</li> * </ul> * </p> * * @generated */ public class SectionsImpl extends EObjectImpl implements Sections { /** * The cached value of the '{@link #getSection() <em>Section</em>}' attribute list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getSection() * @generated * @ordered */ protected EList<Section> section; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected SectionsImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return Wcs20Package.Literals.SECTIONS; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<Section> getSection() { if (section == null) { section = new EDataTypeEList<Section>(Section.class, this, Wcs20Package.SECTIONS__SECTION); } return section; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Wcs20Package.SECTIONS__SECTION: return getSection(); } 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 Wcs20Package.SECTIONS__SECTION: getSection().clear(); getSection().addAll((Collection<? extends Section>)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case Wcs20Package.SECTIONS__SECTION: getSection().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case Wcs20Package.SECTIONS__SECTION: return section != null && !section.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(" (section: "); result.append(section); result.append(')'); return result.toString(); } } //SectionsImpl