/** * * * * $Id$ */ package net.opengis.wfs; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.eclipse.emf.common.util.AbstractEnumerator; /** * * A representation of the literals of the enumeration 'Identifier Generation Option Type', * and utility methods for working with them. * * @see net.opengis.wfs.WfsPackage#getIdentifierGenerationOptionType() * @model * @generated */ public final class IdentifierGenerationOptionType extends AbstractEnumerator { /** * The 'Use Existing' literal value. * * * * * The UseExsiting value indicates that WFS should not * generate a new feature identifier for the feature * being inserted into the repositry. Instead, the WFS * should use the identifier encoded if the feature. * If a duplicate exists then the WFS should raise an * exception. * * @see #USE_EXISTING_LITERAL * @model name="UseExisting" * @generated * @ordered */ public static final int USE_EXISTING = 0; /** * The 'Replace Duplicate' literal value. * * * * * The ReplaceDuplicate value indicates that WFS should * not generate a new feature identifier for the feature * being inserted into the repositry. Instead, the WFS * should use the identifier encoded if the feature. * If a duplicate exists then the WFS should replace the * existing feature instance with the one encoded in the * Insert action. * * @see #REPLACE_DUPLICATE_LITERAL * @model name="ReplaceDuplicate" * @generated * @ordered */ public static final int REPLACE_DUPLICATE = 1; /** * The 'Generate New' literal value. * * * * * The GenerateNew value indicates that WFS should * generate a new unique feature identifier for the * feature being inserted into the repositry. * * @see #GENERATE_NEW_LITERAL * @model name="GenerateNew" * @generated * @ordered */ public static final int GENERATE_NEW = 2; /** * The 'Use Existing' literal object. * * * @see #USE_EXISTING * @generated * @ordered */ public static final IdentifierGenerationOptionType USE_EXISTING_LITERAL = new IdentifierGenerationOptionType(USE_EXISTING, "UseExisting", "UseExisting"); /** * The 'Replace Duplicate' literal object. * * * @see #REPLACE_DUPLICATE * @generated * @ordered */ public static final IdentifierGenerationOptionType REPLACE_DUPLICATE_LITERAL = new IdentifierGenerationOptionType(REPLACE_DUPLICATE, "ReplaceDuplicate", "ReplaceDuplicate"); /** * The 'Generate New' literal object. * * * @see #GENERATE_NEW * @generated * @ordered */ public static final IdentifierGenerationOptionType GENERATE_NEW_LITERAL = new IdentifierGenerationOptionType(GENERATE_NEW, "GenerateNew", "GenerateNew"); /** * An array of all the 'Identifier Generation Option Type' enumerators. * * * @generated */ private static final IdentifierGenerationOptionType[] VALUES_ARRAY = new IdentifierGenerationOptionType[] { USE_EXISTING_LITERAL, REPLACE_DUPLICATE_LITERAL, GENERATE_NEW_LITERAL, }; /** * A public read-only list of all the 'Identifier Generation Option Type' enumerators. * * * @generated */ public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the 'Identifier Generation Option Type' literal with the specified literal value. * * * @generated */ public static IdentifierGenerationOptionType get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { IdentifierGenerationOptionType result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the 'Identifier Generation Option Type' literal with the specified name. * * * @generated */ public static IdentifierGenerationOptionType getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { IdentifierGenerationOptionType result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the 'Identifier Generation Option Type' literal with the specified integer value. * * * @generated */ public static IdentifierGenerationOptionType get(int value) { switch (value) { case USE_EXISTING: return USE_EXISTING_LITERAL; case REPLACE_DUPLICATE: return REPLACE_DUPLICATE_LITERAL; case GENERATE_NEW: return GENERATE_NEW_LITERAL; } return null; } /** * Only this class can construct instances. * * * @generated */ private IdentifierGenerationOptionType(int value, String name, String literal) { super(value, name, literal); } } //IdentifierGenerationOptionType