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