001 002package ca.uhn.fhir.model.dstu2.valueset; 003 004import ca.uhn.fhir.model.api.*; 005import java.util.HashMap; 006import java.util.Map; 007 008public enum TextureModifierCodesEnum { 009 010 /** 011 * Code Value: <b>228053002</b> 012 */ 013 _228053002("228053002", "http://snomed.info/sct"), 014 015 /** 016 * Code Value: <b>439091000124107</b> 017 */ 018 _439091000124107("439091000124107", "http://snomed.info/sct"), 019 020 /** 021 * Code Value: <b>228049004</b> 022 */ 023 _228049004("228049004", "http://snomed.info/sct"), 024 025 /** 026 * Code Value: <b>441881000124103</b> 027 */ 028 _441881000124103("441881000124103", "http://snomed.info/sct"), 029 030 /** 031 * Code Value: <b>441761000124103</b> 032 */ 033 _441761000124103("441761000124103", "http://snomed.info/sct"), 034 035 /** 036 * Code Value: <b>441751000124100</b> 037 */ 038 _441751000124100("441751000124100", "http://snomed.info/sct"), 039 040 /** 041 * Code Value: <b>228059003</b> 042 */ 043 _228059003("228059003", "http://snomed.info/sct"), 044 045 /** 046 * Code Value: <b>441791000124106</b> 047 */ 048 _441791000124106("441791000124106", "http://snomed.info/sct"), 049 050 /** 051 * Code Value: <b>228055009</b> 052 */ 053 _228055009("228055009", "http://snomed.info/sct"), 054 055 /** 056 * Code Value: <b>228056005</b> 057 */ 058 _228056005("228056005", "http://snomed.info/sct"), 059 060 /** 061 * Code Value: <b>441771000124105</b> 062 */ 063 _441771000124105("441771000124105", "http://snomed.info/sct"), 064 065 /** 066 * Code Value: <b>228057001</b> 067 */ 068 _228057001("228057001", "http://snomed.info/sct"), 069 070 /** 071 * Code Value: <b>228058006</b> 072 */ 073 _228058006("228058006", "http://snomed.info/sct"), 074 075 /** 076 * Code Value: <b>228060008</b> 077 */ 078 _228060008("228060008", "http://snomed.info/sct"), 079 080 ; 081 082 /** 083 * Identifier for this Value Set: 084 * 085 */ 086 public static final String VALUESET_IDENTIFIER = ""; 087 088 /** 089 * Name for this Value Set: 090 * Texture Modifier Codes 091 */ 092 public static final String VALUESET_NAME = "Texture Modifier Codes"; 093 094 private static Map<String, TextureModifierCodesEnum> CODE_TO_ENUM = new HashMap<String, TextureModifierCodesEnum>(); 095 private static Map<String, Map<String, TextureModifierCodesEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, TextureModifierCodesEnum>>(); 096 097 private final String myCode; 098 private final String mySystem; 099 100 static { 101 for (TextureModifierCodesEnum next : TextureModifierCodesEnum.values()) { 102 CODE_TO_ENUM.put(next.getCode(), next); 103 104 if (!SYSTEM_TO_CODE_TO_ENUM.containsKey(next.getSystem())) { 105 SYSTEM_TO_CODE_TO_ENUM.put(next.getSystem(), new HashMap<String, TextureModifierCodesEnum>()); 106 } 107 SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next); 108 } 109 } 110 111 /** 112 * Returns the code associated with this enumerated value 113 */ 114 public String getCode() { 115 return myCode; 116 } 117 118 /** 119 * Returns the code system associated with this enumerated value 120 */ 121 public String getSystem() { 122 return mySystem; 123 } 124 125 /** 126 * Returns the enumerated value associated with this code 127 */ 128 public static TextureModifierCodesEnum forCode(String theCode) { 129 TextureModifierCodesEnum retVal = CODE_TO_ENUM.get(theCode); 130 return retVal; 131 } 132 133 /** 134 * Converts codes to their respective enumerated values 135 */ 136 public static final IValueSetEnumBinder<TextureModifierCodesEnum> VALUESET_BINDER = new IValueSetEnumBinder<TextureModifierCodesEnum>() { 137 @Override 138 public String toCodeString(TextureModifierCodesEnum theEnum) { 139 return theEnum.getCode(); 140 } 141 142 @Override 143 public String toSystemString(TextureModifierCodesEnum theEnum) { 144 return theEnum.getSystem(); 145 } 146 147 @Override 148 public TextureModifierCodesEnum fromCodeString(String theCodeString) { 149 return CODE_TO_ENUM.get(theCodeString); 150 } 151 152 @Override 153 public TextureModifierCodesEnum fromCodeString(String theCodeString, String theSystemString) { 154 Map<String, TextureModifierCodesEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString); 155 if (map == null) { 156 return null; 157 } 158 return map.get(theCodeString); 159 } 160 161 }; 162 163 /** 164 * Constructor 165 */ 166 TextureModifierCodesEnum(String theCode, String theSystem) { 167 myCode = theCode; 168 mySystem = theSystem; 169 } 170 171 172}