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