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.FileCompletion;
009: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.FileProvider;
010: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.ReadStyleType;
011: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage;
012:
013: import org.eclipse.emf.common.notify.Notification;
014:
015: import org.eclipse.emf.common.notify.NotificationChain;
016:
017: import org.eclipse.emf.ecore.EClass;
018:
019: import org.eclipse.emf.ecore.InternalEObject;
020:
021: import org.eclipse.emf.ecore.impl.ENotificationImpl;
022:
023: /**
024: * <!-- begin-user-doc -->
025: * An implementation of the model object '<em><b>File Provider</b></em>'.
026: * <!-- end-user-doc -->
027: * <p>
028: * The following features are implemented:
029: * <ul>
030: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.FileProviderImpl#getDestDir <em>Dest Dir</em>}</li>
031: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.FileProviderImpl#getStageDir <em>Stage Dir</em>}</li>
032: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.FileProviderImpl#getFilePattern <em>File Pattern</em>}</li>
033: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.FileProviderImpl#getWriteStyle <em>Write Style</em>}</li>
034: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.FileProviderImpl#getFileCompletion <em>File Completion</em>}</li>
035: * </ul>
036: * </p>
037: *
038: * @generated
039: */
040: public class FileProviderImpl extends ProviderImpl implements
041: FileProvider {
042: /**
043: * <!-- begin-user-doc -->
044: * <!-- end-user-doc -->
045: * @generated
046: */
047: public static final String copyright = "Copyright, Bostech Corp.";
048:
049: /**
050: * The default value of the '{@link #getDestDir() <em>Dest Dir</em>}' attribute.
051: * <!-- begin-user-doc -->
052: * <!-- end-user-doc -->
053: * @see #getDestDir()
054: * @generated
055: * @ordered
056: */
057: protected static final String DEST_DIR_EDEFAULT = null;
058:
059: /**
060: * The cached value of the '{@link #getDestDir() <em>Dest Dir</em>}' attribute.
061: * <!-- begin-user-doc -->
062: * <!-- end-user-doc -->
063: * @see #getDestDir()
064: * @generated
065: * @ordered
066: */
067: protected String destDir = DEST_DIR_EDEFAULT;
068:
069: /**
070: * The default value of the '{@link #getStageDir() <em>Stage Dir</em>}' attribute.
071: * <!-- begin-user-doc -->
072: * <!-- end-user-doc -->
073: * @see #getStageDir()
074: * @generated
075: * @ordered
076: */
077: protected static final String STAGE_DIR_EDEFAULT = null;
078:
079: /**
080: * The cached value of the '{@link #getStageDir() <em>Stage Dir</em>}' attribute.
081: * <!-- begin-user-doc -->
082: * <!-- end-user-doc -->
083: * @see #getStageDir()
084: * @generated
085: * @ordered
086: */
087: protected String stageDir = STAGE_DIR_EDEFAULT;
088:
089: /**
090: * The default value of the '{@link #getFilePattern() <em>File Pattern</em>}' attribute.
091: * <!-- begin-user-doc -->
092: * <!-- end-user-doc -->
093: * @see #getFilePattern()
094: * @generated
095: * @ordered
096: */
097: protected static final String FILE_PATTERN_EDEFAULT = null;
098:
099: /**
100: * The cached value of the '{@link #getFilePattern() <em>File Pattern</em>}' attribute.
101: * <!-- begin-user-doc -->
102: * <!-- end-user-doc -->
103: * @see #getFilePattern()
104: * @generated
105: * @ordered
106: */
107: protected String filePattern = FILE_PATTERN_EDEFAULT;
108:
109: /**
110: * The default value of the '{@link #getWriteStyle() <em>Write Style</em>}' attribute.
111: * <!-- begin-user-doc -->
112: * <!-- end-user-doc -->
113: * @see #getWriteStyle()
114: * @generated
115: * @ordered
116: */
117: protected static final ReadStyleType WRITE_STYLE_EDEFAULT = ReadStyleType.RAW_LITERAL;
118:
119: /**
120: * The cached value of the '{@link #getWriteStyle() <em>Write Style</em>}' attribute.
121: * <!-- begin-user-doc -->
122: * <!-- end-user-doc -->
123: * @see #getWriteStyle()
124: * @generated
125: * @ordered
126: */
127: protected ReadStyleType writeStyle = WRITE_STYLE_EDEFAULT;
128:
129: /**
130: * The cached value of the '{@link #getFileCompletion() <em>File Completion</em>}' containment reference.
131: * <!-- begin-user-doc -->
132: * <!-- end-user-doc -->
133: * @see #getFileCompletion()
134: * @generated
135: * @ordered
136: */
137: protected FileCompletion fileCompletion = null;
138:
139: /**
140: * <!-- begin-user-doc -->
141: * <!-- end-user-doc -->
142: * @generated
143: */
144: protected FileProviderImpl() {
145: super ();
146: }
147:
148: /**
149: * <!-- begin-user-doc -->
150: * <!-- end-user-doc -->
151: * @generated
152: */
153: protected EClass eStaticClass() {
154: return componentflowPackage.Literals.FILE_PROVIDER;
155: }
156:
157: /**
158: * <!-- begin-user-doc -->
159: * <!-- end-user-doc -->
160: * @generated
161: */
162: public String getDestDir() {
163: return destDir;
164: }
165:
166: /**
167: * <!-- begin-user-doc -->
168: * <!-- end-user-doc -->
169: * @generated
170: */
171: public void setDestDir(String newDestDir) {
172: String oldDestDir = destDir;
173: destDir = newDestDir;
174: if (eNotificationRequired())
175: eNotify(new ENotificationImpl(this , Notification.SET,
176: componentflowPackage.FILE_PROVIDER__DEST_DIR,
177: oldDestDir, destDir));
178: }
179:
180: /**
181: * <!-- begin-user-doc -->
182: * <!-- end-user-doc -->
183: * @generated
184: */
185: public String getStageDir() {
186: return stageDir;
187: }
188:
189: /**
190: * <!-- begin-user-doc -->
191: * <!-- end-user-doc -->
192: * @generated
193: */
194: public void setStageDir(String newStageDir) {
195: String oldStageDir = stageDir;
196: stageDir = newStageDir;
197: if (eNotificationRequired())
198: eNotify(new ENotificationImpl(this , Notification.SET,
199: componentflowPackage.FILE_PROVIDER__STAGE_DIR,
200: oldStageDir, stageDir));
201: }
202:
203: /**
204: * <!-- begin-user-doc -->
205: * <!-- end-user-doc -->
206: * @generated
207: */
208: public String getFilePattern() {
209: return filePattern;
210: }
211:
212: /**
213: * <!-- begin-user-doc -->
214: * <!-- end-user-doc -->
215: * @generated
216: */
217: public void setFilePattern(String newFilePattern) {
218: String oldFilePattern = filePattern;
219: filePattern = newFilePattern;
220: if (eNotificationRequired())
221: eNotify(new ENotificationImpl(this , Notification.SET,
222: componentflowPackage.FILE_PROVIDER__FILE_PATTERN,
223: oldFilePattern, filePattern));
224: }
225:
226: /**
227: * <!-- begin-user-doc -->
228: * <!-- end-user-doc -->
229: * @generated
230: */
231: public ReadStyleType getWriteStyle() {
232: return writeStyle;
233: }
234:
235: /**
236: * <!-- begin-user-doc -->
237: * <!-- end-user-doc -->
238: * @generated
239: */
240: public void setWriteStyle(ReadStyleType newWriteStyle) {
241: ReadStyleType oldWriteStyle = writeStyle;
242: writeStyle = newWriteStyle == null ? WRITE_STYLE_EDEFAULT
243: : newWriteStyle;
244: if (eNotificationRequired())
245: eNotify(new ENotificationImpl(this , Notification.SET,
246: componentflowPackage.FILE_PROVIDER__WRITE_STYLE,
247: oldWriteStyle, writeStyle));
248: }
249:
250: /**
251: * <!-- begin-user-doc -->
252: * <!-- end-user-doc -->
253: * @generated
254: */
255: public FileCompletion getFileCompletion() {
256: return fileCompletion;
257: }
258:
259: /**
260: * <!-- begin-user-doc -->
261: * <!-- end-user-doc -->
262: * @generated
263: */
264: public NotificationChain basicSetFileCompletion(
265: FileCompletion newFileCompletion, NotificationChain msgs) {
266: FileCompletion oldFileCompletion = fileCompletion;
267: fileCompletion = newFileCompletion;
268: if (eNotificationRequired()) {
269: ENotificationImpl notification = new ENotificationImpl(
270: this ,
271: Notification.SET,
272: componentflowPackage.FILE_PROVIDER__FILE_COMPLETION,
273: oldFileCompletion, newFileCompletion);
274: if (msgs == null)
275: msgs = notification;
276: else
277: msgs.add(notification);
278: }
279: return msgs;
280: }
281:
282: /**
283: * <!-- begin-user-doc -->
284: * <!-- end-user-doc -->
285: * @generated
286: */
287: public void setFileCompletion(FileCompletion newFileCompletion) {
288: if (newFileCompletion != fileCompletion) {
289: NotificationChain msgs = null;
290: if (fileCompletion != null)
291: msgs = ((InternalEObject) fileCompletion)
292: .eInverseRemove(
293: this ,
294: EOPPOSITE_FEATURE_BASE
295: - componentflowPackage.FILE_PROVIDER__FILE_COMPLETION,
296: null, msgs);
297: if (newFileCompletion != null)
298: msgs = ((InternalEObject) newFileCompletion)
299: .eInverseAdd(
300: this ,
301: EOPPOSITE_FEATURE_BASE
302: - componentflowPackage.FILE_PROVIDER__FILE_COMPLETION,
303: null, msgs);
304: msgs = basicSetFileCompletion(newFileCompletion, msgs);
305: if (msgs != null)
306: msgs.dispatch();
307: } else if (eNotificationRequired())
308: eNotify(new ENotificationImpl(
309: this ,
310: Notification.SET,
311: componentflowPackage.FILE_PROVIDER__FILE_COMPLETION,
312: newFileCompletion, newFileCompletion));
313: }
314:
315: /**
316: * <!-- begin-user-doc -->
317: * <!-- end-user-doc -->
318: * @generated
319: */
320: public NotificationChain eInverseRemove(InternalEObject otherEnd,
321: int featureID, NotificationChain msgs) {
322: switch (featureID) {
323: case componentflowPackage.FILE_PROVIDER__FILE_COMPLETION:
324: return basicSetFileCompletion(null, msgs);
325: }
326: return super .eInverseRemove(otherEnd, featureID, msgs);
327: }
328:
329: /**
330: * <!-- begin-user-doc -->
331: * <!-- end-user-doc -->
332: * @generated
333: */
334: public Object eGet(int featureID, boolean resolve, boolean coreType) {
335: switch (featureID) {
336: case componentflowPackage.FILE_PROVIDER__DEST_DIR:
337: return getDestDir();
338: case componentflowPackage.FILE_PROVIDER__STAGE_DIR:
339: return getStageDir();
340: case componentflowPackage.FILE_PROVIDER__FILE_PATTERN:
341: return getFilePattern();
342: case componentflowPackage.FILE_PROVIDER__WRITE_STYLE:
343: return getWriteStyle();
344: case componentflowPackage.FILE_PROVIDER__FILE_COMPLETION:
345: return getFileCompletion();
346: }
347: return super .eGet(featureID, resolve, coreType);
348: }
349:
350: /**
351: * <!-- begin-user-doc -->
352: * <!-- end-user-doc -->
353: * @generated
354: */
355: public void eSet(int featureID, Object newValue) {
356: switch (featureID) {
357: case componentflowPackage.FILE_PROVIDER__DEST_DIR:
358: setDestDir((String) newValue);
359: return;
360: case componentflowPackage.FILE_PROVIDER__STAGE_DIR:
361: setStageDir((String) newValue);
362: return;
363: case componentflowPackage.FILE_PROVIDER__FILE_PATTERN:
364: setFilePattern((String) newValue);
365: return;
366: case componentflowPackage.FILE_PROVIDER__WRITE_STYLE:
367: setWriteStyle((ReadStyleType) newValue);
368: return;
369: case componentflowPackage.FILE_PROVIDER__FILE_COMPLETION:
370: setFileCompletion((FileCompletion) newValue);
371: return;
372: }
373: super .eSet(featureID, newValue);
374: }
375:
376: /**
377: * <!-- begin-user-doc -->
378: * <!-- end-user-doc -->
379: * @generated
380: */
381: public void eUnset(int featureID) {
382: switch (featureID) {
383: case componentflowPackage.FILE_PROVIDER__DEST_DIR:
384: setDestDir(DEST_DIR_EDEFAULT);
385: return;
386: case componentflowPackage.FILE_PROVIDER__STAGE_DIR:
387: setStageDir(STAGE_DIR_EDEFAULT);
388: return;
389: case componentflowPackage.FILE_PROVIDER__FILE_PATTERN:
390: setFilePattern(FILE_PATTERN_EDEFAULT);
391: return;
392: case componentflowPackage.FILE_PROVIDER__WRITE_STYLE:
393: setWriteStyle(WRITE_STYLE_EDEFAULT);
394: return;
395: case componentflowPackage.FILE_PROVIDER__FILE_COMPLETION:
396: setFileCompletion((FileCompletion) null);
397: return;
398: }
399: super .eUnset(featureID);
400: }
401:
402: /**
403: * <!-- begin-user-doc -->
404: * <!-- end-user-doc -->
405: * @generated
406: */
407: public boolean eIsSet(int featureID) {
408: switch (featureID) {
409: case componentflowPackage.FILE_PROVIDER__DEST_DIR:
410: return DEST_DIR_EDEFAULT == null ? destDir != null
411: : !DEST_DIR_EDEFAULT.equals(destDir);
412: case componentflowPackage.FILE_PROVIDER__STAGE_DIR:
413: return STAGE_DIR_EDEFAULT == null ? stageDir != null
414: : !STAGE_DIR_EDEFAULT.equals(stageDir);
415: case componentflowPackage.FILE_PROVIDER__FILE_PATTERN:
416: return FILE_PATTERN_EDEFAULT == null ? filePattern != null
417: : !FILE_PATTERN_EDEFAULT.equals(filePattern);
418: case componentflowPackage.FILE_PROVIDER__WRITE_STYLE:
419: return writeStyle != WRITE_STYLE_EDEFAULT;
420: case componentflowPackage.FILE_PROVIDER__FILE_COMPLETION:
421: return fileCompletion != null;
422: }
423: return super .eIsSet(featureID);
424: }
425:
426: /**
427: * <!-- begin-user-doc -->
428: * <!-- end-user-doc -->
429: * @generated
430: */
431: public String toString() {
432: if (eIsProxy())
433: return super .toString();
434:
435: StringBuffer result = new StringBuffer(super .toString());
436: result.append(" (destDir: ");
437: result.append(destDir);
438: result.append(", stageDir: ");
439: result.append(stageDir);
440: result.append(", filePattern: ");
441: result.append(filePattern);
442: result.append(", writeStyle: ");
443: result.append(writeStyle);
444: result.append(')');
445: return result.toString();
446: }
447:
448: } //FileProviderImpl
|