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._2)
100      return "2";
101    if (code == Iso21089Lifecycle._14)
102      return "14";
103    if (code == Iso21089Lifecycle._4)
104      return "4";
105    if (code == Iso21089Lifecycle._27)
106      return "27";
107    if (code == Iso21089Lifecycle._10)
108      return "10";
109    if (code == Iso21089Lifecycle._17)
110      return "17";
111    if (code == Iso21089Lifecycle._16)
112      return "16";
113    if (code == Iso21089Lifecycle._7)
114      return "7";
115    if (code == Iso21089Lifecycle._26)
116      return "26";
117    if (code == Iso21089Lifecycle._13)
118      return "13";
119    if (code == Iso21089Lifecycle._21)
120      return "21";
121    if (code == Iso21089Lifecycle._19)
122      return "19";
123    if (code == Iso21089Lifecycle._1)
124      return "1";
125    if (code == Iso21089Lifecycle._11)
126      return "11";
127    if (code == Iso21089Lifecycle._18)
128      return "18";
129    if (code == Iso21089Lifecycle._9)
130      return "9";
131    if (code == Iso21089Lifecycle._6)
132      return "6";
133    if (code == Iso21089Lifecycle._12)
134      return "12";
135    if (code == Iso21089Lifecycle._24)
136      return "24";
137    if (code == Iso21089Lifecycle._15)
138      return "15";
139    if (code == Iso21089Lifecycle._3)
140      return "3";
141    if (code == Iso21089Lifecycle._8)
142      return "8";
143    if (code == Iso21089Lifecycle._22)
144      return "22";
145    if (code == Iso21089Lifecycle._20)
146      return "20";
147    if (code == Iso21089Lifecycle._25)
148      return "25";
149    return "?";
150  }
151
152    public String toSystem(Iso21089Lifecycle code) {
153      return code.getSystem();
154      }
155
156}