001package org.hl7.fhir.instance.model.valuesets; 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, Nov 11, 2015 10:54-0500 for FHIR v1.0.2 033 034 035public enum V3HtmlLinkType { 036 037 /** 038 * 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). 039 */ 040 ALTERNATE, 041 /** 042 * Refers to a document serving as an appendix in a collection of documents. 043 */ 044 APPENDIX, 045 /** 046 * 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. 047 */ 048 BOOKMARK, 049 /** 050 * Refers to a document serving as a chapter in a collection of documents. 051 */ 052 CHAPTER, 053 /** 054 * Refers to a document serving as a table of contents. Some user agents also support the synonym ToC (from "Table of Contents"). 055 */ 056 CONTENTS, 057 /** 058 * Refers to a copyright statement for the current document. 059 */ 060 COPYRIGHT, 061 /** 062 * Refers to a document providing a glossary of terms that pertain to the current document. 063 */ 064 GLOSSARY, 065 /** 066 * Refers to a document offering help (more information, links to other sources of information, etc.). 067 */ 068 HELP, 069 /** 070 * Refers to a document providing an index for the current document. 071 */ 072 INDEX, 073 /** 074 * 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. 075 */ 076 NEXT, 077 /** 078 * Refers to the previous document in an ordered series of documents. Some user agents also support the synonym "Previous". 079 */ 080 PREV, 081 /** 082 * Refers to a document serving as a section in a collection of documents. 083 */ 084 SECTION, 085 /** 086 * 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. 087 */ 088 START, 089 /** 090 * 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. 091 */ 092 STYLESHEET, 093 /** 094 * Refers to a document serving as a subsection in a collection of documents. 095 */ 096 SUBSECTION, 097 /** 098 * added to help the parsers 099 */ 100 NULL; 101 public static V3HtmlLinkType fromCode(String codeString) throws Exception { 102 if (codeString == null || "".equals(codeString)) 103 return null; 104 if ("alternate".equals(codeString)) 105 return ALTERNATE; 106 if ("appendix".equals(codeString)) 107 return APPENDIX; 108 if ("bookmark".equals(codeString)) 109 return BOOKMARK; 110 if ("chapter".equals(codeString)) 111 return CHAPTER; 112 if ("contents".equals(codeString)) 113 return CONTENTS; 114 if ("copyright".equals(codeString)) 115 return COPYRIGHT; 116 if ("glossary".equals(codeString)) 117 return GLOSSARY; 118 if ("help".equals(codeString)) 119 return HELP; 120 if ("index".equals(codeString)) 121 return INDEX; 122 if ("next".equals(codeString)) 123 return NEXT; 124 if ("prev".equals(codeString)) 125 return PREV; 126 if ("section".equals(codeString)) 127 return SECTION; 128 if ("start".equals(codeString)) 129 return START; 130 if ("stylesheet".equals(codeString)) 131 return STYLESHEET; 132 if ("subsection".equals(codeString)) 133 return SUBSECTION; 134 throw new Exception("Unknown V3HtmlLinkType code '"+codeString+"'"); 135 } 136 public String toCode() { 137 switch (this) { 138 case ALTERNATE: return "alternate"; 139 case APPENDIX: return "appendix"; 140 case BOOKMARK: return "bookmark"; 141 case CHAPTER: return "chapter"; 142 case CONTENTS: return "contents"; 143 case COPYRIGHT: return "copyright"; 144 case GLOSSARY: return "glossary"; 145 case HELP: return "help"; 146 case INDEX: return "index"; 147 case NEXT: return "next"; 148 case PREV: return "prev"; 149 case SECTION: return "section"; 150 case START: return "start"; 151 case STYLESHEET: return "stylesheet"; 152 case SUBSECTION: return "subsection"; 153 default: return "?"; 154 } 155 } 156 public String getSystem() { 157 return "http://hl7.org/fhir/v3/HtmlLinkType"; 158 } 159 public String getDefinition() { 160 switch (this) { 161 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)."; 162 case APPENDIX: return "Refers to a document serving as an appendix in a collection of documents."; 163 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."; 164 case CHAPTER: return "Refers to a document serving as a chapter in a collection of documents."; 165 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\")."; 166 case COPYRIGHT: return "Refers to a copyright statement for the current document."; 167 case GLOSSARY: return "Refers to a document providing a glossary of terms that pertain to the current document."; 168 case HELP: return "Refers to a document offering help (more information, links to other sources of information, etc.)."; 169 case INDEX: return "Refers to a document providing an index for the current document."; 170 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."; 171 case PREV: return "Refers to the previous document in an ordered series of documents. Some user agents also support the synonym \"Previous\"."; 172 case SECTION: return "Refers to a document serving as a section in a collection of documents."; 173 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."; 174 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."; 175 case SUBSECTION: return "Refers to a document serving as a subsection in a collection of documents."; 176 default: return "?"; 177 } 178 } 179 public String getDisplay() { 180 switch (this) { 181 case ALTERNATE: return "alternate"; 182 case APPENDIX: return "appendix"; 183 case BOOKMARK: return "bookmark"; 184 case CHAPTER: return "chapter"; 185 case CONTENTS: return "contents"; 186 case COPYRIGHT: return "copyright"; 187 case GLOSSARY: return "glossary"; 188 case HELP: return "help"; 189 case INDEX: return "index"; 190 case NEXT: return "next"; 191 case PREV: return "prev"; 192 case SECTION: return "section"; 193 case START: return "start"; 194 case STYLESHEET: return "stylesheet"; 195 case SUBSECTION: return "subsection"; 196 default: return "?"; 197 } 198 } 199 200 201} 202