001package org.hl7.fhir.r5.model.codesystems; 002 003/* 004 * #%L 005 * org.hl7.fhir.r5 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023/* 024 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Thu, Oct 17, 2019 09:42+1100 for FHIR v4.1.0 053 054 055import org.hl7.fhir.exceptions.FHIRException; 056 057public enum V3StyleType { 058 059 /** 060 * Defines font rendering characteristics 061 */ 062 _FONTSTYLE, 063 /** 064 * Render with a bold font 065 */ 066 BOLD, 067 /** 068 * Render with with some type of emphasis 069 */ 070 EMPHASIS, 071 /** 072 * Render italicized 073 */ 074 ITALICS, 075 /** 076 * Render with an underline font 077 */ 078 UNDERLINE, 079 /** 080 * Defines list rendering characteristics 081 */ 082 _LISTSTYLE, 083 /** 084 * Defines rendering characteristics for ordered lists 085 */ 086 _ORDEREDLISTSTYLE, 087 /** 088 * List is ordered using Arabic numerals: 1, 2, 3 089 */ 090 ARABIC, 091 /** 092 * List is ordered using big alpha characters: A, B, C 093 */ 094 BIGALPHA, 095 /** 096 * List is ordered using big Roman numerals: I, II, III 097 */ 098 BIGROMAN, 099 /** 100 * List is order using little alpha characters: a, b, c 101 */ 102 LITTLEALPHA, 103 /** 104 * List is ordered using little Roman numerals: i, ii, iii 105 */ 106 LITTLEROMAN, 107 /** 108 * Defines rendering characteristics for unordered lists 109 */ 110 _UNORDEREDLISTSTYLE, 111 /** 112 * List bullets are hollow discs 113 */ 114 CIRCLE, 115 /** 116 * List bullets are simple solid discs 117 */ 118 DISC, 119 /** 120 * List bullets are solid squares 121 */ 122 SQUARE, 123 /** 124 * Defines table cell rendering characteristics 125 */ 126 _TABLERULESTYLE, 127 /** 128 * Render cell with rule on bottom 129 */ 130 BOTRULE, 131 /** 132 * Render cell with left-sided rule 133 */ 134 LRULE, 135 /** 136 * Render cell with right-sided rule 137 */ 138 RRULE, 139 /** 140 * Render cell with rule on top 141 */ 142 TOPRULE, 143 /** 144 * added to help the parsers 145 */ 146 NULL; 147 public static V3StyleType fromCode(String codeString) throws FHIRException { 148 if (codeString == null || "".equals(codeString)) 149 return null; 150 if ("_FontStyle".equals(codeString)) 151 return _FONTSTYLE; 152 if ("bold".equals(codeString)) 153 return BOLD; 154 if ("emphasis".equals(codeString)) 155 return EMPHASIS; 156 if ("italics".equals(codeString)) 157 return ITALICS; 158 if ("underline".equals(codeString)) 159 return UNDERLINE; 160 if ("_ListStyle".equals(codeString)) 161 return _LISTSTYLE; 162 if ("_OrderedListStyle".equals(codeString)) 163 return _ORDEREDLISTSTYLE; 164 if ("Arabic".equals(codeString)) 165 return ARABIC; 166 if ("BigAlpha".equals(codeString)) 167 return BIGALPHA; 168 if ("BigRoman".equals(codeString)) 169 return BIGROMAN; 170 if ("LittleAlpha".equals(codeString)) 171 return LITTLEALPHA; 172 if ("LittleRoman".equals(codeString)) 173 return LITTLEROMAN; 174 if ("_UnorderedListStyle".equals(codeString)) 175 return _UNORDEREDLISTSTYLE; 176 if ("Circle".equals(codeString)) 177 return CIRCLE; 178 if ("Disc".equals(codeString)) 179 return DISC; 180 if ("Square".equals(codeString)) 181 return SQUARE; 182 if ("_TableRuleStyle".equals(codeString)) 183 return _TABLERULESTYLE; 184 if ("Botrule".equals(codeString)) 185 return BOTRULE; 186 if ("Lrule".equals(codeString)) 187 return LRULE; 188 if ("Rrule".equals(codeString)) 189 return RRULE; 190 if ("Toprule".equals(codeString)) 191 return TOPRULE; 192 throw new FHIRException("Unknown V3StyleType code '"+codeString+"'"); 193 } 194 public String toCode() { 195 switch (this) { 196 case _FONTSTYLE: return "_FontStyle"; 197 case BOLD: return "bold"; 198 case EMPHASIS: return "emphasis"; 199 case ITALICS: return "italics"; 200 case UNDERLINE: return "underline"; 201 case _LISTSTYLE: return "_ListStyle"; 202 case _ORDEREDLISTSTYLE: return "_OrderedListStyle"; 203 case ARABIC: return "Arabic"; 204 case BIGALPHA: return "BigAlpha"; 205 case BIGROMAN: return "BigRoman"; 206 case LITTLEALPHA: return "LittleAlpha"; 207 case LITTLEROMAN: return "LittleRoman"; 208 case _UNORDEREDLISTSTYLE: return "_UnorderedListStyle"; 209 case CIRCLE: return "Circle"; 210 case DISC: return "Disc"; 211 case SQUARE: return "Square"; 212 case _TABLERULESTYLE: return "_TableRuleStyle"; 213 case BOTRULE: return "Botrule"; 214 case LRULE: return "Lrule"; 215 case RRULE: return "Rrule"; 216 case TOPRULE: return "Toprule"; 217 default: return "?"; 218 } 219 } 220 public String getSystem() { 221 return "http://terminology.hl7.org/CodeSystem/v3-styleType"; 222 } 223 public String getDefinition() { 224 switch (this) { 225 case _FONTSTYLE: return "Defines font rendering characteristics"; 226 case BOLD: return "Render with a bold font"; 227 case EMPHASIS: return "Render with with some type of emphasis"; 228 case ITALICS: return "Render italicized"; 229 case UNDERLINE: return "Render with an underline font"; 230 case _LISTSTYLE: return "Defines list rendering characteristics"; 231 case _ORDEREDLISTSTYLE: return "Defines rendering characteristics for ordered lists"; 232 case ARABIC: return "List is ordered using Arabic numerals: 1, 2, 3"; 233 case BIGALPHA: return "List is ordered using big alpha characters: A, B, C"; 234 case BIGROMAN: return "List is ordered using big Roman numerals: I, II, III"; 235 case LITTLEALPHA: return "List is order using little alpha characters: a, b, c"; 236 case LITTLEROMAN: return "List is ordered using little Roman numerals: i, ii, iii"; 237 case _UNORDEREDLISTSTYLE: return "Defines rendering characteristics for unordered lists"; 238 case CIRCLE: return "List bullets are hollow discs"; 239 case DISC: return "List bullets are simple solid discs"; 240 case SQUARE: return "List bullets are solid squares"; 241 case _TABLERULESTYLE: return "Defines table cell rendering characteristics"; 242 case BOTRULE: return "Render cell with rule on bottom"; 243 case LRULE: return "Render cell with left-sided rule"; 244 case RRULE: return "Render cell with right-sided rule"; 245 case TOPRULE: return "Render cell with rule on top"; 246 default: return "?"; 247 } 248 } 249 public String getDisplay() { 250 switch (this) { 251 case _FONTSTYLE: return "Font Style"; 252 case BOLD: return "Bold Font"; 253 case EMPHASIS: return "Emphasised Font"; 254 case ITALICS: return "Italics Font"; 255 case UNDERLINE: return "Underline Font"; 256 case _LISTSTYLE: return "List Style"; 257 case _ORDEREDLISTSTYLE: return "Ordered List Style"; 258 case ARABIC: return "Arabic"; 259 case BIGALPHA: return "Big Alpha"; 260 case BIGROMAN: return "Big Roman"; 261 case LITTLEALPHA: return "Little Alpha"; 262 case LITTLEROMAN: return "Little Roman"; 263 case _UNORDEREDLISTSTYLE: return "Unordered List Style"; 264 case CIRCLE: return "Circle"; 265 case DISC: return "Disc"; 266 case SQUARE: return "Square"; 267 case _TABLERULESTYLE: return "Table Rule Style"; 268 case BOTRULE: return "Bottom Rule"; 269 case LRULE: return "Left-sided rule"; 270 case RRULE: return "Right-sided rule"; 271 case TOPRULE: return "Top Rule"; 272 default: return "?"; 273 } 274 } 275 276 277} 278