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