001package org.hl7.fhir.dstu3.model.codesystems; 002 003 004 005 006/* 007 Copyright (c) 2011+, HL7, Inc. 008 All rights reserved. 009 010 Redistribution and use in source and binary forms, with or without modification, 011 are permitted provided that the following conditions are met: 012 013 * Redistributions of source code must retain the above copyright notice, this 014 list of conditions and the following disclaimer. 015 * Redistributions in binary form must reproduce the above copyright notice, 016 this list of conditions and the following disclaimer in the documentation 017 and/or other materials provided with the distribution. 018 * Neither the name of HL7 nor the names of its contributors may be used to 019 endorse or promote products derived from this software without specific 020 prior written permission. 021 022 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 023 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 024 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 025 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 026 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 027 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 028 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 029 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 030 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 031 POSSIBILITY OF SUCH DAMAGE. 032 033*/ 034 035// Generated on Sat, Mar 25, 2017 21:03-0400 for FHIR v3.0.0 036 037 038import org.hl7.fhir.dstu3.model.EnumFactory; 039 040public class Iso21089LifecycleEnumFactory implements EnumFactory<Iso21089Lifecycle> { 041 042 public Iso21089Lifecycle fromCode(String codeString) throws IllegalArgumentException { 043 if (codeString == null || "".equals(codeString)) 044 return null; 045 if ("2".equals(codeString)) 046 return Iso21089Lifecycle._2; 047 if ("14".equals(codeString)) 048 return Iso21089Lifecycle._14; 049 if ("4".equals(codeString)) 050 return Iso21089Lifecycle._4; 051 if ("27".equals(codeString)) 052 return Iso21089Lifecycle._27; 053 if ("10".equals(codeString)) 054 return Iso21089Lifecycle._10; 055 if ("17".equals(codeString)) 056 return Iso21089Lifecycle._17; 057 if ("16".equals(codeString)) 058 return Iso21089Lifecycle._16; 059 if ("7".equals(codeString)) 060 return Iso21089Lifecycle._7; 061 if ("26".equals(codeString)) 062 return Iso21089Lifecycle._26; 063 if ("13".equals(codeString)) 064 return Iso21089Lifecycle._13; 065 if ("21".equals(codeString)) 066 return Iso21089Lifecycle._21; 067 if ("19".equals(codeString)) 068 return Iso21089Lifecycle._19; 069 if ("1".equals(codeString)) 070 return Iso21089Lifecycle._1; 071 if ("11".equals(codeString)) 072 return Iso21089Lifecycle._11; 073 if ("18".equals(codeString)) 074 return Iso21089Lifecycle._18; 075 if ("9".equals(codeString)) 076 return Iso21089Lifecycle._9; 077 if ("6".equals(codeString)) 078 return Iso21089Lifecycle._6; 079 if ("12".equals(codeString)) 080 return Iso21089Lifecycle._12; 081 if ("24".equals(codeString)) 082 return Iso21089Lifecycle._24; 083 if ("15".equals(codeString)) 084 return Iso21089Lifecycle._15; 085 if ("3".equals(codeString)) 086 return Iso21089Lifecycle._3; 087 if ("8".equals(codeString)) 088 return Iso21089Lifecycle._8; 089 if ("22".equals(codeString)) 090 return Iso21089Lifecycle._22; 091 if ("20".equals(codeString)) 092 return Iso21089Lifecycle._20; 093 if ("25".equals(codeString)) 094 return Iso21089Lifecycle._25; 095 throw new IllegalArgumentException("Unknown Iso21089Lifecycle code '"+codeString+"'"); 096 } 097 098 public String toCode(Iso21089Lifecycle code) { 099 if (code == Iso21089Lifecycle.NULL) 100 return null; 101 if (code == Iso21089Lifecycle._2) 102 return "2"; 103 if (code == Iso21089Lifecycle._14) 104 return "14"; 105 if (code == Iso21089Lifecycle._4) 106 return "4"; 107 if (code == Iso21089Lifecycle._27) 108 return "27"; 109 if (code == Iso21089Lifecycle._10) 110 return "10"; 111 if (code == Iso21089Lifecycle._17) 112 return "17"; 113 if (code == Iso21089Lifecycle._16) 114 return "16"; 115 if (code == Iso21089Lifecycle._7) 116 return "7"; 117 if (code == Iso21089Lifecycle._26) 118 return "26"; 119 if (code == Iso21089Lifecycle._13) 120 return "13"; 121 if (code == Iso21089Lifecycle._21) 122 return "21"; 123 if (code == Iso21089Lifecycle._19) 124 return "19"; 125 if (code == Iso21089Lifecycle._1) 126 return "1"; 127 if (code == Iso21089Lifecycle._11) 128 return "11"; 129 if (code == Iso21089Lifecycle._18) 130 return "18"; 131 if (code == Iso21089Lifecycle._9) 132 return "9"; 133 if (code == Iso21089Lifecycle._6) 134 return "6"; 135 if (code == Iso21089Lifecycle._12) 136 return "12"; 137 if (code == Iso21089Lifecycle._24) 138 return "24"; 139 if (code == Iso21089Lifecycle._15) 140 return "15"; 141 if (code == Iso21089Lifecycle._3) 142 return "3"; 143 if (code == Iso21089Lifecycle._8) 144 return "8"; 145 if (code == Iso21089Lifecycle._22) 146 return "22"; 147 if (code == Iso21089Lifecycle._20) 148 return "20"; 149 if (code == Iso21089Lifecycle._25) 150 return "25"; 151 return "?"; 152 } 153 154 public String toSystem(Iso21089Lifecycle code) { 155 return code.getSystem(); 156 } 157 158}