001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: OperationType.java 7522 2007-09-12 22:00:10Z saul.farber $
006: */package net.opengis.wfs;
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>Operation Type</b></em>',
017: * and utility methods for working with them.
018: * <!-- end-user-doc -->
019: * @see net.opengis.wfs.WfsPackage#getOperationType()
020: * @model
021: * @generated
022: */
023: public final class OperationType extends AbstractEnumerator {
024: /**
025: * The '<em><b>Insert</b></em>' literal value.
026: * <!-- begin-user-doc -->
027: * <p>
028: * If the meaning of '<em><b>Insert</b></em>' literal object isn't clear,
029: * there really should be more of a description here...
030: * </p>
031: * <!-- end-user-doc -->
032: * @see #INSERT_LITERAL
033: * @model name="Insert"
034: * @generated
035: * @ordered
036: */
037: public static final int INSERT = 0;
038:
039: /**
040: * The '<em><b>Update</b></em>' literal value.
041: * <!-- begin-user-doc -->
042: * <p>
043: * If the meaning of '<em><b>Update</b></em>' literal object isn't clear,
044: * there really should be more of a description here...
045: * </p>
046: * <!-- end-user-doc -->
047: * @see #UPDATE_LITERAL
048: * @model name="Update"
049: * @generated
050: * @ordered
051: */
052: public static final int UPDATE = 1;
053:
054: /**
055: * The '<em><b>Delete</b></em>' literal value.
056: * <!-- begin-user-doc -->
057: * <p>
058: * If the meaning of '<em><b>Delete</b></em>' literal object isn't clear,
059: * there really should be more of a description here...
060: * </p>
061: * <!-- end-user-doc -->
062: * @see #DELETE_LITERAL
063: * @model name="Delete"
064: * @generated
065: * @ordered
066: */
067: public static final int DELETE = 2;
068:
069: /**
070: * The '<em><b>Query</b></em>' literal value.
071: * <!-- begin-user-doc -->
072: * <p>
073: * If the meaning of '<em><b>Query</b></em>' literal object isn't clear,
074: * there really should be more of a description here...
075: * </p>
076: * <!-- end-user-doc -->
077: * @see #QUERY_LITERAL
078: * @model name="Query"
079: * @generated
080: * @ordered
081: */
082: public static final int QUERY = 3;
083:
084: /**
085: * The '<em><b>Lock</b></em>' literal value.
086: * <!-- begin-user-doc -->
087: * <p>
088: * If the meaning of '<em><b>Lock</b></em>' literal object isn't clear,
089: * there really should be more of a description here...
090: * </p>
091: * <!-- end-user-doc -->
092: * @see #LOCK_LITERAL
093: * @model name="Lock"
094: * @generated
095: * @ordered
096: */
097: public static final int LOCK = 4;
098:
099: /**
100: * The '<em><b>Get Gml Object</b></em>' literal value.
101: * <!-- begin-user-doc -->
102: * <p>
103: * If the meaning of '<em><b>Get Gml Object</b></em>' literal object isn't clear,
104: * there really should be more of a description here...
105: * </p>
106: * <!-- end-user-doc -->
107: * @see #GET_GML_OBJECT_LITERAL
108: * @model name="GetGmlObject"
109: * @generated
110: * @ordered
111: */
112: public static final int GET_GML_OBJECT = 5;
113:
114: /**
115: * The '<em><b>Insert</b></em>' literal object.
116: * <!-- begin-user-doc -->
117: * <!-- end-user-doc -->
118: * @see #INSERT
119: * @generated
120: * @ordered
121: */
122: public static final OperationType INSERT_LITERAL = new OperationType(
123: INSERT, "Insert", "Insert");
124:
125: /**
126: * The '<em><b>Update</b></em>' literal object.
127: * <!-- begin-user-doc -->
128: * <!-- end-user-doc -->
129: * @see #UPDATE
130: * @generated
131: * @ordered
132: */
133: public static final OperationType UPDATE_LITERAL = new OperationType(
134: UPDATE, "Update", "Update");
135:
136: /**
137: * The '<em><b>Delete</b></em>' literal object.
138: * <!-- begin-user-doc -->
139: * <!-- end-user-doc -->
140: * @see #DELETE
141: * @generated
142: * @ordered
143: */
144: public static final OperationType DELETE_LITERAL = new OperationType(
145: DELETE, "Delete", "Delete");
146:
147: /**
148: * The '<em><b>Query</b></em>' literal object.
149: * <!-- begin-user-doc -->
150: * <!-- end-user-doc -->
151: * @see #QUERY
152: * @generated
153: * @ordered
154: */
155: public static final OperationType QUERY_LITERAL = new OperationType(
156: QUERY, "Query", "Query");
157:
158: /**
159: * The '<em><b>Lock</b></em>' literal object.
160: * <!-- begin-user-doc -->
161: * <!-- end-user-doc -->
162: * @see #LOCK
163: * @generated
164: * @ordered
165: */
166: public static final OperationType LOCK_LITERAL = new OperationType(
167: LOCK, "Lock", "Lock");
168:
169: /**
170: * The '<em><b>Get Gml Object</b></em>' literal object.
171: * <!-- begin-user-doc -->
172: * <!-- end-user-doc -->
173: * @see #GET_GML_OBJECT
174: * @generated
175: * @ordered
176: */
177: public static final OperationType GET_GML_OBJECT_LITERAL = new OperationType(
178: GET_GML_OBJECT, "GetGmlObject", "GetGmlObject");
179:
180: /**
181: * An array of all the '<em><b>Operation Type</b></em>' enumerators.
182: * <!-- begin-user-doc -->
183: * <!-- end-user-doc -->
184: * @generated
185: */
186: private static final OperationType[] VALUES_ARRAY = new OperationType[] {
187: INSERT_LITERAL, UPDATE_LITERAL, DELETE_LITERAL,
188: QUERY_LITERAL, LOCK_LITERAL, GET_GML_OBJECT_LITERAL, };
189:
190: /**
191: * A public read-only list of all the '<em><b>Operation Type</b></em>' enumerators.
192: * <!-- begin-user-doc -->
193: * <!-- end-user-doc -->
194: * @generated
195: */
196: public static final List VALUES = Collections
197: .unmodifiableList(Arrays.asList(VALUES_ARRAY));
198:
199: /**
200: * Returns the '<em><b>Operation Type</b></em>' literal with the specified literal value.
201: * <!-- begin-user-doc -->
202: * <!-- end-user-doc -->
203: * @generated
204: */
205: public static OperationType get(String literal) {
206: for (int i = 0; i < VALUES_ARRAY.length; ++i) {
207: OperationType result = VALUES_ARRAY[i];
208: if (result.toString().equals(literal)) {
209: return result;
210: }
211: }
212: return null;
213: }
214:
215: /**
216: * Returns the '<em><b>Operation Type</b></em>' literal with the specified name.
217: * <!-- begin-user-doc -->
218: * <!-- end-user-doc -->
219: * @generated
220: */
221: public static OperationType getByName(String name) {
222: for (int i = 0; i < VALUES_ARRAY.length; ++i) {
223: OperationType result = VALUES_ARRAY[i];
224: if (result.getName().equals(name)) {
225: return result;
226: }
227: }
228: return null;
229: }
230:
231: /**
232: * Returns the '<em><b>Operation Type</b></em>' literal with the specified integer value.
233: * <!-- begin-user-doc -->
234: * <!-- end-user-doc -->
235: * @generated
236: */
237: public static OperationType get(int value) {
238: switch (value) {
239: case INSERT:
240: return INSERT_LITERAL;
241: case UPDATE:
242: return UPDATE_LITERAL;
243: case DELETE:
244: return DELETE_LITERAL;
245: case QUERY:
246: return QUERY_LITERAL;
247: case LOCK:
248: return LOCK_LITERAL;
249: case GET_GML_OBJECT:
250: return GET_GML_OBJECT_LITERAL;
251: }
252: return null;
253: }
254:
255: /**
256: * Only this class can construct instances.
257: * <!-- begin-user-doc -->
258: * <!-- end-user-doc -->
259: * @generated
260: */
261: private OperationType(int value, String name, String literal) {
262: super (value, name, literal);
263: }
264:
265: } //OperationType
|