001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: CBRImpl.java 6280 2007-03-24 06:43:27Z lzheng $
006: */package com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl;
007:
008: import java.util.Vector;
009:
010: import org.eclipse.emf.common.notify.Notification;
011: import org.eclipse.emf.common.notify.NotificationChain;
012: import org.eclipse.emf.ecore.EClass;
013: import org.eclipse.emf.ecore.InternalEObject;
014: import org.eclipse.emf.ecore.impl.ENotificationImpl;
015:
016: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.CBR;
017: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.CBRRoutingRule;
018: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.CBRType;
019: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.DefaultMepType;
020: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.ProviderCCSL;
021: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.Upoc;
022: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowFactory;
023: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage;
024:
025: /**
026: * <!-- begin-user-doc -->
027: * An implementation of the model object '<em><b>CBR</b></em>'.
028: * <!-- end-user-doc -->
029: * <p>
030: * The following features are implemented:
031: * <ul>
032: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.CBRImpl#getFixedOffset <em>Fixed Offset</em>}</li>
033: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.CBRImpl#getFixedLength <em>Fixed Length</em>}</li>
034: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.CBRImpl#getDelimiter <em>Delimiter</em>}</li>
035: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.CBRImpl#getScriptEngine <em>Script Engine</em>}</li>
036: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.CBRImpl#getScriptClass <em>Script Class</em>}</li>
037: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.CBRImpl#getScriptClassDescription <em>Script Class Description</em>}</li>
038: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.CBRImpl#getIndex <em>Index</em>}</li>
039: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.CBRImpl#getType <em>Type</em>}</li>
040: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.CBRImpl#getExpression <em>Expression</em>}</li>
041: * </ul>
042: * </p>
043: *
044: * @generated
045: */
046: public class CBRImpl extends ServiceEngineImpl implements CBR {
047: /**
048: * <!-- begin-user-doc -->
049: * <!-- end-user-doc -->
050: * @generated
051: */
052: public static final String copyright = "Copyright, Bostech Corp.";
053:
054: /**
055: * The default value of the '{@link #getFixedOffset() <em>Fixed Offset</em>}' attribute.
056: * <!-- begin-user-doc -->
057: * <!-- end-user-doc -->
058: * @see #getFixedOffset()
059: * @generated
060: * @ordered
061: */
062: protected static final String FIXED_OFFSET_EDEFAULT = null;
063:
064: /**
065: * The cached value of the '{@link #getFixedOffset() <em>Fixed Offset</em>}' attribute.
066: * <!-- begin-user-doc -->
067: * <!-- end-user-doc -->
068: * @see #getFixedOffset()
069: * @generated
070: * @ordered
071: */
072: protected String fixedOffset = FIXED_OFFSET_EDEFAULT;
073:
074: /**
075: * The default value of the '{@link #getFixedLength() <em>Fixed Length</em>}' attribute.
076: * <!-- begin-user-doc -->
077: * <!-- end-user-doc -->
078: * @see #getFixedLength()
079: * @generated
080: * @ordered
081: */
082: protected static final String FIXED_LENGTH_EDEFAULT = null;
083:
084: /**
085: * The cached value of the '{@link #getFixedLength() <em>Fixed Length</em>}' attribute.
086: * <!-- begin-user-doc -->
087: * <!-- end-user-doc -->
088: * @see #getFixedLength()
089: * @generated
090: * @ordered
091: */
092: protected String fixedLength = FIXED_LENGTH_EDEFAULT;
093:
094: /**
095: * The default value of the '{@link #getDelimiter() <em>Delimiter</em>}' attribute.
096: * <!-- begin-user-doc -->
097: * <!-- end-user-doc -->
098: * @see #getDelimiter()
099: * @generated
100: * @ordered
101: */
102: protected static final String DELIMITER_EDEFAULT = ",";
103:
104: /**
105: * The cached value of the '{@link #getDelimiter() <em>Delimiter</em>}' attribute.
106: * <!-- begin-user-doc -->
107: * <!-- end-user-doc -->
108: * @see #getDelimiter()
109: * @generated
110: * @ordered
111: */
112: protected String delimiter = DELIMITER_EDEFAULT;
113:
114: /**
115: * The default value of the '{@link #getScriptEngine() <em>Script Engine</em>}' attribute.
116: * <!-- begin-user-doc -->
117: * <!-- end-user-doc -->
118: * @see #getScriptEngine()
119: * @generated
120: * @ordered
121: */
122: protected static final String SCRIPT_ENGINE_EDEFAULT = null;
123:
124: /**
125: * The cached value of the '{@link #getScriptEngine() <em>Script Engine</em>}' attribute.
126: * <!-- begin-user-doc -->
127: * <!-- end-user-doc -->
128: * @see #getScriptEngine()
129: * @generated
130: * @ordered
131: */
132: protected String scriptEngine = SCRIPT_ENGINE_EDEFAULT;
133:
134: /**
135: * The default value of the '{@link #getScriptClass() <em>Script Class</em>}' attribute.
136: * <!-- begin-user-doc -->
137: * <!-- end-user-doc -->
138: * @see #getScriptClass()
139: * @generated
140: * @ordered
141: */
142: protected static final String SCRIPT_CLASS_EDEFAULT = null;
143:
144: /**
145: * The cached value of the '{@link #getScriptClass() <em>Script Class</em>}' attribute.
146: * <!-- begin-user-doc -->
147: * <!-- end-user-doc -->
148: * @see #getScriptClass()
149: * @generated
150: * @ordered
151: */
152: protected String scriptClass = SCRIPT_CLASS_EDEFAULT;
153:
154: /**
155: * The default value of the '{@link #getScriptClassDescription() <em>Script Class Description</em>}' attribute.
156: * <!-- begin-user-doc -->
157: * <!-- end-user-doc -->
158: * @see #getScriptClassDescription()
159: * @generated
160: * @ordered
161: */
162: protected static final String SCRIPT_CLASS_DESCRIPTION_EDEFAULT = null;
163:
164: /**
165: * The cached value of the '{@link #getScriptClassDescription() <em>Script Class Description</em>}' attribute.
166: * <!-- begin-user-doc -->
167: * <!-- end-user-doc -->
168: * @see #getScriptClassDescription()
169: * @generated
170: * @ordered
171: */
172: protected String scriptClassDescription = SCRIPT_CLASS_DESCRIPTION_EDEFAULT;
173:
174: /**
175: * The default value of the '{@link #getIndex() <em>Index</em>}' attribute.
176: * <!-- begin-user-doc -->
177: * <!-- end-user-doc -->
178: * @see #getIndex()
179: * @generated
180: * @ordered
181: */
182: protected static final String INDEX_EDEFAULT = null;
183:
184: /**
185: * The cached value of the '{@link #getIndex() <em>Index</em>}' attribute.
186: * <!-- begin-user-doc -->
187: * <!-- end-user-doc -->
188: * @see #getIndex()
189: * @generated
190: * @ordered
191: */
192: protected String index = INDEX_EDEFAULT;
193:
194: /**
195: * The default value of the '{@link #getType() <em>Type</em>}' attribute.
196: * <!-- begin-user-doc -->
197: * <!-- end-user-doc -->
198: * @see #getType()
199: * @generated
200: * @ordered
201: */
202: protected static final CBRType TYPE_EDEFAULT = CBRType.FIXED_LITERAL;
203:
204: /**
205: * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
206: * <!-- begin-user-doc -->
207: * <!-- end-user-doc -->
208: * @see #getType()
209: * @generated
210: * @ordered
211: */
212: protected CBRType type = TYPE_EDEFAULT;
213:
214: /**
215: * The default value of the '{@link #getExpression() <em>Expression</em>}' attribute.
216: * <!-- begin-user-doc -->
217: * <!-- end-user-doc -->
218: * @see #getExpression()
219: * @generated
220: * @ordered
221: */
222: protected static final String EXPRESSION_EDEFAULT = null;
223:
224: /**
225: * The cached value of the '{@link #getExpression() <em>Expression</em>}' attribute.
226: * <!-- begin-user-doc -->
227: * <!-- end-user-doc -->
228: * @see #getExpression()
229: * @generated
230: * @ordered
231: */
232: protected String expression = EXPRESSION_EDEFAULT;
233:
234: /**
235: * <!-- begin-user-doc -->
236: * <!-- end-user-doc -->
237: * @generated NOT
238: */
239: protected CBRImpl() {
240: super ();
241: }
242:
243: /**
244: * <!-- begin-user-doc -->
245: * <!-- end-user-doc -->
246: * @generated
247: */
248: protected EClass eStaticClass() {
249: return componentflowPackage.Literals.CBR;
250: }
251:
252: /**
253: * <!-- begin-user-doc -->
254: * <!-- end-user-doc -->
255: * @generated
256: */
257: public String getFixedOffset() {
258: return fixedOffset;
259: }
260:
261: /**
262: * <!-- begin-user-doc -->
263: * <!-- end-user-doc -->
264: * @generated
265: */
266: public void setFixedOffset(String newFixedOffset) {
267: String oldFixedOffset = fixedOffset;
268: fixedOffset = newFixedOffset;
269: if (eNotificationRequired())
270: eNotify(new ENotificationImpl(this , Notification.SET,
271: componentflowPackage.CBR__FIXED_OFFSET,
272: oldFixedOffset, fixedOffset));
273: }
274:
275: /**
276: * <!-- begin-user-doc -->
277: * <!-- end-user-doc -->
278: * @generated
279: */
280: public String getFixedLength() {
281: return fixedLength;
282: }
283:
284: /**
285: * <!-- begin-user-doc -->
286: * <!-- end-user-doc -->
287: * @generated
288: */
289: public void setFixedLength(String newFixedLength) {
290: String oldFixedLength = fixedLength;
291: fixedLength = newFixedLength;
292: if (eNotificationRequired())
293: eNotify(new ENotificationImpl(this , Notification.SET,
294: componentflowPackage.CBR__FIXED_LENGTH,
295: oldFixedLength, fixedLength));
296: }
297:
298: /**
299: * <!-- begin-user-doc -->
300: * <!-- end-user-doc -->
301: * @generated
302: */
303: public String getDelimiter() {
304: return delimiter;
305: }
306:
307: /**
308: * <!-- begin-user-doc -->
309: * <!-- end-user-doc -->
310: * @generated
311: */
312: public void setDelimiter(String newDelimiter) {
313: String oldDelimiter = delimiter;
314: delimiter = newDelimiter;
315: if (eNotificationRequired())
316: eNotify(new ENotificationImpl(this , Notification.SET,
317: componentflowPackage.CBR__DELIMITER, oldDelimiter,
318: delimiter));
319: }
320:
321: /**
322: * <!-- begin-user-doc -->
323: * <!-- end-user-doc -->
324: * @generated
325: */
326: public String getScriptEngine() {
327: return scriptEngine;
328: }
329:
330: /**
331: * <!-- begin-user-doc -->
332: * <!-- end-user-doc -->
333: * @generated
334: */
335: public void setScriptEngine(String newScriptEngine) {
336: String oldScriptEngine = scriptEngine;
337: scriptEngine = newScriptEngine;
338: if (eNotificationRequired())
339: eNotify(new ENotificationImpl(this , Notification.SET,
340: componentflowPackage.CBR__SCRIPT_ENGINE,
341: oldScriptEngine, scriptEngine));
342: }
343:
344: /**
345: * <!-- begin-user-doc -->
346: * <!-- end-user-doc -->
347: * @generated
348: */
349: public String getScriptClass() {
350: return scriptClass;
351: }
352:
353: /**
354: * <!-- begin-user-doc -->
355: * <!-- end-user-doc -->
356: * @generated
357: */
358: public void setScriptClass(String newScriptClass) {
359: String oldScriptClass = scriptClass;
360: scriptClass = newScriptClass;
361: if (eNotificationRequired())
362: eNotify(new ENotificationImpl(this , Notification.SET,
363: componentflowPackage.CBR__SCRIPT_CLASS,
364: oldScriptClass, scriptClass));
365: }
366:
367: /**
368: * <!-- begin-user-doc -->
369: * <!-- end-user-doc -->
370: * @generated
371: */
372: public String getIndex() {
373: return index;
374: }
375:
376: /**
377: * <!-- begin-user-doc -->
378: * <!-- end-user-doc -->
379: * @generated
380: */
381: public void setIndex(String newIndex) {
382: String oldIndex = index;
383: index = newIndex;
384: if (eNotificationRequired())
385: eNotify(new ENotificationImpl(this , Notification.SET,
386: componentflowPackage.CBR__INDEX, oldIndex, index));
387: }
388:
389: /**
390: * <!-- begin-user-doc -->
391: * <!-- end-user-doc -->
392: * @generated
393: */
394: public CBRType getType() {
395: return type;
396: }
397:
398: /**
399: * <!-- begin-user-doc -->
400: * <!-- end-user-doc -->
401: * @generated
402: */
403: public void setType(CBRType newType) {
404: CBRType oldType = type;
405: type = newType == null ? TYPE_EDEFAULT : newType;
406: if (eNotificationRequired())
407: eNotify(new ENotificationImpl(this , Notification.SET,
408: componentflowPackage.CBR__TYPE, oldType, type));
409: }
410:
411: /**
412: * <!-- begin-user-doc -->
413: * <!-- end-user-doc -->
414: * @generated
415: */
416: public String getExpression() {
417: return expression;
418: }
419:
420: /**
421: * <!-- begin-user-doc -->
422: * <!-- end-user-doc -->
423: * @generated
424: */
425: public void setExpression(String newExpression) {
426: String oldExpression = expression;
427: expression = newExpression;
428: if (eNotificationRequired())
429: eNotify(new ENotificationImpl(this , Notification.SET,
430: componentflowPackage.CBR__EXPRESSION,
431: oldExpression, expression));
432: }
433:
434: /**
435: * <!-- begin-user-doc -->
436: * <!-- end-user-doc -->
437: * @generated
438: */
439: public String getScriptClassDescription() {
440: return scriptClassDescription;
441: }
442:
443: /**
444: * <!-- begin-user-doc -->
445: * <!-- end-user-doc -->
446: * @generated
447: */
448: public void setScriptClassDescription(
449: String newScriptClassDescription) {
450: String oldScriptClassDescription = scriptClassDescription;
451: scriptClassDescription = newScriptClassDescription;
452: if (eNotificationRequired())
453: eNotify(new ENotificationImpl(this , Notification.SET,
454: componentflowPackage.CBR__SCRIPT_CLASS_DESCRIPTION,
455: oldScriptClassDescription, scriptClassDescription));
456: }
457:
458: /**
459: * <!-- begin-user-doc -->
460: * <!-- end-user-doc -->
461: * @generated
462: */
463: public Object eGet(int featureID, boolean resolve, boolean coreType) {
464: switch (featureID) {
465: case componentflowPackage.CBR__FIXED_OFFSET:
466: return getFixedOffset();
467: case componentflowPackage.CBR__FIXED_LENGTH:
468: return getFixedLength();
469: case componentflowPackage.CBR__DELIMITER:
470: return getDelimiter();
471: case componentflowPackage.CBR__SCRIPT_ENGINE:
472: return getScriptEngine();
473: case componentflowPackage.CBR__SCRIPT_CLASS:
474: return getScriptClass();
475: case componentflowPackage.CBR__SCRIPT_CLASS_DESCRIPTION:
476: return getScriptClassDescription();
477: case componentflowPackage.CBR__INDEX:
478: return getIndex();
479: case componentflowPackage.CBR__TYPE:
480: return getType();
481: case componentflowPackage.CBR__EXPRESSION:
482: return getExpression();
483: }
484: return super .eGet(featureID, resolve, coreType);
485: }
486:
487: /**
488: * <!-- begin-user-doc -->
489: * <!-- end-user-doc -->
490: * @generated
491: */
492: public void eSet(int featureID, Object newValue) {
493: switch (featureID) {
494: case componentflowPackage.CBR__FIXED_OFFSET:
495: setFixedOffset((String) newValue);
496: return;
497: case componentflowPackage.CBR__FIXED_LENGTH:
498: setFixedLength((String) newValue);
499: return;
500: case componentflowPackage.CBR__DELIMITER:
501: setDelimiter((String) newValue);
502: return;
503: case componentflowPackage.CBR__SCRIPT_ENGINE:
504: setScriptEngine((String) newValue);
505: return;
506: case componentflowPackage.CBR__SCRIPT_CLASS:
507: setScriptClass((String) newValue);
508: return;
509: case componentflowPackage.CBR__SCRIPT_CLASS_DESCRIPTION:
510: setScriptClassDescription((String) newValue);
511: return;
512: case componentflowPackage.CBR__INDEX:
513: setIndex((String) newValue);
514: return;
515: case componentflowPackage.CBR__TYPE:
516: setType((CBRType) newValue);
517: return;
518: case componentflowPackage.CBR__EXPRESSION:
519: setExpression((String) newValue);
520: return;
521: }
522: super .eSet(featureID, newValue);
523: }
524:
525: /**
526: * <!-- begin-user-doc -->
527: * <!-- end-user-doc -->
528: * @generated
529: */
530: public void eUnset(int featureID) {
531: switch (featureID) {
532: case componentflowPackage.CBR__FIXED_OFFSET:
533: setFixedOffset(FIXED_OFFSET_EDEFAULT);
534: return;
535: case componentflowPackage.CBR__FIXED_LENGTH:
536: setFixedLength(FIXED_LENGTH_EDEFAULT);
537: return;
538: case componentflowPackage.CBR__DELIMITER:
539: setDelimiter(DELIMITER_EDEFAULT);
540: return;
541: case componentflowPackage.CBR__SCRIPT_ENGINE:
542: setScriptEngine(SCRIPT_ENGINE_EDEFAULT);
543: return;
544: case componentflowPackage.CBR__SCRIPT_CLASS:
545: setScriptClass(SCRIPT_CLASS_EDEFAULT);
546: return;
547: case componentflowPackage.CBR__SCRIPT_CLASS_DESCRIPTION:
548: setScriptClassDescription(SCRIPT_CLASS_DESCRIPTION_EDEFAULT);
549: return;
550: case componentflowPackage.CBR__INDEX:
551: setIndex(INDEX_EDEFAULT);
552: return;
553: case componentflowPackage.CBR__TYPE:
554: setType(TYPE_EDEFAULT);
555: return;
556: case componentflowPackage.CBR__EXPRESSION:
557: setExpression(EXPRESSION_EDEFAULT);
558: return;
559: }
560: super .eUnset(featureID);
561: }
562:
563: /**
564: * <!-- begin-user-doc -->
565: * <!-- end-user-doc -->
566: * @generated
567: */
568: public boolean eIsSet(int featureID) {
569: switch (featureID) {
570: case componentflowPackage.CBR__FIXED_OFFSET:
571: return FIXED_OFFSET_EDEFAULT == null ? fixedOffset != null
572: : !FIXED_OFFSET_EDEFAULT.equals(fixedOffset);
573: case componentflowPackage.CBR__FIXED_LENGTH:
574: return FIXED_LENGTH_EDEFAULT == null ? fixedLength != null
575: : !FIXED_LENGTH_EDEFAULT.equals(fixedLength);
576: case componentflowPackage.CBR__DELIMITER:
577: return DELIMITER_EDEFAULT == null ? delimiter != null
578: : !DELIMITER_EDEFAULT.equals(delimiter);
579: case componentflowPackage.CBR__SCRIPT_ENGINE:
580: return SCRIPT_ENGINE_EDEFAULT == null ? scriptEngine != null
581: : !SCRIPT_ENGINE_EDEFAULT.equals(scriptEngine);
582: case componentflowPackage.CBR__SCRIPT_CLASS:
583: return SCRIPT_CLASS_EDEFAULT == null ? scriptClass != null
584: : !SCRIPT_CLASS_EDEFAULT.equals(scriptClass);
585: case componentflowPackage.CBR__SCRIPT_CLASS_DESCRIPTION:
586: return SCRIPT_CLASS_DESCRIPTION_EDEFAULT == null ? scriptClassDescription != null
587: : !SCRIPT_CLASS_DESCRIPTION_EDEFAULT
588: .equals(scriptClassDescription);
589: case componentflowPackage.CBR__INDEX:
590: return INDEX_EDEFAULT == null ? index != null
591: : !INDEX_EDEFAULT.equals(index);
592: case componentflowPackage.CBR__TYPE:
593: return type != TYPE_EDEFAULT;
594: case componentflowPackage.CBR__EXPRESSION:
595: return EXPRESSION_EDEFAULT == null ? expression != null
596: : !EXPRESSION_EDEFAULT.equals(expression);
597: }
598: return super .eIsSet(featureID);
599: }
600:
601: /**
602: * <!-- begin-user-doc -->
603: * <!-- end-user-doc -->
604: * @generated
605: */
606: public String toString() {
607: if (eIsProxy())
608: return super .toString();
609:
610: StringBuffer result = new StringBuffer(super .toString());
611: result.append(" (fixedOffset: ");
612: result.append(fixedOffset);
613: result.append(", fixedLength: ");
614: result.append(fixedLength);
615: result.append(", delimiter: ");
616: result.append(delimiter);
617: result.append(", scriptEngine: ");
618: result.append(scriptEngine);
619: result.append(", scriptClass: ");
620: result.append(scriptClass);
621: result.append(", scriptClassDescription: ");
622: result.append(scriptClassDescription);
623: result.append(", index: ");
624: result.append(index);
625: result.append(", type: ");
626: result.append(type);
627: result.append(", expression: ");
628: result.append(expression);
629: result.append(')');
630: return result.toString();
631: }
632:
633: protected Vector<CBRRoutingRule> routingRuleList = new Vector<CBRRoutingRule>();
634:
635: public Vector<CBRRoutingRule> getRoutingRule() {
636: return routingRuleList;
637: }
638:
639: //
640: public void addRoutingRule(CBRRoutingRule routingRule) {
641: this .routingRuleList.add(routingRule);
642: }
643:
644: /**
645: * <!-- begin-user-doc -->
646: * <!-- end-user-doc -->
647: * @generated not
648: */
649: public DefaultMepType getDefaultMep() {
650: return DefaultMepType.INOUT_LITERAL;
651: }
652: } //CBRImpl
|