001package org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50; 002 003import org.hl7.fhir.convertors.context.ConversionContext14_50; 004import org.hl7.fhir.exceptions.FHIRException; 005 006public class String14_50 { 007 public static org.hl7.fhir.r5.model.StringType convertString(org.hl7.fhir.dstu2016may.model.StringType src) throws FHIRException { 008 org.hl7.fhir.r5.model.StringType tgt = new org.hl7.fhir.r5.model.StringType(); 009 if (src.hasValue()) tgt.setValue(src.getValue()); 010 ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt); 011 return tgt; 012 } 013 014 public static org.hl7.fhir.dstu2016may.model.StringType convertString(org.hl7.fhir.r5.model.StringType src) throws FHIRException { 015 org.hl7.fhir.dstu2016may.model.StringType tgt = new org.hl7.fhir.dstu2016may.model.StringType(); 016 if (src.hasValue()) tgt.setValue(src.getValue()); 017 ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt); 018 return tgt; 019 } 020 021 public static org.hl7.fhir.r5.model.MarkdownType convertStringToMarkdown(org.hl7.fhir.dstu2016may.model.StringType src) throws FHIRException { 022 org.hl7.fhir.r5.model.MarkdownType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.MarkdownType(src.getValue()) : new org.hl7.fhir.r5.model.MarkdownType(); 023 ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt); 024 return tgt; 025 } 026}