001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: ResultTypeType.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>Result Type Type</b></em>',
017: * and utility methods for working with them.
018: * <!-- end-user-doc -->
019: * @see net.opengis.wfs.WfsPackage#getResultTypeType()
020: * @model
021: * @generated
022: */
023: public final class ResultTypeType extends AbstractEnumerator {
024: /**
025: * The '<em><b>Results</b></em>' literal value.
026: * <!-- begin-user-doc -->
027: * <!-- end-user-doc -->
028: * <!-- begin-model-doc -->
029: *
030: * Indicates that a complete response should be generated
031: * by the WFS. That is, all response feature instances
032: * should be returned to the client.
033: * <!-- end-model-doc -->
034: * @see #RESULTS_LITERAL
035: * @model name="results"
036: * @generated
037: * @ordered
038: */
039: public static final int RESULTS = 0;
040:
041: /**
042: * The '<em><b>Hits</b></em>' literal value.
043: * <!-- begin-user-doc -->
044: * <!-- end-user-doc -->
045: * <!-- begin-model-doc -->
046: *
047: * Indicates that an empty response should be generated with
048: * the "numberOfFeatures" attribute set (i.e. no feature
049: * instances should be returned). In this manner a client may
050: * determine the number of feature instances that a GetFeature
051: * request will return without having to actually get the
052: * entire result set back.
053: * <!-- end-model-doc -->
054: * @see #HITS_LITERAL
055: * @model name="hits"
056: * @generated
057: * @ordered
058: */
059: public static final int HITS = 1;
060:
061: /**
062: * The '<em><b>Results</b></em>' literal object.
063: * <!-- begin-user-doc -->
064: * <!-- end-user-doc -->
065: * @see #RESULTS
066: * @generated
067: * @ordered
068: */
069: public static final ResultTypeType RESULTS_LITERAL = new ResultTypeType(
070: RESULTS, "results", "results");
071:
072: /**
073: * The '<em><b>Hits</b></em>' literal object.
074: * <!-- begin-user-doc -->
075: * <!-- end-user-doc -->
076: * @see #HITS
077: * @generated
078: * @ordered
079: */
080: public static final ResultTypeType HITS_LITERAL = new ResultTypeType(
081: HITS, "hits", "hits");
082:
083: /**
084: * An array of all the '<em><b>Result Type Type</b></em>' enumerators.
085: * <!-- begin-user-doc -->
086: * <!-- end-user-doc -->
087: * @generated
088: */
089: private static final ResultTypeType[] VALUES_ARRAY = new ResultTypeType[] {
090: RESULTS_LITERAL, HITS_LITERAL, };
091:
092: /**
093: * A public read-only list of all the '<em><b>Result Type Type</b></em>' enumerators.
094: * <!-- begin-user-doc -->
095: * <!-- end-user-doc -->
096: * @generated
097: */
098: public static final List VALUES = Collections
099: .unmodifiableList(Arrays.asList(VALUES_ARRAY));
100:
101: /**
102: * Returns the '<em><b>Result Type Type</b></em>' literal with the specified literal value.
103: * <!-- begin-user-doc -->
104: * <!-- end-user-doc -->
105: * @generated
106: */
107: public static ResultTypeType get(String literal) {
108: for (int i = 0; i < VALUES_ARRAY.length; ++i) {
109: ResultTypeType result = VALUES_ARRAY[i];
110: if (result.toString().equals(literal)) {
111: return result;
112: }
113: }
114: return null;
115: }
116:
117: /**
118: * Returns the '<em><b>Result Type Type</b></em>' literal with the specified name.
119: * <!-- begin-user-doc -->
120: * <!-- end-user-doc -->
121: * @generated
122: */
123: public static ResultTypeType getByName(String name) {
124: for (int i = 0; i < VALUES_ARRAY.length; ++i) {
125: ResultTypeType result = VALUES_ARRAY[i];
126: if (result.getName().equals(name)) {
127: return result;
128: }
129: }
130: return null;
131: }
132:
133: /**
134: * Returns the '<em><b>Result Type Type</b></em>' literal with the specified integer value.
135: * <!-- begin-user-doc -->
136: * <!-- end-user-doc -->
137: * @generated
138: */
139: public static ResultTypeType get(int value) {
140: switch (value) {
141: case RESULTS:
142: return RESULTS_LITERAL;
143: case HITS:
144: return HITS_LITERAL;
145: }
146: return null;
147: }
148:
149: /**
150: * Only this class can construct instances.
151: * <!-- begin-user-doc -->
152: * <!-- end-user-doc -->
153: * @generated
154: */
155: private ResultTypeType(int value, String name, String literal) {
156: super (value, name, literal);
157: }
158:
159: } //ResultTypeType
|