001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: CBRType.java 5446 2007-02-26 07:55:55Z shou $
006: */package com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor;
007:
008: import java.util.Arrays;
009: import java.util.Collections;
010: import java.util.List;
011:
012: import org.eclipse.emf.common.util.AbstractEnumerator;
013:
014: /**
015: * <!-- begin-user-doc -->
016: * A representation of the literals of the enumeration '<em><b>CBR Type</b></em>',
017: * and utility methods for working with them.
018: * <!-- end-user-doc -->
019: * @see com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage#getCBRType()
020: * @model
021: * @generated
022: */
023: public final class CBRType extends AbstractEnumerator {
024: /**
025: * <!-- begin-user-doc -->
026: * <!-- end-user-doc -->
027: * @generated
028: */
029: public static final String copyright = "Copyright, Bostech Corp.";
030:
031: /**
032: * The '<em><b>Fixed</b></em>' literal value.
033: * <!-- begin-user-doc -->
034: * <p>
035: * If the meaning of '<em><b>Fixed</b></em>' literal object isn't clear,
036: * there really should be more of a description here...
037: * </p>
038: * <!-- end-user-doc -->
039: * @see #FIXED_LITERAL
040: * @model name="fixed"
041: * @generated
042: * @ordered
043: */
044: public static final int FIXED = 0;
045:
046: /**
047: * The '<em><b>Csv</b></em>' literal value.
048: * <!-- begin-user-doc -->
049: * <p>
050: * If the meaning of '<em><b>Csv</b></em>' literal object isn't clear,
051: * there really should be more of a description here...
052: * </p>
053: * <!-- end-user-doc -->
054: * @see #CSV_LITERAL
055: * @model name="csv"
056: * @generated
057: * @ordered
058: */
059: public static final int CSV = 1;
060:
061: /**
062: * The '<em><b>Xpath</b></em>' literal value.
063: * <!-- begin-user-doc -->
064: * <p>
065: * If the meaning of '<em><b>Xpath</b></em>' literal object isn't clear,
066: * there really should be more of a description here...
067: * </p>
068: * <!-- end-user-doc -->
069: * @see #XPATH_LITERAL
070: * @model name="xpath"
071: * @generated
072: * @ordered
073: */
074: public static final int XPATH = 2;
075:
076: /**
077: * The '<em><b>X12</b></em>' literal value.
078: * <!-- begin-user-doc -->
079: * <p>
080: * If the meaning of '<em><b>X12</b></em>' literal object isn't clear,
081: * there really should be more of a description here...
082: * </p>
083: * <!-- end-user-doc -->
084: * @see #X12_LITERAL
085: * @model name="x12"
086: * @generated
087: * @ordered
088: */
089: public static final int X12 = 3;
090:
091: /**
092: * The '<em><b>Hl7</b></em>' literal value.
093: * <!-- begin-user-doc -->
094: * <p>
095: * If the meaning of '<em><b>Hl7</b></em>' literal object isn't clear,
096: * there really should be more of a description here...
097: * </p>
098: * <!-- end-user-doc -->
099: * @see #HL7_LITERAL
100: * @model name="hl7"
101: * @generated
102: * @ordered
103: */
104: public static final int HL7 = 4;
105:
106: /**
107: * The '<em><b>Script</b></em>' literal value.
108: * <!-- begin-user-doc -->
109: * <p>
110: * If the meaning of '<em><b>Script</b></em>' literal object isn't clear,
111: * there really should be more of a description here...
112: * </p>
113: * <!-- end-user-doc -->
114: * @see #SCRIPT_LITERAL
115: * @model name="script"
116: * @generated
117: * @ordered
118: */
119: public static final int SCRIPT = 5;
120:
121: /**
122: * The '<em><b>Fixed</b></em>' literal object.
123: * <!-- begin-user-doc -->
124: * <!-- end-user-doc -->
125: * @see #FIXED
126: * @generated
127: * @ordered
128: */
129: public static final CBRType FIXED_LITERAL = new CBRType(FIXED,
130: "fixed", "fixed");
131:
132: /**
133: * The '<em><b>Csv</b></em>' literal object.
134: * <!-- begin-user-doc -->
135: * <!-- end-user-doc -->
136: * @see #CSV
137: * @generated
138: * @ordered
139: */
140: public static final CBRType CSV_LITERAL = new CBRType(CSV, "csv",
141: "csv");
142:
143: /**
144: * The '<em><b>Xpath</b></em>' literal object.
145: * <!-- begin-user-doc -->
146: * <!-- end-user-doc -->
147: * @see #XPATH
148: * @generated
149: * @ordered
150: */
151: public static final CBRType XPATH_LITERAL = new CBRType(XPATH,
152: "xpath", "xpath");
153:
154: /**
155: * The '<em><b>X12</b></em>' literal object.
156: * <!-- begin-user-doc -->
157: * <!-- end-user-doc -->
158: * @see #X12
159: * @generated
160: * @ordered
161: */
162: public static final CBRType X12_LITERAL = new CBRType(X12, "x12",
163: "x12");
164:
165: /**
166: * The '<em><b>Hl7</b></em>' literal object.
167: * <!-- begin-user-doc -->
168: * <!-- end-user-doc -->
169: * @see #HL7
170: * @generated
171: * @ordered
172: */
173: public static final CBRType HL7_LITERAL = new CBRType(HL7, "hl7",
174: "hl7");
175:
176: /**
177: * The '<em><b>Script</b></em>' literal object.
178: * <!-- begin-user-doc -->
179: * <!-- end-user-doc -->
180: * @see #SCRIPT
181: * @generated
182: * @ordered
183: */
184: public static final CBRType SCRIPT_LITERAL = new CBRType(SCRIPT,
185: "script", "script");
186:
187: /**
188: * An array of all the '<em><b>CBR Type</b></em>' enumerators.
189: * <!-- begin-user-doc -->
190: * <!-- end-user-doc -->
191: * @generated
192: */
193: private static final CBRType[] VALUES_ARRAY = new CBRType[] {
194: FIXED_LITERAL, CSV_LITERAL, XPATH_LITERAL, X12_LITERAL,
195: HL7_LITERAL, SCRIPT_LITERAL, };
196:
197: /**
198: * A public read-only list of all the '<em><b>CBR Type</b></em>' enumerators.
199: * <!-- begin-user-doc -->
200: * <!-- end-user-doc -->
201: * @generated
202: */
203: public static final List VALUES = Collections
204: .unmodifiableList(Arrays.asList(VALUES_ARRAY));
205:
206: /**
207: * Returns the '<em><b>CBR Type</b></em>' literal with the specified literal value.
208: * <!-- begin-user-doc -->
209: * <!-- end-user-doc -->
210: * @generated
211: */
212: public static CBRType get(String literal) {
213: for (int i = 0; i < VALUES_ARRAY.length; ++i) {
214: CBRType result = VALUES_ARRAY[i];
215: if (result.toString().equals(literal)) {
216: return result;
217: }
218: }
219: return null;
220: }
221:
222: /**
223: * Returns the '<em><b>CBR Type</b></em>' literal with the specified name.
224: * <!-- begin-user-doc -->
225: * <!-- end-user-doc -->
226: * @generated
227: */
228: public static CBRType getByName(String name) {
229: for (int i = 0; i < VALUES_ARRAY.length; ++i) {
230: CBRType result = VALUES_ARRAY[i];
231: if (result.getName().equals(name)) {
232: return result;
233: }
234: }
235: return null;
236: }
237:
238: /**
239: * Returns the '<em><b>CBR Type</b></em>' literal with the specified integer value.
240: * <!-- begin-user-doc -->
241: * <!-- end-user-doc -->
242: * @generated
243: */
244: public static CBRType get(int value) {
245: switch (value) {
246: case FIXED:
247: return FIXED_LITERAL;
248: case CSV:
249: return CSV_LITERAL;
250: case XPATH:
251: return XPATH_LITERAL;
252: case X12:
253: return X12_LITERAL;
254: case HL7:
255: return HL7_LITERAL;
256: case SCRIPT:
257: return SCRIPT_LITERAL;
258: }
259: return null;
260: }
261:
262: /**
263: * Only this class can construct instances.
264: * <!-- begin-user-doc -->
265: * <!-- end-user-doc -->
266: * @generated
267: */
268: private CBRType(int value, String name, String literal) {
269: super (value, name, literal);
270: }
271:
272: } //CBRType
|