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.DefaultMepType;
009: import org.eclipse.emf.common.notify.Notification;
010: import org.eclipse.emf.common.notify.NotificationChain;
011:
012: import org.eclipse.emf.ecore.EClass;
013: import org.eclipse.emf.ecore.InternalEObject;
014:
015: import org.eclipse.emf.ecore.impl.ENotificationImpl;
016:
017: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.Parser;
018: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.ParserType;
019: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.ProviderCCSL;
020: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.Upoc;
021: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowFactory;
022: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage;
023:
024: /**
025: * <!-- begin-user-doc -->
026: * An implementation of the model object '<em><b>Parser</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.ParserImpl#getParserType <em>Parser Type</em>}</li>
032: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.ParserImpl#getMessageDefinition <em>Message Definition</em>}</li>
033: * </ul>
034: * </p>
035: *
036: * @generated
037: */
038: public class ParserImpl extends ServiceEngineImpl implements Parser {
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 default value of the '{@link #getParserType() <em>Parser Type</em>}' attribute.
048: * <!-- begin-user-doc -->
049: * <!-- end-user-doc -->
050: * @see #getParserType()
051: * @generated
052: * @ordered
053: */
054: protected static final ParserType PARSER_TYPE_EDEFAULT = ParserType.MDL_LITERAL;
055:
056: /**
057: * The cached value of the '{@link #getParserType() <em>Parser Type</em>}' attribute.
058: * <!-- begin-user-doc -->
059: * <!-- end-user-doc -->
060: * @see #getParserType()
061: * @generated
062: * @ordered
063: */
064: protected ParserType parserType = PARSER_TYPE_EDEFAULT;
065:
066: /**
067: * The default value of the '{@link #getMessageDefinition() <em>Message Definition</em>}' attribute.
068: * <!-- begin-user-doc -->
069: * <!-- end-user-doc -->
070: * @see #getMessageDefinition()
071: * @generated
072: * @ordered
073: */
074: protected static final String MESSAGE_DEFINITION_EDEFAULT = null;
075:
076: /**
077: * The cached value of the '{@link #getMessageDefinition() <em>Message Definition</em>}' attribute.
078: * <!-- begin-user-doc -->
079: * <!-- end-user-doc -->
080: * @see #getMessageDefinition()
081: * @generated
082: * @ordered
083: */
084: protected String messageDefinition = MESSAGE_DEFINITION_EDEFAULT;
085:
086: /**
087: * The default value of the '{@link #getDefaultMep() <em>Default Mep</em>}' attribute.
088: * <!-- begin-user-doc -->
089: * <!-- end-user-doc -->
090: * @see #getDefaultMep()
091: * @generated not
092: * @ordered
093: */
094: protected static final DefaultMepType DEFAULT_MEP_EDEFAULT = DefaultMepType.INOUT_LITERAL;
095:
096: /**
097: * <!-- begin-user-doc -->
098: * <!-- end-user-doc -->
099: * @generated not
100: */
101: protected ParserImpl() {
102: super ();
103:
104: }
105:
106: /**
107: * <!-- begin-user-doc -->
108: * <!-- end-user-doc -->
109: * @generated
110: */
111: protected EClass eStaticClass() {
112: return componentflowPackage.Literals.PARSER;
113: }
114:
115: /**
116: * <!-- begin-user-doc -->
117: * <!-- end-user-doc -->
118: * @generated
119: */
120: public ParserType getParserType() {
121: return parserType;
122: }
123:
124: /**
125: * <!-- begin-user-doc -->
126: * <!-- end-user-doc -->
127: * @generated
128: */
129: public void setParserType(ParserType newParserType) {
130: ParserType oldParserType = parserType;
131: parserType = newParserType == null ? PARSER_TYPE_EDEFAULT
132: : newParserType;
133: if (eNotificationRequired())
134: eNotify(new ENotificationImpl(this , Notification.SET,
135: componentflowPackage.PARSER__PARSER_TYPE,
136: oldParserType, parserType));
137: }
138:
139: /**
140: * <!-- begin-user-doc -->
141: * <!-- end-user-doc -->
142: * @generated
143: */
144: public String getMessageDefinition() {
145: return messageDefinition;
146: }
147:
148: /**
149: * <!-- begin-user-doc -->
150: * <!-- end-user-doc -->
151: * @generated
152: */
153: public void setMessageDefinition(String newMessageDefinition) {
154: String oldMessageDefinition = messageDefinition;
155: messageDefinition = newMessageDefinition;
156: if (eNotificationRequired())
157: eNotify(new ENotificationImpl(this , Notification.SET,
158: componentflowPackage.PARSER__MESSAGE_DEFINITION,
159: oldMessageDefinition, messageDefinition));
160: }
161:
162: /**
163: * <!-- begin-user-doc -->
164: * <!-- end-user-doc -->
165: * @generated
166: */
167: public Object eGet(int featureID, boolean resolve, boolean coreType) {
168: switch (featureID) {
169: case componentflowPackage.PARSER__PARSER_TYPE:
170: return getParserType();
171: case componentflowPackage.PARSER__MESSAGE_DEFINITION:
172: return getMessageDefinition();
173: }
174: return super .eGet(featureID, resolve, coreType);
175: }
176:
177: /**
178: * <!-- begin-user-doc -->
179: * <!-- end-user-doc -->
180: * @generated
181: */
182: public void eSet(int featureID, Object newValue) {
183: switch (featureID) {
184: case componentflowPackage.PARSER__PARSER_TYPE:
185: setParserType((ParserType) newValue);
186: return;
187: case componentflowPackage.PARSER__MESSAGE_DEFINITION:
188: setMessageDefinition((String) newValue);
189: return;
190: }
191: super .eSet(featureID, newValue);
192: }
193:
194: /**
195: * <!-- begin-user-doc -->
196: * <!-- end-user-doc -->
197: * @generated
198: */
199: public void eUnset(int featureID) {
200: switch (featureID) {
201: case componentflowPackage.PARSER__PARSER_TYPE:
202: setParserType(PARSER_TYPE_EDEFAULT);
203: return;
204: case componentflowPackage.PARSER__MESSAGE_DEFINITION:
205: setMessageDefinition(MESSAGE_DEFINITION_EDEFAULT);
206: return;
207: }
208: super .eUnset(featureID);
209: }
210:
211: /**
212: * <!-- begin-user-doc -->
213: * <!-- end-user-doc -->
214: * @generated
215: */
216: public boolean eIsSet(int featureID) {
217: switch (featureID) {
218: case componentflowPackage.PARSER__PARSER_TYPE:
219: return parserType != PARSER_TYPE_EDEFAULT;
220: case componentflowPackage.PARSER__MESSAGE_DEFINITION:
221: return MESSAGE_DEFINITION_EDEFAULT == null ? messageDefinition != null
222: : !MESSAGE_DEFINITION_EDEFAULT
223: .equals(messageDefinition);
224: }
225: return super .eIsSet(featureID);
226: }
227:
228: /**
229: * <!-- begin-user-doc -->
230: * <!-- end-user-doc -->
231: * @generated
232: */
233: public String toString() {
234: if (eIsProxy())
235: return super .toString();
236:
237: StringBuffer result = new StringBuffer(super .toString());
238: result.append(" (parserType: ");
239: result.append(parserType);
240: result.append(", messageDefinition: ");
241: result.append(messageDefinition);
242: result.append(')');
243: return result.toString();
244: }
245:
246: /**
247: * <!-- begin-user-doc -->
248: * <!-- end-user-doc -->
249: * @generated not
250: */
251: public DefaultMepType getDefaultMep() {
252: return DefaultMepType.INOUT_LITERAL;
253: }
254: } //ParserImpl
|