| /******************************************************************************* |
| * Copyright (c) 2016 David Carlson and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * David Carlson (Clinical Cloud Solutions, LLC) - initial API and implementation |
| *******************************************************************************/ |
| /** |
| */ |
| package org.eclipse.mdht.uml.fhir.core.valueset; |
| |
| import java.util.Arrays; |
| import java.util.Collections; |
| import java.util.List; |
| |
| import org.eclipse.emf.common.util.Enumerator; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * A representation of the literals of the enumeration '<em><b>List Order Codes</b></em>', |
| * and utility methods for working with them. |
| * <!-- end-user-doc --> |
| * @see org.eclipse.mdht.uml.fhir.core.valueset.FhirValuesetPackage#getListOrderCodes() |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='List Order Codes'" |
| * @generated |
| */ |
| public enum ListOrderCodes implements Enumerator { |
| /** |
| * The '<em><b>User</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #USER_VALUE |
| * @generated |
| * @ordered |
| */ |
| USER(0, "user", "user"), |
| |
| /** |
| * The '<em><b>System</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #SYSTEM_VALUE |
| * @generated |
| * @ordered |
| */ |
| SYSTEM(1, "system", "system"), |
| |
| /** |
| * The '<em><b>Eventdate</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #EVENTDATE_VALUE |
| * @generated |
| * @ordered |
| */ |
| EVENTDATE(2, "eventdate", "eventdate"), |
| |
| /** |
| * The '<em><b>Entrydate</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #ENTRYDATE_VALUE |
| * @generated |
| * @ordered |
| */ |
| ENTRYDATE(3, "entrydate", "entrydate"), |
| |
| /** |
| * The '<em><b>Priority</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #PRIORITY_VALUE |
| * @generated |
| * @ordered |
| */ |
| PRIORITY(4, "priority", "priority"), |
| |
| /** |
| * The '<em><b>Alphabetic</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #ALPHABETIC_VALUE |
| * @generated |
| * @ordered |
| */ |
| ALPHABETIC(5, "alphabetic", "alphabetic"), |
| |
| /** |
| * The '<em><b>Category</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #CATEGORY_VALUE |
| * @generated |
| * @ordered |
| */ |
| CATEGORY(6, "category", "category"), |
| |
| /** |
| * The '<em><b>Patient</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #PATIENT_VALUE |
| * @generated |
| * @ordered |
| */ |
| PATIENT(7, "patient", "patient"); |
| |
| /** |
| * The '<em><b>User</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>User</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #USER |
| * @model name="user" |
| * @generated |
| * @ordered |
| */ |
| public static final int USER_VALUE = 0; |
| |
| /** |
| * The '<em><b>System</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>System</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #SYSTEM |
| * @model name="system" |
| * @generated |
| * @ordered |
| */ |
| public static final int SYSTEM_VALUE = 1; |
| |
| /** |
| * The '<em><b>Eventdate</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Eventdate</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #EVENTDATE |
| * @model name="eventdate" |
| * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='event-date'" |
| * @generated |
| * @ordered |
| */ |
| public static final int EVENTDATE_VALUE = 2; |
| |
| /** |
| * The '<em><b>Entrydate</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Entrydate</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #ENTRYDATE |
| * @model name="entrydate" |
| * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='entry-date'" |
| * @generated |
| * @ordered |
| */ |
| public static final int ENTRYDATE_VALUE = 3; |
| |
| /** |
| * The '<em><b>Priority</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Priority</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #PRIORITY |
| * @model name="priority" |
| * @generated |
| * @ordered |
| */ |
| public static final int PRIORITY_VALUE = 4; |
| |
| /** |
| * The '<em><b>Alphabetic</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Alphabetic</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #ALPHABETIC |
| * @model name="alphabetic" |
| * @generated |
| * @ordered |
| */ |
| public static final int ALPHABETIC_VALUE = 5; |
| |
| /** |
| * The '<em><b>Category</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Category</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #CATEGORY |
| * @model name="category" |
| * @generated |
| * @ordered |
| */ |
| public static final int CATEGORY_VALUE = 6; |
| |
| /** |
| * The '<em><b>Patient</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Patient</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #PATIENT |
| * @model name="patient" |
| * @generated |
| * @ordered |
| */ |
| public static final int PATIENT_VALUE = 7; |
| |
| /** |
| * An array of all the '<em><b>List Order Codes</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private static final ListOrderCodes[] VALUES_ARRAY = |
| new ListOrderCodes[] { |
| USER, |
| SYSTEM, |
| EVENTDATE, |
| ENTRYDATE, |
| PRIORITY, |
| ALPHABETIC, |
| CATEGORY, |
| PATIENT, |
| }; |
| |
| /** |
| * A public read-only list of all the '<em><b>List Order Codes</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static final List<ListOrderCodes> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
| |
| /** |
| * Returns the '<em><b>List Order Codes</b></em>' literal with the specified literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param literal the literal. |
| * @return the matching enumerator or <code>null</code>. |
| * @generated |
| */ |
| public static ListOrderCodes get(String literal) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| ListOrderCodes result = VALUES_ARRAY[i]; |
| if (result.toString().equals(literal)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>List Order Codes</b></em>' literal with the specified name. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param name the name. |
| * @return the matching enumerator or <code>null</code>. |
| * @generated |
| */ |
| public static ListOrderCodes getByName(String name) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| ListOrderCodes result = VALUES_ARRAY[i]; |
| if (result.getName().equals(name)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>List Order Codes</b></em>' literal with the specified integer value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param value the integer value. |
| * @return the matching enumerator or <code>null</code>. |
| * @generated |
| */ |
| public static ListOrderCodes get(int value) { |
| switch (value) { |
| case USER_VALUE: return USER; |
| case SYSTEM_VALUE: return SYSTEM; |
| case EVENTDATE_VALUE: return EVENTDATE; |
| case ENTRYDATE_VALUE: return ENTRYDATE; |
| case PRIORITY_VALUE: return PRIORITY; |
| case ALPHABETIC_VALUE: return ALPHABETIC; |
| case CATEGORY_VALUE: return CATEGORY; |
| case PATIENT_VALUE: return PATIENT; |
| } |
| 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 ListOrderCodes(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; |
| } |
| |
| } //ListOrderCodes |