001package org.hl7.fhir.convertors.conv30_50.resources30_50;
002
003import java.util.stream.Collectors;
004
005import org.hl7.fhir.convertors.context.ConversionContext30_50;
006import org.hl7.fhir.convertors.conv30_50.datatypes30_50.ContactDetail30_50;
007import org.hl7.fhir.convertors.conv30_50.datatypes30_50.UsageContext30_50;
008import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.CodeableConcept30_50;
009import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Identifier30_50;
010import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Boolean30_50;
011import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.DateTime30_50;
012import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Id30_50;
013import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Integer30_50;
014import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.MarkDown30_50;
015import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_50;
016import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Uri30_50;
017import org.hl7.fhir.exceptions.FHIRException;
018import org.hl7.fhir.r5.model.Enumeration;
019import org.hl7.fhir.r5.model.StringType;
020import org.hl7.fhir.r5.model.StructureMap;
021import org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetParameterComponent;
022
023public class StructureMap30_50 {
024
025  public static org.hl7.fhir.r5.model.StructureMap convertStructureMap(org.hl7.fhir.dstu3.model.StructureMap src) throws FHIRException {
026    if (src == null)
027      return null;
028    org.hl7.fhir.r5.model.StructureMap tgt = new org.hl7.fhir.r5.model.StructureMap();
029    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt);
030    if (src.hasUrl())
031      tgt.setUrlElement(Uri30_50.convertUri(src.getUrlElement()));
032    for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())
033      tgt.addIdentifier(Identifier30_50.convertIdentifier(t));
034    if (src.hasVersion())
035      tgt.setVersionElement(String30_50.convertString(src.getVersionElement()));
036    if (src.hasName())
037      tgt.setNameElement(String30_50.convertString(src.getNameElement()));
038    if (src.hasTitle())
039      tgt.setTitleElement(String30_50.convertString(src.getTitleElement()));
040    if (src.hasStatus())
041      tgt.setStatusElement(Enumerations30_50.convertPublicationStatus(src.getStatusElement()));
042    if (src.hasExperimental())
043      tgt.setExperimentalElement(Boolean30_50.convertBoolean(src.getExperimentalElement()));
044    if (src.hasDate())
045      tgt.setDateElement(DateTime30_50.convertDateTime(src.getDateElement()));
046    if (src.hasPublisher())
047      tgt.setPublisherElement(String30_50.convertString(src.getPublisherElement()));
048    for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact())
049      tgt.addContact(ContactDetail30_50.convertContactDetail(t));
050    if (src.hasDescription())
051      tgt.setDescriptionElement(MarkDown30_50.convertMarkdown(src.getDescriptionElement()));
052    for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext())
053      tgt.addUseContext(UsageContext30_50.convertUsageContext(t));
054    for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction())
055      tgt.addJurisdiction(CodeableConcept30_50.convertCodeableConcept(t));
056    if (src.hasPurpose())
057      tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement()));
058    if (src.hasCopyright())
059      tgt.setCopyrightElement(MarkDown30_50.convertMarkdown(src.getCopyrightElement()));
060    for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent t : src.getStructure())
061      tgt.addStructure(convertStructureMapStructureComponent(t));
062    for (org.hl7.fhir.dstu3.model.UriType t : src.getImport()) tgt.addImport(t.getValue());
063    for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupComponent t : src.getGroup())
064      tgt.addGroup(convertStructureMapGroupComponent(t));
065    return tgt;
066  }
067
068  public static org.hl7.fhir.dstu3.model.StructureMap convertStructureMap(org.hl7.fhir.r5.model.StructureMap src) throws FHIRException {
069    if (src == null)
070      return null;
071    org.hl7.fhir.dstu3.model.StructureMap tgt = new org.hl7.fhir.dstu3.model.StructureMap();
072    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt);
073    if (src.hasUrl())
074      tgt.setUrlElement(Uri30_50.convertUri(src.getUrlElement()));
075    for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
076      tgt.addIdentifier(Identifier30_50.convertIdentifier(t));
077    if (src.hasVersion())
078      tgt.setVersionElement(String30_50.convertString(src.getVersionElement()));
079    if (src.hasName())
080      tgt.setNameElement(String30_50.convertString(src.getNameElement()));
081    if (src.hasTitle())
082      tgt.setTitleElement(String30_50.convertString(src.getTitleElement()));
083    if (src.hasStatus())
084      tgt.setStatusElement(Enumerations30_50.convertPublicationStatus(src.getStatusElement()));
085    if (src.hasExperimental())
086      tgt.setExperimentalElement(Boolean30_50.convertBoolean(src.getExperimentalElement()));
087    if (src.hasDate())
088      tgt.setDateElement(DateTime30_50.convertDateTime(src.getDateElement()));
089    if (src.hasPublisher())
090      tgt.setPublisherElement(String30_50.convertString(src.getPublisherElement()));
091    for (org.hl7.fhir.r5.model.ContactDetail t : src.getContact())
092      tgt.addContact(ContactDetail30_50.convertContactDetail(t));
093    if (src.hasDescription())
094      tgt.setDescriptionElement(MarkDown30_50.convertMarkdown(src.getDescriptionElement()));
095    for (org.hl7.fhir.r5.model.UsageContext t : src.getUseContext())
096      tgt.addUseContext(UsageContext30_50.convertUsageContext(t));
097    for (org.hl7.fhir.r5.model.CodeableConcept t : src.getJurisdiction())
098      tgt.addJurisdiction(CodeableConcept30_50.convertCodeableConcept(t));
099    if (src.hasPurpose())
100      tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement()));
101    if (src.hasCopyright())
102      tgt.setCopyrightElement(MarkDown30_50.convertMarkdown(src.getCopyrightElement()));
103    for (org.hl7.fhir.r5.model.StructureMap.StructureMapStructureComponent t : src.getStructure())
104      tgt.addStructure(convertStructureMapStructureComponent(t));
105    for (org.hl7.fhir.r5.model.UriType t : src.getImport()) tgt.addImport(t.getValue());
106    for (org.hl7.fhir.r5.model.StructureMap.StructureMapGroupComponent t : src.getGroup())
107      tgt.addGroup(convertStructureMapGroupComponent(t));
108    return tgt;
109  }
110
111
112  public static org.hl7.fhir.r5.model.StructureMap.StructureMapGroupComponent convertStructureMapGroupComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupComponent src) throws FHIRException {
113    if (src == null)
114      return null;
115    org.hl7.fhir.r5.model.StructureMap.StructureMapGroupComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupComponent();
116    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
117    if (src.hasName())
118      tgt.setNameElement(Id30_50.convertId(src.getNameElement()));
119    if (src.hasExtends())
120      tgt.setExtendsElement(Id30_50.convertId(src.getExtendsElement()));
121    if (src.hasTypeMode())
122      tgt.setTypeModeElement(convertStructureMapGroupTypeMode(src.getTypeModeElement()));
123    if (src.hasDocumentation())
124      tgt.setDocumentationElement(String30_50.convertString(src.getDocumentationElement()));
125    for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupInputComponent t : src.getInput())
126      tgt.addInput(convertStructureMapGroupInputComponent(t));
127    for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleComponent t : src.getRule())
128      tgt.addRule(convertStructureMapGroupRuleComponent(t));
129    return tgt;
130  }
131
132  public static org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupComponent convertStructureMapGroupComponent(org.hl7.fhir.r5.model.StructureMap.StructureMapGroupComponent src) throws FHIRException {
133    if (src == null)
134      return null;
135    org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupComponent();
136    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
137    if (src.hasName())
138      tgt.setNameElement(Id30_50.convertId(src.getNameElement()));
139    if (src.hasExtends())
140      tgt.setExtendsElement(Id30_50.convertId(src.getExtendsElement()));
141    if (src.hasTypeMode())
142      tgt.setTypeModeElement(convertStructureMapGroupTypeMode(src.getTypeModeElement()));
143    if (src.hasDocumentation())
144      tgt.setDocumentationElement(String30_50.convertString(src.getDocumentationElement()));
145    for (org.hl7.fhir.r5.model.StructureMap.StructureMapGroupInputComponent t : src.getInput())
146      tgt.addInput(convertStructureMapGroupInputComponent(t));
147    for (org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleComponent t : src.getRule())
148      tgt.addRule(convertStructureMapGroupRuleComponent(t));
149    return tgt;
150  }
151
152  public static org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupInputComponent convertStructureMapGroupInputComponent(org.hl7.fhir.r5.model.StructureMap.StructureMapGroupInputComponent src) throws FHIRException {
153    if (src == null)
154      return null;
155    org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupInputComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupInputComponent();
156    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
157    if (src.hasName())
158      tgt.setNameElement(Id30_50.convertId(src.getNameElement()));
159    if (src.hasType())
160      tgt.setTypeElement(String30_50.convertString(src.getTypeElement()));
161    if (src.hasMode())
162      tgt.setModeElement(convertStructureMapInputMode(src.getModeElement()));
163    if (src.hasDocumentation())
164      tgt.setDocumentationElement(String30_50.convertString(src.getDocumentationElement()));
165    return tgt;
166  }
167
168  public static org.hl7.fhir.r5.model.StructureMap.StructureMapGroupInputComponent convertStructureMapGroupInputComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupInputComponent src) throws FHIRException {
169    if (src == null)
170      return null;
171    org.hl7.fhir.r5.model.StructureMap.StructureMapGroupInputComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupInputComponent();
172    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
173    if (src.hasName())
174      tgt.setNameElement(Id30_50.convertId(src.getNameElement()));
175    if (src.hasType())
176      tgt.setTypeElement(String30_50.convertString(src.getTypeElement()));
177    if (src.hasMode())
178      tgt.setModeElement(convertStructureMapInputMode(src.getModeElement()));
179    if (src.hasDocumentation())
180      tgt.setDocumentationElement(String30_50.convertString(src.getDocumentationElement()));
181    return tgt;
182  }
183
184  public static org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleComponent convertStructureMapGroupRuleComponent(org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleComponent src) throws FHIRException {
185    if (src == null)
186      return null;
187    org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleComponent();
188    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
189    if (src.hasName())
190      tgt.setNameElement(Id30_50.convertId(src.getNameElement()));
191    for (org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleSourceComponent t : src.getSource())
192      tgt.addSource(convertStructureMapGroupRuleSourceComponent(t));
193    for (org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent t : src.getTarget())
194      tgt.addTarget(convertStructureMapGroupRuleTargetComponent(t));
195    for (org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleComponent t : src.getRule())
196      tgt.addRule(convertStructureMapGroupRuleComponent(t));
197    for (org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleDependentComponent t : src.getDependent())
198      tgt.addDependent(convertStructureMapGroupRuleDependentComponent(t));
199    if (src.hasDocumentation())
200      tgt.setDocumentationElement(String30_50.convertString(src.getDocumentationElement()));
201    return tgt;
202  }
203
204  public static org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleComponent convertStructureMapGroupRuleComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleComponent src) throws FHIRException {
205    if (src == null)
206      return null;
207    org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleComponent();
208    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
209    if (src.hasName())
210      tgt.setNameElement(Id30_50.convertId(src.getNameElement()));
211    for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleSourceComponent t : src.getSource())
212      tgt.addSource(convertStructureMapGroupRuleSourceComponent(t));
213    for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetComponent t : src.getTarget())
214      tgt.addTarget(convertStructureMapGroupRuleTargetComponent(t));
215    for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleComponent t : src.getRule())
216      tgt.addRule(convertStructureMapGroupRuleComponent(t));
217    for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent t : src.getDependent())
218      tgt.addDependent(convertStructureMapGroupRuleDependentComponent(t));
219    if (src.hasDocumentation())
220      tgt.setDocumentationElement(String30_50.convertString(src.getDocumentationElement()));
221    return tgt;
222  }
223
224  public static org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleDependentComponent convertStructureMapGroupRuleDependentComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent src) throws FHIRException {
225    if (src == null)
226      return null;
227    org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleDependentComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleDependentComponent();
228    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
229    if (src.hasName())
230      tgt.setNameElement(Id30_50.convertId(src.getNameElement()));
231    for (org.hl7.fhir.dstu3.model.StringType t : src.getVariable()) tgt.addParameter().setValue(String30_50.convertString(t));
232    return tgt;
233  }
234
235  public static org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent convertStructureMapGroupRuleDependentComponent(org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleDependentComponent src) throws FHIRException {
236    if (src == null)
237      return null;
238    org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleDependentComponent();
239    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
240    if (src.hasName())
241      tgt.setNameElement(Id30_50.convertId(src.getNameElement()));
242    for (StructureMapGroupRuleTargetParameterComponent t : src.getParameter()) tgt.addVariable(t.getValue().primitiveValue());
243    return tgt;
244  }
245
246  public static org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleSourceComponent convertStructureMapGroupRuleSourceComponent(org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleSourceComponent src) throws FHIRException {
247    if (src == null)
248      return null;
249    org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleSourceComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleSourceComponent();
250    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
251    if (src.hasContext())
252      tgt.setContextElement(Id30_50.convertId(src.getContextElement()));
253    if (src.hasMin())
254      tgt.setMinElement(Integer30_50.convertInteger(src.getMinElement()));
255    if (src.hasMax())
256      tgt.setMaxElement(String30_50.convertString(src.getMaxElement()));
257    if (src.hasType())
258      tgt.setTypeElement(String30_50.convertString(src.getTypeElement()));
259    if (src.hasDefaultValue())
260      tgt.setDefaultValue(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getDefaultValueElement()));
261    if (src.hasElement())
262      tgt.setElementElement(String30_50.convertString(src.getElementElement()));
263    if (src.hasListMode())
264      tgt.setListModeElement(convertStructureMapSourceListMode(src.getListModeElement()));
265    if (src.hasVariable())
266      tgt.setVariableElement(Id30_50.convertId(src.getVariableElement()));
267    if (src.hasCondition())
268      tgt.setConditionElement(String30_50.convertString(src.getConditionElement()));
269    if (src.hasCheck())
270      tgt.setCheckElement(String30_50.convertString(src.getCheckElement()));
271    return tgt;
272  }
273
274  public static org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleSourceComponent convertStructureMapGroupRuleSourceComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleSourceComponent src) throws FHIRException {
275    if (src == null)
276      return null;
277    org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleSourceComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleSourceComponent();
278    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
279    if (src.hasContext())
280      tgt.setContextElement(Id30_50.convertId(src.getContextElement()));
281    if (src.hasMin())
282      tgt.setMinElement(Integer30_50.convertInteger(src.getMinElement()));
283    if (src.hasMax())
284      tgt.setMaxElement(String30_50.convertString(src.getMaxElement()));
285    if (src.hasType())
286      tgt.setTypeElement(String30_50.convertString(src.getTypeElement()));
287    if (src.hasDefaultValue())
288      tgt.setDefaultValueElement((StringType) ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getDefaultValue()));
289    if (src.hasElement())
290      tgt.setElementElement(String30_50.convertString(src.getElementElement()));
291    if (src.hasListMode())
292      tgt.setListModeElement(convertStructureMapSourceListMode(src.getListModeElement()));
293    if (src.hasVariable())
294      tgt.setVariableElement(Id30_50.convertId(src.getVariableElement()));
295    if (src.hasCondition())
296      tgt.setConditionElement(String30_50.convertString(src.getConditionElement()));
297    if (src.hasCheck())
298      tgt.setCheckElement(String30_50.convertString(src.getCheckElement()));
299    return tgt;
300  }
301
302  public static org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent convertStructureMapGroupRuleTargetComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetComponent src) throws FHIRException {
303    if (src == null)
304      return null;
305    org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent();
306    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
307    if (src.hasContext())
308      tgt.setContextElement(Id30_50.convertIdToString(src.getContextElement()));
309    if (src.hasContextType() && src.getContextType() != org.hl7.fhir.dstu3.model.StructureMap.StructureMapContextType.VARIABLE)
310      throw new Error("This conversion is not supported. Consult code maintainers"); // this should never happens - no one knows what the intent was here.
311    if (src.hasElement())
312      tgt.setElementElement(String30_50.convertString(src.getElementElement()));
313    if (src.hasVariable())
314      tgt.setVariableElement(Id30_50.convertId(src.getVariableElement()));
315    tgt.setListMode(src.getListMode().stream()
316      .map(StructureMap30_50::convertStructureMapTargetListMode)
317      .collect(Collectors.toList()));
318    if (src.hasListRuleId())
319      tgt.setListRuleIdElement(Id30_50.convertId(src.getListRuleIdElement()));
320    if (src.hasTransform())
321      tgt.setTransformElement(convertStructureMapTransform(src.getTransformElement()));
322    for (org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetParameterComponent t : src.getParameter())
323      tgt.addParameter(convertStructureMapGroupRuleTargetParameterComponent(t));
324    return tgt;
325  }
326
327  public static org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetComponent convertStructureMapGroupRuleTargetComponent(org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent src) throws FHIRException {
328    if (src == null)
329      return null;
330    org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetComponent();
331    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
332    if (src.hasContext())
333      tgt.setContextElement(Id30_50.convertId(src.getContextElement()));
334    tgt.setContextType(org.hl7.fhir.dstu3.model.StructureMap.StructureMapContextType.VARIABLE);
335    if (src.hasElement())
336      tgt.setElementElement(String30_50.convertString(src.getElementElement()));
337    if (src.hasVariable())
338      tgt.setVariableElement(Id30_50.convertId(src.getVariableElement()));
339    tgt.setListMode(src.getListMode().stream()
340      .map(StructureMap30_50::convertStructureMapTargetListMode)
341      .collect(Collectors.toList()));
342    if (src.hasListRuleId())
343      tgt.setListRuleIdElement(Id30_50.convertId(src.getListRuleIdElement()));
344    if (src.hasTransform())
345      tgt.setTransformElement(convertStructureMapTransform(src.getTransformElement()));
346    for (org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetParameterComponent t : src.getParameter())
347      tgt.addParameter(convertStructureMapGroupRuleTargetParameterComponent(t));
348    return tgt;
349  }
350
351  public static org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetParameterComponent convertStructureMapGroupRuleTargetParameterComponent(org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetParameterComponent src) throws FHIRException {
352    if (src == null)
353      return null;
354    org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetParameterComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetParameterComponent();
355    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
356    if (src.hasValue())
357      tgt.setValue(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getValue()));
358    return tgt;
359  }
360
361  public static org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetParameterComponent convertStructureMapGroupRuleTargetParameterComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupRuleTargetParameterComponent src) throws FHIRException {
362    if (src == null)
363      return null;
364    org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetParameterComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetParameterComponent();
365    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
366    if (src.hasValue())
367      tgt.setValue(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getValue()));
368    return tgt;
369  }
370
371  static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.StructureMap.StructureMapGroupTypeMode> convertStructureMapGroupTypeMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode> src) throws FHIRException {
372      if (src == null || src.isEmpty())
373          return null;
374      Enumeration<StructureMap.StructureMapGroupTypeMode> tgt = new Enumeration<>(new StructureMap.StructureMapGroupTypeModeEnumFactory());
375      ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
376      if (src.getValue() == null) {
377          tgt.setValue(null);
378      } else {
379          switch (src.getValue()) {
380              case NONE:
381                  return null;
382              case TYPES:
383                  tgt.setValue(StructureMap.StructureMapGroupTypeMode.TYPES);
384                  break;
385              case TYPEANDTYPES:
386                  tgt.setValue(StructureMap.StructureMapGroupTypeMode.TYPEANDTYPES);
387                  break;
388              default:
389                  tgt.setValue(StructureMap.StructureMapGroupTypeMode.NULL);
390                  break;
391          }
392      }
393      return tgt;
394  }
395
396  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode> convertStructureMapGroupTypeMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.StructureMap.StructureMapGroupTypeMode> src) throws FHIRException {
397      org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeModeEnumFactory());
398      if (src == null || src.isEmpty()) {
399          tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode.NONE);
400          return tgt;
401      }
402      ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
403      if (src.getValue() == null) {
404          tgt.setValue(null);
405      } else {
406          switch (src.getValue()) {
407              case TYPES:
408                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode.TYPES);
409                  break;
410              case TYPEANDTYPES:
411                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode.TYPEANDTYPES);
412                  break;
413              default:
414                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapGroupTypeMode.NULL);
415                  break;
416          }
417      }
418      return tgt;
419  }
420
421  static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.StructureMap.StructureMapInputMode> convertStructureMapInputMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputMode> src) throws FHIRException {
422      if (src == null || src.isEmpty())
423          return null;
424      Enumeration<StructureMap.StructureMapInputMode> tgt = new Enumeration<>(new StructureMap.StructureMapInputModeEnumFactory());
425      ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
426      if (src.getValue() == null) {
427          tgt.setValue(null);
428      } else {
429          switch (src.getValue()) {
430              case SOURCE:
431                  tgt.setValue(StructureMap.StructureMapInputMode.SOURCE);
432                  break;
433              case TARGET:
434                  tgt.setValue(StructureMap.StructureMapInputMode.TARGET);
435                  break;
436              default:
437                  tgt.setValue(StructureMap.StructureMapInputMode.NULL);
438                  break;
439          }
440      }
441      return tgt;
442  }
443
444  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputMode> convertStructureMapInputMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.StructureMap.StructureMapInputMode> src) throws FHIRException {
445      if (src == null || src.isEmpty())
446          return null;
447      org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputMode> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputModeEnumFactory());
448      ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
449      if (src.getValue() == null) {
450          tgt.setValue(null);
451      } else {
452          switch (src.getValue()) {
453              case SOURCE:
454                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputMode.SOURCE);
455                  break;
456              case TARGET:
457                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputMode.TARGET);
458                  break;
459              default:
460                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapInputMode.NULL);
461                  break;
462          }
463      }
464      return tgt;
465  }
466
467  static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.StructureMap.StructureMapModelMode> convertStructureMapModelMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode> src) throws FHIRException {
468      if (src == null || src.isEmpty())
469          return null;
470      Enumeration<StructureMap.StructureMapModelMode> tgt = new Enumeration<>(new StructureMap.StructureMapModelModeEnumFactory());
471      ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
472      if (src.getValue() == null) {
473          tgt.setValue(null);
474      } else {
475          switch (src.getValue()) {
476              case SOURCE:
477                  tgt.setValue(StructureMap.StructureMapModelMode.SOURCE);
478                  break;
479              case QUERIED:
480                  tgt.setValue(StructureMap.StructureMapModelMode.QUERIED);
481                  break;
482              case TARGET:
483                  tgt.setValue(StructureMap.StructureMapModelMode.TARGET);
484                  break;
485              case PRODUCED:
486                  tgt.setValue(StructureMap.StructureMapModelMode.PRODUCED);
487                  break;
488              default:
489                  tgt.setValue(StructureMap.StructureMapModelMode.NULL);
490                  break;
491          }
492      }
493      return tgt;
494  }
495
496  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode> convertStructureMapModelMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.StructureMap.StructureMapModelMode> src) throws FHIRException {
497      if (src == null || src.isEmpty())
498          return null;
499      org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelModeEnumFactory());
500      ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
501      if (src.getValue() == null) {
502          tgt.setValue(null);
503      } else {
504          switch (src.getValue()) {
505              case SOURCE:
506                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode.SOURCE);
507                  break;
508              case QUERIED:
509                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode.QUERIED);
510                  break;
511              case TARGET:
512                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode.TARGET);
513                  break;
514              case PRODUCED:
515                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode.PRODUCED);
516                  break;
517              default:
518                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapModelMode.NULL);
519                  break;
520          }
521      }
522      return tgt;
523  }
524
525  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode> convertStructureMapSourceListMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.StructureMap.StructureMapSourceListMode> src) throws FHIRException {
526      if (src == null || src.isEmpty())
527          return null;
528      org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListModeEnumFactory());
529      ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
530      if (src.getValue() == null) {
531          tgt.setValue(null);
532      } else {
533          switch (src.getValue()) {
534              case FIRST:
535                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.FIRST);
536                  break;
537              case NOTFIRST:
538                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.NOTFIRST);
539                  break;
540              case LAST:
541                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.LAST);
542                  break;
543              case NOTLAST:
544                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.NOTLAST);
545                  break;
546              case ONLYONE:
547                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.ONLYONE);
548                  break;
549              default:
550                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode.NULL);
551                  break;
552          }
553      }
554      return tgt;
555  }
556
557  static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.StructureMap.StructureMapSourceListMode> convertStructureMapSourceListMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapSourceListMode> src) throws FHIRException {
558      if (src == null || src.isEmpty())
559          return null;
560      Enumeration<StructureMap.StructureMapSourceListMode> tgt = new Enumeration<>(new StructureMap.StructureMapSourceListModeEnumFactory());
561      ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
562      if (src.getValue() == null) {
563          tgt.setValue(null);
564      } else {
565          switch (src.getValue()) {
566              case FIRST:
567                  tgt.setValue(StructureMap.StructureMapSourceListMode.FIRST);
568                  break;
569              case NOTFIRST:
570                  tgt.setValue(StructureMap.StructureMapSourceListMode.NOTFIRST);
571                  break;
572              case LAST:
573                  tgt.setValue(StructureMap.StructureMapSourceListMode.LAST);
574                  break;
575              case NOTLAST:
576                  tgt.setValue(StructureMap.StructureMapSourceListMode.NOTLAST);
577                  break;
578              case ONLYONE:
579                  tgt.setValue(StructureMap.StructureMapSourceListMode.ONLYONE);
580                  break;
581              default:
582                  tgt.setValue(StructureMap.StructureMapSourceListMode.NULL);
583                  break;
584          }
585      }
586      return tgt;
587  }
588
589  public static org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent convertStructureMapStructureComponent(org.hl7.fhir.r5.model.StructureMap.StructureMapStructureComponent src) throws FHIRException {
590    if (src == null)
591      return null;
592    org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent tgt = new org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent();
593    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
594    if (src.hasUrl())
595      tgt.setUrl(src.getUrl());
596    if (src.hasMode())
597      tgt.setModeElement(convertStructureMapModelMode(src.getModeElement()));
598    if (src.hasAlias())
599      tgt.setAliasElement(String30_50.convertString(src.getAliasElement()));
600    if (src.hasDocumentation())
601      tgt.setDocumentationElement(String30_50.convertString(src.getDocumentationElement()));
602    return tgt;
603  }
604
605  public static org.hl7.fhir.r5.model.StructureMap.StructureMapStructureComponent convertStructureMapStructureComponent(org.hl7.fhir.dstu3.model.StructureMap.StructureMapStructureComponent src) throws FHIRException {
606    if (src == null)
607      return null;
608    org.hl7.fhir.r5.model.StructureMap.StructureMapStructureComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapStructureComponent();
609    ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt);
610    if (src.hasUrl())
611      tgt.setUrl(src.getUrl());
612    if (src.hasMode())
613      tgt.setModeElement(convertStructureMapModelMode(src.getModeElement()));
614    if (src.hasAlias())
615      tgt.setAliasElement(String30_50.convertString(src.getAliasElement()));
616    if (src.hasDocumentation())
617      tgt.setDocumentationElement(String30_50.convertString(src.getDocumentationElement()));
618    return tgt;
619  }
620
621  static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode> convertStructureMapTargetListMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapTargetListMode> src) throws FHIRException {
622      if (src == null || src.isEmpty())
623          return null;
624      Enumeration<StructureMap.StructureMapTargetListMode> tgt = new Enumeration<>(new StructureMap.StructureMapTargetListModeEnumFactory());
625      ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
626      if (src.getValue() == null) {
627          tgt.setValue(null);
628      } else {
629          switch (src.getValue()) {
630              case FIRST:
631                  tgt.setValue(StructureMap.StructureMapTargetListMode.FIRST);
632                  break;
633              case SHARE:
634                  tgt.setValue(StructureMap.StructureMapTargetListMode.SHARE);
635                  break;
636              case LAST:
637                  tgt.setValue(StructureMap.StructureMapTargetListMode.LAST);
638                  break;
639              case COLLATE:
640                  tgt.setValue(StructureMap.StructureMapTargetListMode.SINGLE);
641                  break;
642              default:
643                  tgt.setValue(StructureMap.StructureMapTargetListMode.NULL);
644                  break;
645          }
646      }
647      return tgt;
648  }
649
650  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapTargetListMode> convertStructureMapTargetListMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode> src) throws FHIRException {
651      if (src == null || src.isEmpty())
652          return null;
653      org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapTargetListMode> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.StructureMap.StructureMapTargetListModeEnumFactory());
654      ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
655      if (src.getValue() == null) {
656          tgt.setValue(null);
657      } else {
658          switch (src.getValue()) {
659              case FIRST:
660                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTargetListMode.FIRST);
661                  break;
662              case SHARE:
663                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTargetListMode.SHARE);
664                  break;
665              case LAST:
666                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTargetListMode.LAST);
667                  break;
668              case SINGLE:
669                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTargetListMode.COLLATE);
670                  break;
671              default:
672                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTargetListMode.NULL);
673                  break;
674          }
675      }
676      return tgt;
677  }
678
679  static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform> convertStructureMapTransform(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.StructureMap.StructureMapTransform> src) throws FHIRException {
680      if (src == null || src.isEmpty())
681          return null;
682      org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransformEnumFactory());
683      ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
684      if (src.getValue() == null) {
685          tgt.setValue(null);
686      } else {
687          switch (src.getValue()) {
688              case CREATE:
689                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.CREATE);
690                  break;
691              case COPY:
692                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.COPY);
693                  break;
694              case TRUNCATE:
695                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.TRUNCATE);
696                  break;
697              case ESCAPE:
698                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.ESCAPE);
699                  break;
700              case CAST:
701                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.CAST);
702                  break;
703              case APPEND:
704                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.APPEND);
705                  break;
706              case TRANSLATE:
707                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.TRANSLATE);
708                  break;
709              case REFERENCE:
710                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.REFERENCE);
711                  break;
712              case DATEOP:
713                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.DATEOP);
714                  break;
715              case UUID:
716                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.UUID);
717                  break;
718              case POINTER:
719                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.POINTER);
720                  break;
721              case EVALUATE:
722                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.EVALUATE);
723                  break;
724              case CC:
725                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.CC);
726                  break;
727              case C:
728                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.C);
729                  break;
730              case QTY:
731                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.QTY);
732                  break;
733              case ID:
734                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.ID);
735                  break;
736              case CP:
737                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.CP);
738                  break;
739              default:
740                  tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform.NULL);
741                  break;
742          }
743      }
744      return tgt;
745  }
746
747  static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.StructureMap.StructureMapTransform> convertStructureMapTransform(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.StructureMap.StructureMapTransform> src) throws FHIRException {
748      if (src == null || src.isEmpty())
749          return null;
750      Enumeration<StructureMap.StructureMapTransform> tgt = new Enumeration<>(new StructureMap.StructureMapTransformEnumFactory());
751      ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt);
752      if (src.getValue() == null) {
753          tgt.setValue(null);
754      } else {
755          switch (src.getValue()) {
756              case CREATE:
757                  tgt.setValue(StructureMap.StructureMapTransform.CREATE);
758                  break;
759              case COPY:
760                  tgt.setValue(StructureMap.StructureMapTransform.COPY);
761                  break;
762              case TRUNCATE:
763                  tgt.setValue(StructureMap.StructureMapTransform.TRUNCATE);
764                  break;
765              case ESCAPE:
766                  tgt.setValue(StructureMap.StructureMapTransform.ESCAPE);
767                  break;
768              case CAST:
769                  tgt.setValue(StructureMap.StructureMapTransform.CAST);
770                  break;
771              case APPEND:
772                  tgt.setValue(StructureMap.StructureMapTransform.APPEND);
773                  break;
774              case TRANSLATE:
775                  tgt.setValue(StructureMap.StructureMapTransform.TRANSLATE);
776                  break;
777              case REFERENCE:
778                  tgt.setValue(StructureMap.StructureMapTransform.REFERENCE);
779                  break;
780              case DATEOP:
781                  tgt.setValue(StructureMap.StructureMapTransform.DATEOP);
782                  break;
783              case UUID:
784                  tgt.setValue(StructureMap.StructureMapTransform.UUID);
785                  break;
786              case POINTER:
787                  tgt.setValue(StructureMap.StructureMapTransform.POINTER);
788                  break;
789              case EVALUATE:
790                  tgt.setValue(StructureMap.StructureMapTransform.EVALUATE);
791                  break;
792              case CC:
793                  tgt.setValue(StructureMap.StructureMapTransform.CC);
794                  break;
795              case C:
796                  tgt.setValue(StructureMap.StructureMapTransform.C);
797                  break;
798              case QTY:
799                  tgt.setValue(StructureMap.StructureMapTransform.QTY);
800                  break;
801              case ID:
802                  tgt.setValue(StructureMap.StructureMapTransform.ID);
803                  break;
804              case CP:
805                  tgt.setValue(StructureMap.StructureMapTransform.CP);
806                  break;
807              default:
808                  tgt.setValue(StructureMap.StructureMapTransform.NULL);
809                  break;
810          }
811      }
812      return tgt;
813  }
814}