001package org.hl7.fhir.r4.model.codesystems; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0 033 034 035import org.hl7.fhir.r4.model.EnumFactory; 036 037public class V3Hl7RealmEnumFactory implements EnumFactory<V3Hl7Realm> { 038 039 public V3Hl7Realm fromCode(String codeString) throws IllegalArgumentException { 040 if (codeString == null || "".equals(codeString)) 041 return null; 042 if ("BindingRealms".equals(codeString)) 043 return V3Hl7Realm.BINDINGREALMS; 044 if ("AffiliateRealms".equals(codeString)) 045 return V3Hl7Realm.AFFILIATEREALMS; 046 if ("AR".equals(codeString)) 047 return V3Hl7Realm.AR; 048 if ("AT".equals(codeString)) 049 return V3Hl7Realm.AT; 050 if ("AU".equals(codeString)) 051 return V3Hl7Realm.AU; 052 if ("BR".equals(codeString)) 053 return V3Hl7Realm.BR; 054 if ("CA".equals(codeString)) 055 return V3Hl7Realm.CA; 056 if ("CH".equals(codeString)) 057 return V3Hl7Realm.CH; 058 if ("CL".equals(codeString)) 059 return V3Hl7Realm.CL; 060 if ("CN".equals(codeString)) 061 return V3Hl7Realm.CN; 062 if ("CO".equals(codeString)) 063 return V3Hl7Realm.CO; 064 if ("CZ".equals(codeString)) 065 return V3Hl7Realm.CZ; 066 if ("DE".equals(codeString)) 067 return V3Hl7Realm.DE; 068 if ("DK".equals(codeString)) 069 return V3Hl7Realm.DK; 070 if ("ES".equals(codeString)) 071 return V3Hl7Realm.ES; 072 if ("FI".equals(codeString)) 073 return V3Hl7Realm.FI; 074 if ("FR".equals(codeString)) 075 return V3Hl7Realm.FR; 076 if ("GR".equals(codeString)) 077 return V3Hl7Realm.GR; 078 if ("HR".equals(codeString)) 079 return V3Hl7Realm.HR; 080 if ("IE".equals(codeString)) 081 return V3Hl7Realm.IE; 082 if ("IN".equals(codeString)) 083 return V3Hl7Realm.IN; 084 if ("IT".equals(codeString)) 085 return V3Hl7Realm.IT; 086 if ("JP".equals(codeString)) 087 return V3Hl7Realm.JP; 088 if ("KR".equals(codeString)) 089 return V3Hl7Realm.KR; 090 if ("LT".equals(codeString)) 091 return V3Hl7Realm.LT; 092 if ("MX".equals(codeString)) 093 return V3Hl7Realm.MX; 094 if ("NL".equals(codeString)) 095 return V3Hl7Realm.NL; 096 if ("NZ".equals(codeString)) 097 return V3Hl7Realm.NZ; 098 if ("RO".equals(codeString)) 099 return V3Hl7Realm.RO; 100 if ("RU".equals(codeString)) 101 return V3Hl7Realm.RU; 102 if ("SE".equals(codeString)) 103 return V3Hl7Realm.SE; 104 if ("SG".equals(codeString)) 105 return V3Hl7Realm.SG; 106 if ("SOA".equals(codeString)) 107 return V3Hl7Realm.SOA; 108 if ("TR".equals(codeString)) 109 return V3Hl7Realm.TR; 110 if ("TW".equals(codeString)) 111 return V3Hl7Realm.TW; 112 if ("UK".equals(codeString)) 113 return V3Hl7Realm.UK; 114 if ("US".equals(codeString)) 115 return V3Hl7Realm.US; 116 if ("UV".equals(codeString)) 117 return V3Hl7Realm.UV; 118 if ("UY".equals(codeString)) 119 return V3Hl7Realm.UY; 120 if ("C1".equals(codeString)) 121 return V3Hl7Realm.C1; 122 if ("GB".equals(codeString)) 123 return V3Hl7Realm.GB; 124 if ("R1".equals(codeString)) 125 return V3Hl7Realm.R1; 126 if ("X1".equals(codeString)) 127 return V3Hl7Realm.X1; 128 if ("NamespaceRealms".equals(codeString)) 129 return V3Hl7Realm.NAMESPACEREALMS; 130 if ("ZZ".equals(codeString)) 131 return V3Hl7Realm.ZZ; 132 throw new IllegalArgumentException("Unknown V3Hl7Realm code '"+codeString+"'"); 133 } 134 135 public String toCode(V3Hl7Realm code) { 136 if (code == V3Hl7Realm.BINDINGREALMS) 137 return "BindingRealms"; 138 if (code == V3Hl7Realm.AFFILIATEREALMS) 139 return "AffiliateRealms"; 140 if (code == V3Hl7Realm.AR) 141 return "AR"; 142 if (code == V3Hl7Realm.AT) 143 return "AT"; 144 if (code == V3Hl7Realm.AU) 145 return "AU"; 146 if (code == V3Hl7Realm.BR) 147 return "BR"; 148 if (code == V3Hl7Realm.CA) 149 return "CA"; 150 if (code == V3Hl7Realm.CH) 151 return "CH"; 152 if (code == V3Hl7Realm.CL) 153 return "CL"; 154 if (code == V3Hl7Realm.CN) 155 return "CN"; 156 if (code == V3Hl7Realm.CO) 157 return "CO"; 158 if (code == V3Hl7Realm.CZ) 159 return "CZ"; 160 if (code == V3Hl7Realm.DE) 161 return "DE"; 162 if (code == V3Hl7Realm.DK) 163 return "DK"; 164 if (code == V3Hl7Realm.ES) 165 return "ES"; 166 if (code == V3Hl7Realm.FI) 167 return "FI"; 168 if (code == V3Hl7Realm.FR) 169 return "FR"; 170 if (code == V3Hl7Realm.GR) 171 return "GR"; 172 if (code == V3Hl7Realm.HR) 173 return "HR"; 174 if (code == V3Hl7Realm.IE) 175 return "IE"; 176 if (code == V3Hl7Realm.IN) 177 return "IN"; 178 if (code == V3Hl7Realm.IT) 179 return "IT"; 180 if (code == V3Hl7Realm.JP) 181 return "JP"; 182 if (code == V3Hl7Realm.KR) 183 return "KR"; 184 if (code == V3Hl7Realm.LT) 185 return "LT"; 186 if (code == V3Hl7Realm.MX) 187 return "MX"; 188 if (code == V3Hl7Realm.NL) 189 return "NL"; 190 if (code == V3Hl7Realm.NZ) 191 return "NZ"; 192 if (code == V3Hl7Realm.RO) 193 return "RO"; 194 if (code == V3Hl7Realm.RU) 195 return "RU"; 196 if (code == V3Hl7Realm.SE) 197 return "SE"; 198 if (code == V3Hl7Realm.SG) 199 return "SG"; 200 if (code == V3Hl7Realm.SOA) 201 return "SOA"; 202 if (code == V3Hl7Realm.TR) 203 return "TR"; 204 if (code == V3Hl7Realm.TW) 205 return "TW"; 206 if (code == V3Hl7Realm.UK) 207 return "UK"; 208 if (code == V3Hl7Realm.US) 209 return "US"; 210 if (code == V3Hl7Realm.UV) 211 return "UV"; 212 if (code == V3Hl7Realm.UY) 213 return "UY"; 214 if (code == V3Hl7Realm.C1) 215 return "C1"; 216 if (code == V3Hl7Realm.GB) 217 return "GB"; 218 if (code == V3Hl7Realm.R1) 219 return "R1"; 220 if (code == V3Hl7Realm.X1) 221 return "X1"; 222 if (code == V3Hl7Realm.NAMESPACEREALMS) 223 return "NamespaceRealms"; 224 if (code == V3Hl7Realm.ZZ) 225 return "ZZ"; 226 return "?"; 227 } 228 229 public String toSystem(V3Hl7Realm code) { 230 return code.getSystem(); 231 } 232 233} 234