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 TestscriptOperationCodesEnumFactory implements EnumFactory<TestscriptOperationCodes> {
041
042  public TestscriptOperationCodes fromCode(String codeString) throws IllegalArgumentException {
043    if (codeString == null || "".equals(codeString))
044      return null;
045    if ("read".equals(codeString))
046      return TestscriptOperationCodes.READ;
047    if ("vread".equals(codeString))
048      return TestscriptOperationCodes.VREAD;
049    if ("update".equals(codeString))
050      return TestscriptOperationCodes.UPDATE;
051    if ("updateCreate".equals(codeString))
052      return TestscriptOperationCodes.UPDATECREATE;
053    if ("delete".equals(codeString))
054      return TestscriptOperationCodes.DELETE;
055    if ("deleteCondSingle".equals(codeString))
056      return TestscriptOperationCodes.DELETECONDSINGLE;
057    if ("deleteCondMultiple".equals(codeString))
058      return TestscriptOperationCodes.DELETECONDMULTIPLE;
059    if ("history".equals(codeString))
060      return TestscriptOperationCodes.HISTORY;
061    if ("create".equals(codeString))
062      return TestscriptOperationCodes.CREATE;
063    if ("search".equals(codeString))
064      return TestscriptOperationCodes.SEARCH;
065    if ("batch".equals(codeString))
066      return TestscriptOperationCodes.BATCH;
067    if ("transaction".equals(codeString))
068      return TestscriptOperationCodes.TRANSACTION;
069    if ("capabilities".equals(codeString))
070      return TestscriptOperationCodes.CAPABILITIES;
071    if ("apply".equals(codeString))
072      return TestscriptOperationCodes.APPLY;
073    if ("cancel".equals(codeString))
074      return TestscriptOperationCodes.CANCEL;
075    if ("closure".equals(codeString))
076      return TestscriptOperationCodes.CLOSURE;
077    if ("compose".equals(codeString))
078      return TestscriptOperationCodes.COMPOSE;
079    if ("conforms".equals(codeString))
080      return TestscriptOperationCodes.CONFORMS;
081    if ("data-requirements".equals(codeString))
082      return TestscriptOperationCodes.DATAREQUIREMENTS;
083    if ("document".equals(codeString))
084      return TestscriptOperationCodes.DOCUMENT;
085    if ("evaluate".equals(codeString))
086      return TestscriptOperationCodes.EVALUATE;
087    if ("evaluate-measure".equals(codeString))
088      return TestscriptOperationCodes.EVALUATEMEASURE;
089    if ("everything".equals(codeString))
090      return TestscriptOperationCodes.EVERYTHING;
091    if ("expand".equals(codeString))
092      return TestscriptOperationCodes.EXPAND;
093    if ("fail".equals(codeString))
094      return TestscriptOperationCodes.FAIL;
095    if ("find".equals(codeString))
096      return TestscriptOperationCodes.FIND;
097    if ("finish".equals(codeString))
098      return TestscriptOperationCodes.FINISH;
099    if ("implements".equals(codeString))
100      return TestscriptOperationCodes.IMPLEMENTS;
101    if ("lookup".equals(codeString))
102      return TestscriptOperationCodes.LOOKUP;
103    if ("match".equals(codeString))
104      return TestscriptOperationCodes.MATCH;
105    if ("meta".equals(codeString))
106      return TestscriptOperationCodes.META;
107    if ("meta-add".equals(codeString))
108      return TestscriptOperationCodes.METAADD;
109    if ("meta-delete".equals(codeString))
110      return TestscriptOperationCodes.METADELETE;
111    if ("populate".equals(codeString))
112      return TestscriptOperationCodes.POPULATE;
113    if ("populatehtml".equals(codeString))
114      return TestscriptOperationCodes.POPULATEHTML;
115    if ("populatelink".equals(codeString))
116      return TestscriptOperationCodes.POPULATELINK;
117    if ("process-message".equals(codeString))
118      return TestscriptOperationCodes.PROCESSMESSAGE;
119    if ("questionnaire".equals(codeString))
120      return TestscriptOperationCodes.QUESTIONNAIRE;
121    if ("release".equals(codeString))
122      return TestscriptOperationCodes.RELEASE;
123    if ("reserve".equals(codeString))
124      return TestscriptOperationCodes.RESERVE;
125    if ("resume".equals(codeString))
126      return TestscriptOperationCodes.RESUME;
127    if ("set-input".equals(codeString))
128      return TestscriptOperationCodes.SETINPUT;
129    if ("set-output".equals(codeString))
130      return TestscriptOperationCodes.SETOUTPUT;
131    if ("start".equals(codeString))
132      return TestscriptOperationCodes.START;
133    if ("stats".equals(codeString))
134      return TestscriptOperationCodes.STATS;
135    if ("stop".equals(codeString))
136      return TestscriptOperationCodes.STOP;
137    if ("subset".equals(codeString))
138      return TestscriptOperationCodes.SUBSET;
139    if ("subsumes".equals(codeString))
140      return TestscriptOperationCodes.SUBSUMES;
141    if ("suspend".equals(codeString))
142      return TestscriptOperationCodes.SUSPEND;
143    if ("transform".equals(codeString))
144      return TestscriptOperationCodes.TRANSFORM;
145    if ("translate".equals(codeString))
146      return TestscriptOperationCodes.TRANSLATE;
147    if ("validate".equals(codeString))
148      return TestscriptOperationCodes.VALIDATE;
149    if ("validate-code".equals(codeString))
150      return TestscriptOperationCodes.VALIDATECODE;
151    throw new IllegalArgumentException("Unknown TestscriptOperationCodes code '"+codeString+"'");
152  }
153
154  public String toCode(TestscriptOperationCodes code) {
155       if (code == TestscriptOperationCodes.NULL)
156           return null;
157       if (code == TestscriptOperationCodes.READ)
158      return "read";
159    if (code == TestscriptOperationCodes.VREAD)
160      return "vread";
161    if (code == TestscriptOperationCodes.UPDATE)
162      return "update";
163    if (code == TestscriptOperationCodes.UPDATECREATE)
164      return "updateCreate";
165    if (code == TestscriptOperationCodes.DELETE)
166      return "delete";
167    if (code == TestscriptOperationCodes.DELETECONDSINGLE)
168      return "deleteCondSingle";
169    if (code == TestscriptOperationCodes.DELETECONDMULTIPLE)
170      return "deleteCondMultiple";
171    if (code == TestscriptOperationCodes.HISTORY)
172      return "history";
173    if (code == TestscriptOperationCodes.CREATE)
174      return "create";
175    if (code == TestscriptOperationCodes.SEARCH)
176      return "search";
177    if (code == TestscriptOperationCodes.BATCH)
178      return "batch";
179    if (code == TestscriptOperationCodes.TRANSACTION)
180      return "transaction";
181    if (code == TestscriptOperationCodes.CAPABILITIES)
182      return "capabilities";
183    if (code == TestscriptOperationCodes.APPLY)
184      return "apply";
185    if (code == TestscriptOperationCodes.CANCEL)
186      return "cancel";
187    if (code == TestscriptOperationCodes.CLOSURE)
188      return "closure";
189    if (code == TestscriptOperationCodes.COMPOSE)
190      return "compose";
191    if (code == TestscriptOperationCodes.CONFORMS)
192      return "conforms";
193    if (code == TestscriptOperationCodes.DATAREQUIREMENTS)
194      return "data-requirements";
195    if (code == TestscriptOperationCodes.DOCUMENT)
196      return "document";
197    if (code == TestscriptOperationCodes.EVALUATE)
198      return "evaluate";
199    if (code == TestscriptOperationCodes.EVALUATEMEASURE)
200      return "evaluate-measure";
201    if (code == TestscriptOperationCodes.EVERYTHING)
202      return "everything";
203    if (code == TestscriptOperationCodes.EXPAND)
204      return "expand";
205    if (code == TestscriptOperationCodes.FAIL)
206      return "fail";
207    if (code == TestscriptOperationCodes.FIND)
208      return "find";
209    if (code == TestscriptOperationCodes.FINISH)
210      return "finish";
211    if (code == TestscriptOperationCodes.IMPLEMENTS)
212      return "implements";
213    if (code == TestscriptOperationCodes.LOOKUP)
214      return "lookup";
215    if (code == TestscriptOperationCodes.MATCH)
216      return "match";
217    if (code == TestscriptOperationCodes.META)
218      return "meta";
219    if (code == TestscriptOperationCodes.METAADD)
220      return "meta-add";
221    if (code == TestscriptOperationCodes.METADELETE)
222      return "meta-delete";
223    if (code == TestscriptOperationCodes.POPULATE)
224      return "populate";
225    if (code == TestscriptOperationCodes.POPULATEHTML)
226      return "populatehtml";
227    if (code == TestscriptOperationCodes.POPULATELINK)
228      return "populatelink";
229    if (code == TestscriptOperationCodes.PROCESSMESSAGE)
230      return "process-message";
231    if (code == TestscriptOperationCodes.QUESTIONNAIRE)
232      return "questionnaire";
233    if (code == TestscriptOperationCodes.RELEASE)
234      return "release";
235    if (code == TestscriptOperationCodes.RESERVE)
236      return "reserve";
237    if (code == TestscriptOperationCodes.RESUME)
238      return "resume";
239    if (code == TestscriptOperationCodes.SETINPUT)
240      return "set-input";
241    if (code == TestscriptOperationCodes.SETOUTPUT)
242      return "set-output";
243    if (code == TestscriptOperationCodes.START)
244      return "start";
245    if (code == TestscriptOperationCodes.STATS)
246      return "stats";
247    if (code == TestscriptOperationCodes.STOP)
248      return "stop";
249    if (code == TestscriptOperationCodes.SUBSET)
250      return "subset";
251    if (code == TestscriptOperationCodes.SUBSUMES)
252      return "subsumes";
253    if (code == TestscriptOperationCodes.SUSPEND)
254      return "suspend";
255    if (code == TestscriptOperationCodes.TRANSFORM)
256      return "transform";
257    if (code == TestscriptOperationCodes.TRANSLATE)
258      return "translate";
259    if (code == TestscriptOperationCodes.VALIDATE)
260      return "validate";
261    if (code == TestscriptOperationCodes.VALIDATECODE)
262      return "validate-code";
263    return "?";
264   }
265
266    public String toSystem(TestscriptOperationCodes code) {
267      return code.getSystem();
268      }
269
270}