| /******************************************************************************* |
| * 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>Concept Map Equivalence</b></em>', |
| * and utility methods for working with them. |
| * <!-- end-user-doc --> |
| * @see org.eclipse.mdht.uml.fhir.core.valueset.FhirValuesetPackage#getConceptMapEquivalence() |
| * @model |
| * @generated |
| */ |
| public enum ConceptMapEquivalence implements Enumerator { |
| /** |
| * The '<em><b>Equivalent</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #EQUIVALENT_VALUE |
| * @generated |
| * @ordered |
| */ |
| EQUIVALENT(0, "equivalent", "equivalent"), |
| |
| /** |
| * The '<em><b>Wider</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #WIDER_VALUE |
| * @generated |
| * @ordered |
| */ |
| WIDER(1, "wider", "wider"), |
| |
| /** |
| * The '<em><b>Subsumes</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #SUBSUMES_VALUE |
| * @generated |
| * @ordered |
| */ |
| SUBSUMES(2, "subsumes", "subsumes"), |
| |
| /** |
| * The '<em><b>Narrower</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #NARROWER_VALUE |
| * @generated |
| * @ordered |
| */ |
| NARROWER(3, "narrower", "narrower"), |
| |
| /** |
| * The '<em><b>Specializes</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #SPECIALIZES_VALUE |
| * @generated |
| * @ordered |
| */ |
| SPECIALIZES(4, "specializes", "specializes"), |
| |
| /** |
| * The '<em><b>Inexact</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #INEXACT_VALUE |
| * @generated |
| * @ordered |
| */ |
| INEXACT(5, "inexact", "inexact"), |
| |
| /** |
| * The '<em><b>Unmatched</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #UNMATCHED_VALUE |
| * @generated |
| * @ordered |
| */ |
| UNMATCHED(6, "unmatched", "unmatched"); |
| |
| /** |
| * The '<em><b>Equivalent</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Equivalent</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #EQUIVALENT |
| * @model name="equivalent" |
| * @generated |
| * @ordered |
| */ |
| public static final int EQUIVALENT_VALUE = 0; |
| |
| /** |
| * The '<em><b>Wider</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Wider</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #WIDER |
| * @model name="wider" |
| * @generated |
| * @ordered |
| */ |
| public static final int WIDER_VALUE = 1; |
| |
| /** |
| * The '<em><b>Subsumes</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Subsumes</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #SUBSUMES |
| * @model name="subsumes" |
| * @generated |
| * @ordered |
| */ |
| public static final int SUBSUMES_VALUE = 2; |
| |
| /** |
| * The '<em><b>Narrower</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Narrower</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #NARROWER |
| * @model name="narrower" |
| * @generated |
| * @ordered |
| */ |
| public static final int NARROWER_VALUE = 3; |
| |
| /** |
| * The '<em><b>Specializes</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Specializes</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #SPECIALIZES |
| * @model name="specializes" |
| * @generated |
| * @ordered |
| */ |
| public static final int SPECIALIZES_VALUE = 4; |
| |
| /** |
| * The '<em><b>Inexact</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Inexact</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #INEXACT |
| * @model name="inexact" |
| * @generated |
| * @ordered |
| */ |
| public static final int INEXACT_VALUE = 5; |
| |
| /** |
| * The '<em><b>Unmatched</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Unmatched</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #UNMATCHED |
| * @model name="unmatched" |
| * @generated |
| * @ordered |
| */ |
| public static final int UNMATCHED_VALUE = 6; |
| |
| /** |
| * An array of all the '<em><b>Concept Map Equivalence</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private static final ConceptMapEquivalence[] VALUES_ARRAY = |
| new ConceptMapEquivalence[] { |
| EQUIVALENT, |
| WIDER, |
| SUBSUMES, |
| NARROWER, |
| SPECIALIZES, |
| INEXACT, |
| UNMATCHED, |
| }; |
| |
| /** |
| * A public read-only list of all the '<em><b>Concept Map Equivalence</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static final List<ConceptMapEquivalence> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
| |
| /** |
| * Returns the '<em><b>Concept Map Equivalence</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 ConceptMapEquivalence get(String literal) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| ConceptMapEquivalence result = VALUES_ARRAY[i]; |
| if (result.toString().equals(literal)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Concept Map Equivalence</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 ConceptMapEquivalence getByName(String name) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| ConceptMapEquivalence result = VALUES_ARRAY[i]; |
| if (result.getName().equals(name)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Concept Map Equivalence</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 ConceptMapEquivalence get(int value) { |
| switch (value) { |
| case EQUIVALENT_VALUE: return EQUIVALENT; |
| case WIDER_VALUE: return WIDER; |
| case SUBSUMES_VALUE: return SUBSUMES; |
| case NARROWER_VALUE: return NARROWER; |
| case SPECIALIZES_VALUE: return SPECIALIZES; |
| case INEXACT_VALUE: return INEXACT; |
| case UNMATCHED_VALUE: return UNMATCHED; |
| } |
| 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 ConceptMapEquivalence(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; |
| } |
| |
| } //ConceptMapEquivalence |