| /******************************************************************************* |
| * 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>Bundle Type</b></em>', |
| * and utility methods for working with them. |
| * <!-- end-user-doc --> |
| * @see org.eclipse.mdht.uml.fhir.core.valueset.FhirValuesetPackage#getBundleType() |
| * @model |
| * @generated |
| */ |
| public enum BundleType implements Enumerator { |
| /** |
| * The '<em><b>Document</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #DOCUMENT_VALUE |
| * @generated |
| * @ordered |
| */ |
| DOCUMENT(0, "document", "document"), |
| |
| /** |
| * The '<em><b>Message</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #MESSAGE_VALUE |
| * @generated |
| * @ordered |
| */ |
| MESSAGE(1, "message", "message"), |
| |
| /** |
| * The '<em><b>Transaction</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #TRANSACTION_VALUE |
| * @generated |
| * @ordered |
| */ |
| TRANSACTION(2, "transaction", "transaction"), |
| |
| /** |
| * The '<em><b>Transactionresponse</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #TRANSACTIONRESPONSE_VALUE |
| * @generated |
| * @ordered |
| */ |
| TRANSACTIONRESPONSE(3, "transactionresponse", "transactionresponse"), |
| |
| /** |
| * The '<em><b>Batch</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #BATCH_VALUE |
| * @generated |
| * @ordered |
| */ |
| BATCH(4, "batch", "batch"), |
| |
| /** |
| * The '<em><b>Batchresponse</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #BATCHRESPONSE_VALUE |
| * @generated |
| * @ordered |
| */ |
| BATCHRESPONSE(5, "batchresponse", "batchresponse"), |
| |
| /** |
| * The '<em><b>History</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #HISTORY_VALUE |
| * @generated |
| * @ordered |
| */ |
| HISTORY(6, "history", "history"), |
| |
| /** |
| * The '<em><b>Searchset</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #SEARCHSET_VALUE |
| * @generated |
| * @ordered |
| */ |
| SEARCHSET(7, "searchset", "searchset"), |
| |
| /** |
| * The '<em><b>Collection</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #COLLECTION_VALUE |
| * @generated |
| * @ordered |
| */ |
| COLLECTION(8, "collection", "collection"); |
| |
| /** |
| * The '<em><b>Document</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Document</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #DOCUMENT |
| * @model name="document" |
| * @generated |
| * @ordered |
| */ |
| public static final int DOCUMENT_VALUE = 0; |
| |
| /** |
| * The '<em><b>Message</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Message</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #MESSAGE |
| * @model name="message" |
| * @generated |
| * @ordered |
| */ |
| public static final int MESSAGE_VALUE = 1; |
| |
| /** |
| * The '<em><b>Transaction</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Transaction</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #TRANSACTION |
| * @model name="transaction" |
| * @generated |
| * @ordered |
| */ |
| public static final int TRANSACTION_VALUE = 2; |
| |
| /** |
| * The '<em><b>Transactionresponse</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Transactionresponse</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #TRANSACTIONRESPONSE |
| * @model name="transactionresponse" |
| * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='transaction-response'" |
| * @generated |
| * @ordered |
| */ |
| public static final int TRANSACTIONRESPONSE_VALUE = 3; |
| |
| /** |
| * The '<em><b>Batch</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Batch</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #BATCH |
| * @model name="batch" |
| * @generated |
| * @ordered |
| */ |
| public static final int BATCH_VALUE = 4; |
| |
| /** |
| * The '<em><b>Batchresponse</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Batchresponse</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #BATCHRESPONSE |
| * @model name="batchresponse" |
| * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='batch-response'" |
| * @generated |
| * @ordered |
| */ |
| public static final int BATCHRESPONSE_VALUE = 5; |
| |
| /** |
| * The '<em><b>History</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>History</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #HISTORY |
| * @model name="history" |
| * @generated |
| * @ordered |
| */ |
| public static final int HISTORY_VALUE = 6; |
| |
| /** |
| * The '<em><b>Searchset</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Searchset</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #SEARCHSET |
| * @model name="searchset" |
| * @generated |
| * @ordered |
| */ |
| public static final int SEARCHSET_VALUE = 7; |
| |
| /** |
| * The '<em><b>Collection</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Collection</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #COLLECTION |
| * @model name="collection" |
| * @generated |
| * @ordered |
| */ |
| public static final int COLLECTION_VALUE = 8; |
| |
| /** |
| * An array of all the '<em><b>Bundle Type</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private static final BundleType[] VALUES_ARRAY = |
| new BundleType[] { |
| DOCUMENT, |
| MESSAGE, |
| TRANSACTION, |
| TRANSACTIONRESPONSE, |
| BATCH, |
| BATCHRESPONSE, |
| HISTORY, |
| SEARCHSET, |
| COLLECTION, |
| }; |
| |
| /** |
| * A public read-only list of all the '<em><b>Bundle Type</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static final List<BundleType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
| |
| /** |
| * Returns the '<em><b>Bundle Type</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 BundleType get(String literal) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| BundleType result = VALUES_ARRAY[i]; |
| if (result.toString().equals(literal)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Bundle Type</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 BundleType getByName(String name) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| BundleType result = VALUES_ARRAY[i]; |
| if (result.getName().equals(name)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Bundle Type</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 BundleType get(int value) { |
| switch (value) { |
| case DOCUMENT_VALUE: return DOCUMENT; |
| case MESSAGE_VALUE: return MESSAGE; |
| case TRANSACTION_VALUE: return TRANSACTION; |
| case TRANSACTIONRESPONSE_VALUE: return TRANSACTIONRESPONSE; |
| case BATCH_VALUE: return BATCH; |
| case BATCHRESPONSE_VALUE: return BATCHRESPONSE; |
| case HISTORY_VALUE: return HISTORY; |
| case SEARCHSET_VALUE: return SEARCHSET; |
| case COLLECTION_VALUE: return COLLECTION; |
| } |
| 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 BundleType(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; |
| } |
| |
| } //BundleType |