/** * <copyright> * </copyright> * * $Id$ */ package com.openMap1.mapper; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.eclipse.emf.common.util.Enumerator; import com.openMap1.mapper.MultiWay; /** * <!-- begin-user-doc --> * A representation of the literals of the enumeration '<em><b>Multi Way</b></em>', * and utility methods for working with them. * * Property mappings and association mappings can be multiway * when there is more than one such mapping for a given property * (or association), class and subset. * * In these cases there is either a choice of ways to in which the XML determines the property/ * association (multiway = 'choice'); the reader has to look for one or the other * or the property/association is determined redundantly * (multiway = 'redundant') - the reader can use either. * * When there is only one mapping for the property+ class+ subset (or association) * multiway = 'none' * <!-- end-user-doc --> * @see com.openMap1.mapper.MapperPackage#getMultiWay() * @model * @generated */ public enum MultiWay implements Enumerator { /** * The '<em><b>NONE</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #NONE_VALUE * @generated * @ordered */ NONE(0, "NONE", "none"), /** * The '<em><b>REDUNDANT</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #REDUNDANT_VALUE * @generated * @ordered */ REDUNDANT(1, "REDUNDANT", "redundant"), /** * The '<em><b>CHOICE</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #CHOICE_VALUE * @generated * @ordered */ CHOICE(2, "CHOICE", "choice"); /** * The '<em><b>NONE</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>NONE</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #NONE * @model literal="none" * @generated * @ordered */ public static final int NONE_VALUE = 0; /** * The '<em><b>REDUNDANT</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>REDUNDANT</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #REDUNDANT * @model literal="redundant" * @generated * @ordered */ public static final int REDUNDANT_VALUE = 1; /** * The '<em><b>CHOICE</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>CHOICE</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #CHOICE * @model literal="choice" * @generated * @ordered */ public static final int CHOICE_VALUE = 2; /** * An array of all the '<em><b>Multi Way</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private static final MultiWay[] VALUES_ARRAY = new MultiWay[] { NONE, REDUNDANT, CHOICE, }; /** * A public read-only list of all the '<em><b>Multi Way</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static final List<MultiWay> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the '<em><b>Multi Way</b></em>' literal with the specified literal value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static MultiWay get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { MultiWay result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the '<em><b>Multi Way</b></em>' literal with the specified name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static MultiWay getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { MultiWay result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the '<em><b>Multi Way</b></em>' literal with the specified integer value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static MultiWay get(int value) { switch (value) { case NONE_VALUE: return NONE; case REDUNDANT_VALUE: return REDUNDANT; case CHOICE_VALUE: return CHOICE; } return null; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private final int value; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private final String name; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private final String literal; /** * Only this class can construct instances. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private MultiWay(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public int getValue() { return value; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getName() { return name; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getLiteral() { return literal; } /** * Returns the literal value of the enumerator, which is its string representation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { return literal; } } //MultiWay