001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: SectionsTypeImpl.java 7522 2007-09-12 22:00:10Z saul.farber $
006: */package net.opengis.ows.impl;
007:
008: import java.util.Collection;
009:
010: import net.opengis.ows.OwsPackage;
011: import net.opengis.ows.SectionsType;
012:
013: import org.eclipse.emf.common.util.EList;
014:
015: import org.eclipse.emf.common.notify.Notification;
016:
017: import org.eclipse.emf.ecore.EClass;
018:
019: import org.eclipse.emf.ecore.impl.ENotificationImpl;
020: import org.eclipse.emf.ecore.impl.EObjectImpl;
021:
022: import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
023:
024: /**
025: * <!-- begin-user-doc -->
026: * An implementation of the model object '<em><b>Sections Type</b></em>'.
027: * <!-- end-user-doc -->
028: * <p>
029: * The following features are implemented:
030: * <ul>
031: * <li>{@link net.opengis.ows.impl.SectionsTypeImpl#getSection <em>Section</em>}</li>
032: * </ul>
033: * </p>
034: *
035: * @generated
036: */
037: public class SectionsTypeImpl extends EObjectImpl implements
038: SectionsType {
039: /**
040: * The cached value of the '{@link #getSection() <em>Section</em>}' attribute list.
041: * <!-- begin-user-doc -->
042: * <!-- end-user-doc -->
043: * @see #getSection()
044: * @generated
045: * @ordered
046: */
047: protected EList section;
048:
049: /**
050: * <!-- begin-user-doc -->
051: * <!-- end-user-doc -->
052: * @generated
053: */
054: protected SectionsTypeImpl() {
055: super ();
056: }
057:
058: /**
059: * <!-- begin-user-doc -->
060: * <!-- end-user-doc -->
061: * @generated
062: */
063: protected EClass eStaticClass() {
064: return OwsPackage.Literals.SECTIONS_TYPE;
065: }
066:
067: /**
068: * <!-- begin-user-doc -->
069: * <!-- end-user-doc -->
070: * @generated
071: */
072: public EList getSection() {
073: if (section == null) {
074: section = new EDataTypeUniqueEList(String.class, this ,
075: OwsPackage.SECTIONS_TYPE__SECTION);
076: }
077: return section;
078: }
079:
080: /**
081: * <!-- begin-user-doc -->
082: * <!-- end-user-doc -->
083: * @generated
084: */
085: public Object eGet(int featureID, boolean resolve, boolean coreType) {
086: switch (featureID) {
087: case OwsPackage.SECTIONS_TYPE__SECTION:
088: return getSection();
089: }
090: return super .eGet(featureID, resolve, coreType);
091: }
092:
093: /**
094: * <!-- begin-user-doc -->
095: * <!-- end-user-doc -->
096: * @generated
097: */
098: public void eSet(int featureID, Object newValue) {
099: switch (featureID) {
100: case OwsPackage.SECTIONS_TYPE__SECTION:
101: getSection().clear();
102: getSection().addAll((Collection) newValue);
103: return;
104: }
105: super .eSet(featureID, newValue);
106: }
107:
108: /**
109: * <!-- begin-user-doc -->
110: * <!-- end-user-doc -->
111: * @generated
112: */
113: public void eUnset(int featureID) {
114: switch (featureID) {
115: case OwsPackage.SECTIONS_TYPE__SECTION:
116: getSection().clear();
117: return;
118: }
119: super .eUnset(featureID);
120: }
121:
122: /**
123: * <!-- begin-user-doc -->
124: * <!-- end-user-doc -->
125: * @generated
126: */
127: public boolean eIsSet(int featureID) {
128: switch (featureID) {
129: case OwsPackage.SECTIONS_TYPE__SECTION:
130: return section != null && !section.isEmpty();
131: }
132: return super .eIsSet(featureID);
133: }
134:
135: /**
136: * <!-- begin-user-doc -->
137: * <!-- end-user-doc -->
138: * @generated
139: */
140: public String toString() {
141: if (eIsProxy())
142: return super .toString();
143:
144: StringBuffer result = new StringBuffer(super .toString());
145: result.append(" (section: ");
146: result.append(section);
147: result.append(')');
148: return result.toString();
149: }
150:
151: } //SectionsTypeImpl
|