001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: ComponentFlowEditorDocumentImpl.java 251 2006-08-18 01:00:08Z mpreston $
006: */package com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl;
007:
008: import java.util.Collection;
009:
010: import org.eclipse.emf.common.notify.Notification;
011: import org.eclipse.emf.common.notify.NotificationChain;
012: import org.eclipse.emf.common.util.EList;
013: import org.eclipse.emf.ecore.EClass;
014: import org.eclipse.emf.ecore.InternalEObject;
015: import org.eclipse.emf.ecore.impl.ENotificationImpl;
016: import org.eclipse.emf.ecore.impl.EObjectImpl;
017: import org.eclipse.emf.ecore.util.EObjectContainmentEList;
018: import org.eclipse.emf.ecore.util.InternalEList;
019:
020: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.ComponentFlowEditorDocument;
021: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.ComponentFlowEditorElement;
022: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.DecorativeModelElement;
023: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.MessageExchange;
024: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage;
025:
026: /**
027: * <!-- begin-user-doc -->
028: * An implementation of the model object '<em><b>Component Flow Editor Document</b></em>'.
029: * <!-- end-user-doc -->
030: * <p>
031: * The following features are implemented:
032: * <ul>
033: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.ComponentFlowEditorDocumentImpl#getComponentFlowEditorElements <em>Component Flow Editor Elements</em>}</li>
034: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.ComponentFlowEditorDocumentImpl#getMessageExchanges <em>Message Exchanges</em>}</li>
035: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.ComponentFlowEditorDocumentImpl#getDecorativeModelElements <em>Decorative Model Elements</em>}</li>
036: * </ul>
037: * </p>
038: *
039: * @generated
040: */
041: public class ComponentFlowEditorDocumentImpl extends EObjectImpl
042: implements ComponentFlowEditorDocument {
043: /**
044: * <!-- begin-user-doc -->
045: * <!-- end-user-doc -->
046: * @generated
047: */
048: public static final String copyright = "Copyright, Bostech Corp.";
049:
050: /**
051: * The cached value of the '{@link #getComponentFlowEditorElements() <em>Component Flow Editor Elements</em>}' containment reference list.
052: * <!-- begin-user-doc -->
053: * <!-- end-user-doc -->
054: * @see #getComponentFlowEditorElements()
055: * @generated
056: * @ordered
057: */
058: protected EList componentFlowEditorElements = null;
059:
060: /**
061: * The cached value of the '{@link #getMessageExchanges() <em>Message Exchanges</em>}' containment reference list.
062: * <!-- begin-user-doc -->
063: * <!-- end-user-doc -->
064: * @see #getMessageExchanges()
065: * @generated
066: * @ordered
067: */
068: protected EList messageExchanges = null;
069:
070: /**
071: * The cached value of the '{@link #getDecorativeModelElements() <em>Decorative Model Elements</em>}' containment reference list.
072: * <!-- begin-user-doc -->
073: * <!-- end-user-doc -->
074: * @see #getDecorativeModelElements()
075: * @generated
076: * @ordered
077: */
078: protected EList decorativeModelElements = null;
079:
080: /**
081: * <!-- begin-user-doc -->
082: * <!-- end-user-doc -->
083: * @generated
084: */
085: protected ComponentFlowEditorDocumentImpl() {
086: super ();
087: }
088:
089: /**
090: * <!-- begin-user-doc -->
091: * <!-- end-user-doc -->
092: * @generated
093: */
094: protected EClass eStaticClass() {
095: return componentflowPackage.Literals.COMPONENT_FLOW_EDITOR_DOCUMENT;
096: }
097:
098: /**
099: * <!-- begin-user-doc -->
100: * <!-- end-user-doc -->
101: * @generated
102: */
103: public EList getComponentFlowEditorElements() {
104: if (componentFlowEditorElements == null) {
105: componentFlowEditorElements = new EObjectContainmentEList(
106: ComponentFlowEditorElement.class,
107: this ,
108: componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__COMPONENT_FLOW_EDITOR_ELEMENTS);
109: }
110: return componentFlowEditorElements;
111: }
112:
113: /**
114: * <!-- begin-user-doc -->
115: * <!-- end-user-doc -->
116: * @generated
117: */
118: public EList getMessageExchanges() {
119: if (messageExchanges == null) {
120: messageExchanges = new EObjectContainmentEList(
121: MessageExchange.class,
122: this ,
123: componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__MESSAGE_EXCHANGES);
124: }
125: return messageExchanges;
126: }
127:
128: /**
129: * <!-- begin-user-doc -->
130: * <!-- end-user-doc -->
131: * @generated
132: */
133: public EList getDecorativeModelElements() {
134: if (decorativeModelElements == null) {
135: decorativeModelElements = new EObjectContainmentEList(
136: DecorativeModelElement.class,
137: this ,
138: componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__DECORATIVE_MODEL_ELEMENTS);
139: }
140: return decorativeModelElements;
141: }
142:
143: /**
144: * <!-- begin-user-doc -->
145: * <!-- end-user-doc -->
146: * @generated
147: */
148: public NotificationChain eInverseRemove(InternalEObject otherEnd,
149: int featureID, NotificationChain msgs) {
150: switch (featureID) {
151: case componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__COMPONENT_FLOW_EDITOR_ELEMENTS:
152: return ((InternalEList) getComponentFlowEditorElements())
153: .basicRemove(otherEnd, msgs);
154: case componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__MESSAGE_EXCHANGES:
155: return ((InternalEList) getMessageExchanges()).basicRemove(
156: otherEnd, msgs);
157: case componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__DECORATIVE_MODEL_ELEMENTS:
158: return ((InternalEList) getDecorativeModelElements())
159: .basicRemove(otherEnd, msgs);
160: }
161: return super .eInverseRemove(otherEnd, featureID, msgs);
162: }
163:
164: /**
165: * <!-- begin-user-doc -->
166: * <!-- end-user-doc -->
167: * @generated
168: */
169: public Object eGet(int featureID, boolean resolve, boolean coreType) {
170: switch (featureID) {
171: case componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__COMPONENT_FLOW_EDITOR_ELEMENTS:
172: return getComponentFlowEditorElements();
173: case componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__MESSAGE_EXCHANGES:
174: return getMessageExchanges();
175: case componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__DECORATIVE_MODEL_ELEMENTS:
176: return getDecorativeModelElements();
177: }
178: return super .eGet(featureID, resolve, coreType);
179: }
180:
181: /**
182: * <!-- begin-user-doc -->
183: * <!-- end-user-doc -->
184: * @generated
185: */
186: public void eSet(int featureID, Object newValue) {
187: switch (featureID) {
188: case componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__COMPONENT_FLOW_EDITOR_ELEMENTS:
189: getComponentFlowEditorElements().clear();
190: getComponentFlowEditorElements().addAll(
191: (Collection) newValue);
192: return;
193: case componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__MESSAGE_EXCHANGES:
194: getMessageExchanges().clear();
195: getMessageExchanges().addAll((Collection) newValue);
196: return;
197: case componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__DECORATIVE_MODEL_ELEMENTS:
198: getDecorativeModelElements().clear();
199: getDecorativeModelElements().addAll((Collection) newValue);
200: return;
201: }
202: super .eSet(featureID, newValue);
203: }
204:
205: /**
206: * <!-- begin-user-doc -->
207: * <!-- end-user-doc -->
208: * @generated
209: */
210: public void eUnset(int featureID) {
211: switch (featureID) {
212: case componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__COMPONENT_FLOW_EDITOR_ELEMENTS:
213: getComponentFlowEditorElements().clear();
214: return;
215: case componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__MESSAGE_EXCHANGES:
216: getMessageExchanges().clear();
217: return;
218: case componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__DECORATIVE_MODEL_ELEMENTS:
219: getDecorativeModelElements().clear();
220: return;
221: }
222: super .eUnset(featureID);
223: }
224:
225: /**
226: * <!-- begin-user-doc -->
227: * <!-- end-user-doc -->
228: * @generated
229: */
230: public boolean eIsSet(int featureID) {
231: switch (featureID) {
232: case componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__COMPONENT_FLOW_EDITOR_ELEMENTS:
233: return componentFlowEditorElements != null
234: && !componentFlowEditorElements.isEmpty();
235: case componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__MESSAGE_EXCHANGES:
236: return messageExchanges != null
237: && !messageExchanges.isEmpty();
238: case componentflowPackage.COMPONENT_FLOW_EDITOR_DOCUMENT__DECORATIVE_MODEL_ELEMENTS:
239: return decorativeModelElements != null
240: && !decorativeModelElements.isEmpty();
241: }
242: return super .eIsSet(featureID);
243: }
244:
245: } //ComponentFlowEditorDocumentImpl
|