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 GuideParameterCode { 058 059 /** 060 * If the value of this string 0..* parameter is one of the metadata fields then all conformance resources will have any specified [Resource].[field] overwritten with the ImplementationGuide.[field], where field is one of: version, date, status, publisher, contact, copyright, experimental, jurisdiction, useContext. 061 */ 062 APPLY, 063 /** 064 * The value of this string 0..* parameter is a subfolder of the build context's location that is to be scanned to load resources. Scope is (if present) a particular resource type. 065 */ 066 PATHRESOURCE, 067 /** 068 * The value of this string 0..1 parameter is a subfolder of the build context's location that contains files that are part of the html content processed by the builder. 069 */ 070 PATHPAGES, 071 /** 072 * The value of this string 0..1 parameter is a subfolder of the build context's location that is used as the terminology cache. If this is not present, the terminology cache is on the local system, not under version control. 073 */ 074 PATHTXCACHE, 075 /** 076 * The value of this string 0..* parameter is a parameter (name=value) when expanding value sets for this implementation guide. This is particularly used to specify the versions of published terminologies such as SNOMED CT. 077 */ 078 EXPANSIONPARAMETER, 079 /** 080 * The value of this string 0..1 parameter is either "warning" or "error" (default = "error"). If the value is "warning" then IG build tools allow the IG to be considered successfully build even when there is no internal broken links. 081 */ 082 RULEBROKENLINKS, 083 /** 084 * The value of this boolean 0..1 parameter specifies whether the IG publisher creates examples in XML format. If not present, the Publication Tool decides whether to generate XML. 085 */ 086 GENERATEXML, 087 /** 088 * The value of this boolean 0..1 parameter specifies whether the IG publisher creates examples in JSON format. If not present, the Publication Tool decides whether to generate JSON. 089 */ 090 GENERATEJSON, 091 /** 092 * The value of this boolean 0..1 parameter specifies whether the IG publisher creates examples in Turtle format. If not present, the Publication Tool decides whether to generate Turtle. 093 */ 094 GENERATETURTLE, 095 /** 096 * The value of this string singleton parameter is the name of the file to use as the builder template for each generated page (see templating). 097 */ 098 HTMLTEMPLATE, 099 /** 100 * added to help the parsers 101 */ 102 NULL; 103 public static GuideParameterCode fromCode(String codeString) throws FHIRException { 104 if (codeString == null || "".equals(codeString)) 105 return null; 106 if ("apply".equals(codeString)) 107 return APPLY; 108 if ("path-resource".equals(codeString)) 109 return PATHRESOURCE; 110 if ("path-pages".equals(codeString)) 111 return PATHPAGES; 112 if ("path-tx-cache".equals(codeString)) 113 return PATHTXCACHE; 114 if ("expansion-parameter".equals(codeString)) 115 return EXPANSIONPARAMETER; 116 if ("rule-broken-links".equals(codeString)) 117 return RULEBROKENLINKS; 118 if ("generate-xml".equals(codeString)) 119 return GENERATEXML; 120 if ("generate-json".equals(codeString)) 121 return GENERATEJSON; 122 if ("generate-turtle".equals(codeString)) 123 return GENERATETURTLE; 124 if ("html-template".equals(codeString)) 125 return HTMLTEMPLATE; 126 throw new FHIRException("Unknown GuideParameterCode code '"+codeString+"'"); 127 } 128 public String toCode() { 129 switch (this) { 130 case APPLY: return "apply"; 131 case PATHRESOURCE: return "path-resource"; 132 case PATHPAGES: return "path-pages"; 133 case PATHTXCACHE: return "path-tx-cache"; 134 case EXPANSIONPARAMETER: return "expansion-parameter"; 135 case RULEBROKENLINKS: return "rule-broken-links"; 136 case GENERATEXML: return "generate-xml"; 137 case GENERATEJSON: return "generate-json"; 138 case GENERATETURTLE: return "generate-turtle"; 139 case HTMLTEMPLATE: return "html-template"; 140 default: return "?"; 141 } 142 } 143 public String getSystem() { 144 return "http://terminology.hl7.org/CodeSystem/guide-parameter-code"; 145 } 146 public String getDefinition() { 147 switch (this) { 148 case APPLY: return "If the value of this string 0..* parameter is one of the metadata fields then all conformance resources will have any specified [Resource].[field] overwritten with the ImplementationGuide.[field], where field is one of: version, date, status, publisher, contact, copyright, experimental, jurisdiction, useContext."; 149 case PATHRESOURCE: return "The value of this string 0..* parameter is a subfolder of the build context's location that is to be scanned to load resources. Scope is (if present) a particular resource type."; 150 case PATHPAGES: return "The value of this string 0..1 parameter is a subfolder of the build context's location that contains files that are part of the html content processed by the builder."; 151 case PATHTXCACHE: return "The value of this string 0..1 parameter is a subfolder of the build context's location that is used as the terminology cache. If this is not present, the terminology cache is on the local system, not under version control."; 152 case EXPANSIONPARAMETER: return "The value of this string 0..* parameter is a parameter (name=value) when expanding value sets for this implementation guide. This is particularly used to specify the versions of published terminologies such as SNOMED CT."; 153 case RULEBROKENLINKS: return "The value of this string 0..1 parameter is either \"warning\" or \"error\" (default = \"error\"). If the value is \"warning\" then IG build tools allow the IG to be considered successfully build even when there is no internal broken links."; 154 case GENERATEXML: return "The value of this boolean 0..1 parameter specifies whether the IG publisher creates examples in XML format. If not present, the Publication Tool decides whether to generate XML."; 155 case GENERATEJSON: return "The value of this boolean 0..1 parameter specifies whether the IG publisher creates examples in JSON format. If not present, the Publication Tool decides whether to generate JSON."; 156 case GENERATETURTLE: return "The value of this boolean 0..1 parameter specifies whether the IG publisher creates examples in Turtle format. If not present, the Publication Tool decides whether to generate Turtle."; 157 case HTMLTEMPLATE: return "The value of this string singleton parameter is the name of the file to use as the builder template for each generated page (see templating)."; 158 default: return "?"; 159 } 160 } 161 public String getDisplay() { 162 switch (this) { 163 case APPLY: return "Apply Metadata Value"; 164 case PATHRESOURCE: return "Resource Path"; 165 case PATHPAGES: return "Pages Path"; 166 case PATHTXCACHE: return "Terminology Cache Path"; 167 case EXPANSIONPARAMETER: return "Expansion Profile"; 168 case RULEBROKENLINKS: return "Broken Links Rule"; 169 case GENERATEXML: return "Generate XML"; 170 case GENERATEJSON: return "Generate JSON"; 171 case GENERATETURTLE: return "Generate Turtle"; 172 case HTMLTEMPLATE: return "HTML Template"; 173 default: return "?"; 174 } 175 } 176 177 178} 179