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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 033 034import org.hl7.fhir.exceptions.FHIRException; 035 036public enum V3TableFrame { 037 038 /** 039 * above 040 */ 041 ABOVE, 042 /** 043 * below 044 */ 045 BELOW, 046 /** 047 * border 048 */ 049 BORDER, 050 /** 051 * box 052 */ 053 BOX, 054 /** 055 * hsides 056 */ 057 HSIDES, 058 /** 059 * lhs 060 */ 061 LHS, 062 /** 063 * rhs 064 */ 065 RHS, 066 /** 067 * void 068 */ 069 VOID, 070 /** 071 * vsides 072 */ 073 VSIDES, 074 /** 075 * added to help the parsers 076 */ 077 NULL; 078 079 public static V3TableFrame fromCode(String codeString) throws FHIRException { 080 if (codeString == null || "".equals(codeString)) 081 return null; 082 if ("above".equals(codeString)) 083 return ABOVE; 084 if ("below".equals(codeString)) 085 return BELOW; 086 if ("border".equals(codeString)) 087 return BORDER; 088 if ("box".equals(codeString)) 089 return BOX; 090 if ("hsides".equals(codeString)) 091 return HSIDES; 092 if ("lhs".equals(codeString)) 093 return LHS; 094 if ("rhs".equals(codeString)) 095 return RHS; 096 if ("void".equals(codeString)) 097 return VOID; 098 if ("vsides".equals(codeString)) 099 return VSIDES; 100 throw new FHIRException("Unknown V3TableFrame code '" + codeString + "'"); 101 } 102 103 public String toCode() { 104 switch (this) { 105 case ABOVE: 106 return "above"; 107 case BELOW: 108 return "below"; 109 case BORDER: 110 return "border"; 111 case BOX: 112 return "box"; 113 case HSIDES: 114 return "hsides"; 115 case LHS: 116 return "lhs"; 117 case RHS: 118 return "rhs"; 119 case VOID: 120 return "void"; 121 case VSIDES: 122 return "vsides"; 123 case NULL: 124 return null; 125 default: 126 return "?"; 127 } 128 } 129 130 public String getSystem() { 131 return "http://terminology.hl7.org/CodeSystem/v3-TableFrame"; 132 } 133 134 public String getDefinition() { 135 switch (this) { 136 case ABOVE: 137 return "above"; 138 case BELOW: 139 return "below"; 140 case BORDER: 141 return "border"; 142 case BOX: 143 return "box"; 144 case HSIDES: 145 return "hsides"; 146 case LHS: 147 return "lhs"; 148 case RHS: 149 return "rhs"; 150 case VOID: 151 return "void"; 152 case VSIDES: 153 return "vsides"; 154 case NULL: 155 return null; 156 default: 157 return "?"; 158 } 159 } 160 161 public String getDisplay() { 162 switch (this) { 163 case ABOVE: 164 return "above"; 165 case BELOW: 166 return "below"; 167 case BORDER: 168 return "border"; 169 case BOX: 170 return "box"; 171 case HSIDES: 172 return "hsides"; 173 case LHS: 174 return "lhs"; 175 case RHS: 176 return "rhs"; 177 case VOID: 178 return "void"; 179 case VSIDES: 180 return "vsides"; 181 case NULL: 182 return null; 183 default: 184 return "?"; 185 } 186 } 187 188}