001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id$
006: */package com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl;
007:
008: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.BaseRead;
009: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.FileCompletion;
010: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.FileConsumer;
011: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.FileReply;
012: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.PatternModel;
013: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.ReadStyleType;
014: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage;
015:
016: import org.eclipse.emf.common.notify.Notification;
017: import org.eclipse.emf.common.notify.NotificationChain;
018:
019: import org.eclipse.emf.ecore.EClass;
020: import org.eclipse.emf.ecore.InternalEObject;
021:
022: import org.eclipse.emf.ecore.impl.ENotificationImpl;
023:
024: /**
025: * <!-- begin-user-doc -->
026: * An implementation of the model object '<em><b>File Consumer</b></em>'.
027: * <!-- end-user-doc -->
028: * <p>
029: * The following features are implemented:
030: * <ul>
031: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.FileConsumerImpl#getFileReply <em>File Reply</em>}</li>
032: * </ul>
033: * </p>
034: *
035: * @generated
036: */
037: public class FileConsumerImpl extends BaseReadImpl implements
038: FileConsumer {
039: /**
040: * <!-- begin-user-doc -->
041: * <!-- end-user-doc -->
042: * @generated
043: */
044: public static final String copyright = "Copyright, Bostech Corp.";
045:
046: /**
047: * The cached value of the '{@link #getFileReply() <em>File Reply</em>}' containment reference.
048: * <!-- begin-user-doc -->
049: * <!-- end-user-doc -->
050: * @see #getFileReply()
051: * @generated
052: * @ordered
053: */
054: protected FileReply fileReply = null;
055:
056: /**
057: * <!-- begin-user-doc -->
058: * <!-- end-user-doc -->
059: * @generated
060: */
061: protected FileConsumerImpl() {
062: super ();
063: }
064:
065: /**
066: * <!-- begin-user-doc -->
067: * <!-- end-user-doc -->
068: * @generated
069: */
070: protected EClass eStaticClass() {
071: return componentflowPackage.Literals.FILE_CONSUMER;
072: }
073:
074: /**
075: * <!-- begin-user-doc -->
076: * <!-- end-user-doc -->
077: * @generated
078: */
079: public FileReply getFileReply() {
080: return fileReply;
081: }
082:
083: /**
084: * <!-- begin-user-doc -->
085: * <!-- end-user-doc -->
086: * @generated
087: */
088: public NotificationChain basicSetFileReply(FileReply newFileReply,
089: NotificationChain msgs) {
090: FileReply oldFileReply = fileReply;
091: fileReply = newFileReply;
092: if (eNotificationRequired()) {
093: ENotificationImpl notification = new ENotificationImpl(
094: this , Notification.SET,
095: componentflowPackage.FILE_CONSUMER__FILE_REPLY,
096: oldFileReply, newFileReply);
097: if (msgs == null)
098: msgs = notification;
099: else
100: msgs.add(notification);
101: }
102: return msgs;
103: }
104:
105: /**
106: * <!-- begin-user-doc -->
107: * <!-- end-user-doc -->
108: * @generated
109: */
110: public void setFileReply(FileReply newFileReply) {
111: if (newFileReply != fileReply) {
112: NotificationChain msgs = null;
113: if (fileReply != null)
114: msgs = ((InternalEObject) fileReply)
115: .eInverseRemove(
116: this ,
117: EOPPOSITE_FEATURE_BASE
118: - componentflowPackage.FILE_CONSUMER__FILE_REPLY,
119: null, msgs);
120: if (newFileReply != null)
121: msgs = ((InternalEObject) newFileReply)
122: .eInverseAdd(
123: this ,
124: EOPPOSITE_FEATURE_BASE
125: - componentflowPackage.FILE_CONSUMER__FILE_REPLY,
126: null, msgs);
127: msgs = basicSetFileReply(newFileReply, msgs);
128: if (msgs != null)
129: msgs.dispatch();
130: } else if (eNotificationRequired())
131: eNotify(new ENotificationImpl(this , Notification.SET,
132: componentflowPackage.FILE_CONSUMER__FILE_REPLY,
133: newFileReply, newFileReply));
134: }
135:
136: /**
137: * <!-- begin-user-doc -->
138: * <!-- end-user-doc -->
139: * @generated
140: */
141: public NotificationChain eInverseRemove(InternalEObject otherEnd,
142: int featureID, NotificationChain msgs) {
143: switch (featureID) {
144: case componentflowPackage.FILE_CONSUMER__FILE_REPLY:
145: return basicSetFileReply(null, msgs);
146: }
147: return super .eInverseRemove(otherEnd, featureID, msgs);
148: }
149:
150: /**
151: * <!-- begin-user-doc -->
152: * <!-- end-user-doc -->
153: * @generated
154: */
155: public Object eGet(int featureID, boolean resolve, boolean coreType) {
156: switch (featureID) {
157: case componentflowPackage.FILE_CONSUMER__FILE_REPLY:
158: return getFileReply();
159: }
160: return super .eGet(featureID, resolve, coreType);
161: }
162:
163: /**
164: * <!-- begin-user-doc -->
165: * <!-- end-user-doc -->
166: * @generated
167: */
168: public void eSet(int featureID, Object newValue) {
169: switch (featureID) {
170: case componentflowPackage.FILE_CONSUMER__FILE_REPLY:
171: setFileReply((FileReply) newValue);
172: return;
173: }
174: super .eSet(featureID, newValue);
175: }
176:
177: /**
178: * <!-- begin-user-doc -->
179: * <!-- end-user-doc -->
180: * @generated
181: */
182: public void eUnset(int featureID) {
183: switch (featureID) {
184: case componentflowPackage.FILE_CONSUMER__FILE_REPLY:
185: setFileReply((FileReply) null);
186: return;
187: }
188: super .eUnset(featureID);
189: }
190:
191: /**
192: * <!-- begin-user-doc -->
193: * <!-- end-user-doc -->
194: * @generated
195: */
196: public boolean eIsSet(int featureID) {
197: switch (featureID) {
198: case componentflowPackage.FILE_CONSUMER__FILE_REPLY:
199: return fileReply != null;
200: }
201: return super .eIsSet(featureID);
202: }
203:
204: } //FileConsumerImpl
|