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.FileActionType;
009: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.FileCompletion;
010: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage;
011:
012: import org.eclipse.emf.common.notify.Notification;
013:
014: import org.eclipse.emf.ecore.EClass;
015:
016: import org.eclipse.emf.ecore.impl.ENotificationImpl;
017: import org.eclipse.emf.ecore.impl.EObjectImpl;
018:
019: /**
020: * <!-- begin-user-doc -->
021: * An implementation of the model object '<em><b>File Completion</b></em>'.
022: * <!-- end-user-doc -->
023: * <p>
024: * The following features are implemented:
025: * <ul>
026: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.FileCompletionImpl#getAction <em>Action</em>}</li>
027: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.FileCompletionImpl#getArchiveDirectory <em>Archive Directory</em>}</li>
028: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.FileCompletionImpl#getArchiveFilePattern <em>Archive File Pattern</em>}</li>
029: * </ul>
030: * </p>
031: *
032: * @generated
033: */
034: public class FileCompletionImpl extends EObjectImpl implements
035: FileCompletion {
036: /**
037: * <!-- begin-user-doc -->
038: * <!-- end-user-doc -->
039: * @generated
040: */
041: public static final String copyright = "Copyright, Bostech Corp.";
042:
043: /**
044: * The default value of the '{@link #getAction() <em>Action</em>}' attribute.
045: * <!-- begin-user-doc -->
046: * <!-- end-user-doc -->
047: * @see #getAction()
048: * @generated
049: * @ordered
050: */
051: protected static final FileActionType ACTION_EDEFAULT = FileActionType.DELETE_LITERAL;
052:
053: /**
054: * The cached value of the '{@link #getAction() <em>Action</em>}' attribute.
055: * <!-- begin-user-doc -->
056: * <!-- end-user-doc -->
057: * @see #getAction()
058: * @generated
059: * @ordered
060: */
061: protected FileActionType action = ACTION_EDEFAULT;
062:
063: /**
064: * The default value of the '{@link #getArchiveDirectory() <em>Archive Directory</em>}' attribute.
065: * <!-- begin-user-doc -->
066: * <!-- end-user-doc -->
067: * @see #getArchiveDirectory()
068: * @generated
069: * @ordered
070: */
071: protected static final String ARCHIVE_DIRECTORY_EDEFAULT = null;
072:
073: /**
074: * The cached value of the '{@link #getArchiveDirectory() <em>Archive Directory</em>}' attribute.
075: * <!-- begin-user-doc -->
076: * <!-- end-user-doc -->
077: * @see #getArchiveDirectory()
078: * @generated
079: * @ordered
080: */
081: protected String archiveDirectory = ARCHIVE_DIRECTORY_EDEFAULT;
082:
083: /**
084: * The default value of the '{@link #getArchiveFilePattern() <em>Archive File Pattern</em>}' attribute.
085: * <!-- begin-user-doc -->
086: * <!-- end-user-doc -->
087: * @see #getArchiveFilePattern()
088: * @generated
089: * @ordered
090: */
091: protected static final String ARCHIVE_FILE_PATTERN_EDEFAULT = null;
092:
093: /**
094: * The cached value of the '{@link #getArchiveFilePattern() <em>Archive File Pattern</em>}' attribute.
095: * <!-- begin-user-doc -->
096: * <!-- end-user-doc -->
097: * @see #getArchiveFilePattern()
098: * @generated
099: * @ordered
100: */
101: protected String archiveFilePattern = ARCHIVE_FILE_PATTERN_EDEFAULT;
102:
103: /**
104: * <!-- begin-user-doc -->
105: * <!-- end-user-doc -->
106: * @generated
107: */
108: protected FileCompletionImpl() {
109: super ();
110: }
111:
112: /**
113: * <!-- begin-user-doc -->
114: * <!-- end-user-doc -->
115: * @generated
116: */
117: protected EClass eStaticClass() {
118: return componentflowPackage.Literals.FILE_COMPLETION;
119: }
120:
121: /**
122: * <!-- begin-user-doc -->
123: * <!-- end-user-doc -->
124: * @generated
125: */
126: public FileActionType getAction() {
127: return action;
128: }
129:
130: /**
131: * <!-- begin-user-doc -->
132: * <!-- end-user-doc -->
133: * @generated
134: */
135: public void setAction(FileActionType newAction) {
136: FileActionType oldAction = action;
137: action = newAction == null ? ACTION_EDEFAULT : newAction;
138: if (eNotificationRequired())
139: eNotify(new ENotificationImpl(this , Notification.SET,
140: componentflowPackage.FILE_COMPLETION__ACTION,
141: oldAction, action));
142: }
143:
144: /**
145: * <!-- begin-user-doc -->
146: * <!-- end-user-doc -->
147: * @generated
148: */
149: public String getArchiveDirectory() {
150: return archiveDirectory;
151: }
152:
153: /**
154: * <!-- begin-user-doc -->
155: * <!-- end-user-doc -->
156: * @generated
157: */
158: public void setArchiveDirectory(String newArchiveDirectory) {
159: String oldArchiveDirectory = archiveDirectory;
160: archiveDirectory = newArchiveDirectory;
161: if (eNotificationRequired())
162: eNotify(new ENotificationImpl(
163: this ,
164: Notification.SET,
165: componentflowPackage.FILE_COMPLETION__ARCHIVE_DIRECTORY,
166: oldArchiveDirectory, archiveDirectory));
167: }
168:
169: /**
170: * <!-- begin-user-doc -->
171: * <!-- end-user-doc -->
172: * @generated
173: */
174: public String getArchiveFilePattern() {
175: return archiveFilePattern;
176: }
177:
178: /**
179: * <!-- begin-user-doc -->
180: * <!-- end-user-doc -->
181: * @generated
182: */
183: public void setArchiveFilePattern(String newArchiveFilePattern) {
184: String oldArchiveFilePattern = archiveFilePattern;
185: archiveFilePattern = newArchiveFilePattern;
186: if (eNotificationRequired())
187: eNotify(new ENotificationImpl(
188: this ,
189: Notification.SET,
190: componentflowPackage.FILE_COMPLETION__ARCHIVE_FILE_PATTERN,
191: oldArchiveFilePattern, archiveFilePattern));
192: }
193:
194: /**
195: * <!-- begin-user-doc -->
196: * <!-- end-user-doc -->
197: * @generated
198: */
199: public Object eGet(int featureID, boolean resolve, boolean coreType) {
200: switch (featureID) {
201: case componentflowPackage.FILE_COMPLETION__ACTION:
202: return getAction();
203: case componentflowPackage.FILE_COMPLETION__ARCHIVE_DIRECTORY:
204: return getArchiveDirectory();
205: case componentflowPackage.FILE_COMPLETION__ARCHIVE_FILE_PATTERN:
206: return getArchiveFilePattern();
207: }
208: return super .eGet(featureID, resolve, coreType);
209: }
210:
211: /**
212: * <!-- begin-user-doc -->
213: * <!-- end-user-doc -->
214: * @generated
215: */
216: public void eSet(int featureID, Object newValue) {
217: switch (featureID) {
218: case componentflowPackage.FILE_COMPLETION__ACTION:
219: setAction((FileActionType) newValue);
220: return;
221: case componentflowPackage.FILE_COMPLETION__ARCHIVE_DIRECTORY:
222: setArchiveDirectory((String) newValue);
223: return;
224: case componentflowPackage.FILE_COMPLETION__ARCHIVE_FILE_PATTERN:
225: setArchiveFilePattern((String) newValue);
226: return;
227: }
228: super .eSet(featureID, newValue);
229: }
230:
231: /**
232: * <!-- begin-user-doc -->
233: * <!-- end-user-doc -->
234: * @generated
235: */
236: public void eUnset(int featureID) {
237: switch (featureID) {
238: case componentflowPackage.FILE_COMPLETION__ACTION:
239: setAction(ACTION_EDEFAULT);
240: return;
241: case componentflowPackage.FILE_COMPLETION__ARCHIVE_DIRECTORY:
242: setArchiveDirectory(ARCHIVE_DIRECTORY_EDEFAULT);
243: return;
244: case componentflowPackage.FILE_COMPLETION__ARCHIVE_FILE_PATTERN:
245: setArchiveFilePattern(ARCHIVE_FILE_PATTERN_EDEFAULT);
246: return;
247: }
248: super .eUnset(featureID);
249: }
250:
251: /**
252: * <!-- begin-user-doc -->
253: * <!-- end-user-doc -->
254: * @generated
255: */
256: public boolean eIsSet(int featureID) {
257: switch (featureID) {
258: case componentflowPackage.FILE_COMPLETION__ACTION:
259: return action != ACTION_EDEFAULT;
260: case componentflowPackage.FILE_COMPLETION__ARCHIVE_DIRECTORY:
261: return ARCHIVE_DIRECTORY_EDEFAULT == null ? archiveDirectory != null
262: : !ARCHIVE_DIRECTORY_EDEFAULT
263: .equals(archiveDirectory);
264: case componentflowPackage.FILE_COMPLETION__ARCHIVE_FILE_PATTERN:
265: return ARCHIVE_FILE_PATTERN_EDEFAULT == null ? archiveFilePattern != null
266: : !ARCHIVE_FILE_PATTERN_EDEFAULT
267: .equals(archiveFilePattern);
268: }
269: return super .eIsSet(featureID);
270: }
271:
272: /**
273: * <!-- begin-user-doc -->
274: * <!-- end-user-doc -->
275: * @generated
276: */
277: public String toString() {
278: if (eIsProxy())
279: return super .toString();
280:
281: StringBuffer result = new StringBuffer(super .toString());
282: result.append(" (action: ");
283: result.append(action);
284: result.append(", archiveDirectory: ");
285: result.append(archiveDirectory);
286: result.append(", archiveFilePattern: ");
287: result.append(archiveFilePattern);
288: result.append(')');
289: return result.toString();
290: }
291:
292: } //FileCompletionImpl
|