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 Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 033 034 035import org.hl7.fhir.exceptions.FHIRException; 036 037public enum V3HtmlLinkType { 038 039 /** 040 * Designates substitute versions for the document in which the link occurs. When used together with the lang attribute, it implies a translated version of the document. When used together with the media attribute, it implies a version designed for a different medium (or media). 041 */ 042 ALTERNATE, 043 /** 044 * Refers to a document serving as an appendix in a collection of documents. 045 */ 046 APPENDIX, 047 /** 048 * Refers to a bookmark. A bookmark is a link to a key entry point within an extended document. The title attribute may be used, for example, to label the bookmark. Note that several bookmarks may be defined in each document. 049 */ 050 BOOKMARK, 051 /** 052 * Refers to a document serving as a chapter in a collection of documents. 053 */ 054 CHAPTER, 055 /** 056 * Refers to a document serving as a table of contents. Some user agents also support the synonym ToC (from "Table of Contents"). 057 */ 058 CONTENTS, 059 /** 060 * Refers to a copyright statement for the current document. 061 */ 062 COPYRIGHT, 063 /** 064 * Refers to a document providing a glossary of terms that pertain to the current document. 065 */ 066 GLOSSARY, 067 /** 068 * Refers to a document offering help (more information, links to other sources of information, etc.). 069 */ 070 HELP, 071 /** 072 * Refers to a document providing an index for the current document. 073 */ 074 INDEX, 075 /** 076 * Refers to the next document in a linear sequence of documents. User agents may choose to preload the "next" document, to reduce the perceived load time. 077 */ 078 NEXT, 079 /** 080 * Refers to the previous document in an ordered series of documents. Some user agents also support the synonym "Previous". 081 */ 082 PREV, 083 /** 084 * Refers to a document serving as a section in a collection of documents. 085 */ 086 SECTION, 087 /** 088 * Refers to the first document in a collection of documents. This link type tells search engines which document is considered by the author to be the starting point of the collection. 089 */ 090 START, 091 /** 092 * Refers to an external style sheet. See the section on external style sheets for details. This is used together with the link type "Alternate" for user-selectable alternate style sheets. 093 */ 094 STYLESHEET, 095 /** 096 * Refers to a document serving as a subsection in a collection of documents. 097 */ 098 SUBSECTION, 099 /** 100 * added to help the parsers 101 */ 102 NULL; 103 public static V3HtmlLinkType fromCode(String codeString) throws FHIRException { 104 if (codeString == null || "".equals(codeString)) 105 return null; 106 if ("alternate".equals(codeString)) 107 return ALTERNATE; 108 if ("appendix".equals(codeString)) 109 return APPENDIX; 110 if ("bookmark".equals(codeString)) 111 return BOOKMARK; 112 if ("chapter".equals(codeString)) 113 return CHAPTER; 114 if ("contents".equals(codeString)) 115 return CONTENTS; 116 if ("copyright".equals(codeString)) 117 return COPYRIGHT; 118 if ("glossary".equals(codeString)) 119 return GLOSSARY; 120 if ("help".equals(codeString)) 121 return HELP; 122 if ("index".equals(codeString)) 123 return INDEX; 124 if ("next".equals(codeString)) 125 return NEXT; 126 if ("prev".equals(codeString)) 127 return PREV; 128 if ("section".equals(codeString)) 129 return SECTION; 130 if ("start".equals(codeString)) 131 return START; 132 if ("stylesheet".equals(codeString)) 133 return STYLESHEET; 134 if ("subsection".equals(codeString)) 135 return SUBSECTION; 136 throw new FHIRException("Unknown V3HtmlLinkType code '"+codeString+"'"); 137 } 138 public String toCode() { 139 switch (this) { 140 case ALTERNATE: return "alternate"; 141 case APPENDIX: return "appendix"; 142 case BOOKMARK: return "bookmark"; 143 case CHAPTER: return "chapter"; 144 case CONTENTS: return "contents"; 145 case COPYRIGHT: return "copyright"; 146 case GLOSSARY: return "glossary"; 147 case HELP: return "help"; 148 case INDEX: return "index"; 149 case NEXT: return "next"; 150 case PREV: return "prev"; 151 case SECTION: return "section"; 152 case START: return "start"; 153 case STYLESHEET: return "stylesheet"; 154 case SUBSECTION: return "subsection"; 155 default: return "?"; 156 } 157 } 158 public String getSystem() { 159 return "http://terminology.hl7.org/CodeSystem/v3-HtmlLinkType"; 160 } 161 public String getDefinition() { 162 switch (this) { 163 case ALTERNATE: return "Designates substitute versions for the document in which the link occurs. When used together with the lang attribute, it implies a translated version of the document. When used together with the media attribute, it implies a version designed for a different medium (or media)."; 164 case APPENDIX: return "Refers to a document serving as an appendix in a collection of documents."; 165 case BOOKMARK: return "Refers to a bookmark. A bookmark is a link to a key entry point within an extended document. The title attribute may be used, for example, to label the bookmark. Note that several bookmarks may be defined in each document."; 166 case CHAPTER: return "Refers to a document serving as a chapter in a collection of documents."; 167 case CONTENTS: return "Refers to a document serving as a table of contents. Some user agents also support the synonym ToC (from \"Table of Contents\")."; 168 case COPYRIGHT: return "Refers to a copyright statement for the current document."; 169 case GLOSSARY: return "Refers to a document providing a glossary of terms that pertain to the current document."; 170 case HELP: return "Refers to a document offering help (more information, links to other sources of information, etc.)."; 171 case INDEX: return "Refers to a document providing an index for the current document."; 172 case NEXT: return "Refers to the next document in a linear sequence of documents. User agents may choose to preload the \"next\" document, to reduce the perceived load time."; 173 case PREV: return "Refers to the previous document in an ordered series of documents. Some user agents also support the synonym \"Previous\"."; 174 case SECTION: return "Refers to a document serving as a section in a collection of documents."; 175 case START: return "Refers to the first document in a collection of documents. This link type tells search engines which document is considered by the author to be the starting point of the collection."; 176 case STYLESHEET: return "Refers to an external style sheet. See the section on external style sheets for details. This is used together with the link type \"Alternate\" for user-selectable alternate style sheets."; 177 case SUBSECTION: return "Refers to a document serving as a subsection in a collection of documents."; 178 default: return "?"; 179 } 180 } 181 public String getDisplay() { 182 switch (this) { 183 case ALTERNATE: return "alternate"; 184 case APPENDIX: return "appendix"; 185 case BOOKMARK: return "bookmark"; 186 case CHAPTER: return "chapter"; 187 case CONTENTS: return "contents"; 188 case COPYRIGHT: return "copyright"; 189 case GLOSSARY: return "glossary"; 190 case HELP: return "help"; 191 case INDEX: return "index"; 192 case NEXT: return "next"; 193 case PREV: return "prev"; 194 case SECTION: return "section"; 195 case START: return "start"; 196 case STYLESHEET: return "stylesheet"; 197 case SUBSECTION: return "subsection"; 198 default: return "?"; 199 } 200 } 201 202 203} 204