public static Reference makeReference(String url) { Reference rr = new Reference(); rr.setReference(url); return rr; }
public static Reference makeReference(String url, String text) { Reference rr = new Reference(); rr.setReference(url); if (!Utilities.noString(text)) rr.setDisplay(text); return rr; }
public org.hl7.fhir.instance.model.Reference convertReference(org.hl7.fhir.r4.model.Reference src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Reference tgt = new org.hl7.fhir.instance.model.Reference(); copyElement(src, tgt); tgt.setReference(src.getReference()); tgt.setDisplay(src.getDisplay()); return tgt; }
public org.hl7.fhir.instance.model.Reference convertReference(org.hl7.fhir.dstu3.model.Reference src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Reference tgt = new org.hl7.fhir.instance.model.Reference(); copyElement(src, tgt); tgt.setReference(src.getReference()); tgt.setDisplay(src.getDisplay()); return tgt; }
/** * Finds internal references in an Element's Binding and StructureDefinition references (in TypeRef) and bases them on the given url * @param url - the base url to use to turn internal references into absolute references * @param element - the Element to update * @return - the updated Element */ private ElementDefinition updateURLs(String url, ElementDefinition element) { if (element != null) { ElementDefinition defn = element; if (defn.hasBinding() && defn.getBinding().getValueSet() instanceof Reference && ((Reference)defn.getBinding().getValueSet()).getReference().startsWith("#")) ((Reference)defn.getBinding().getValueSet()).setReference(url+((Reference)defn.getBinding().getValueSet()).getReference()); for (TypeRefComponent t : defn.getType()) { for (UriType tp : t.getProfile()) { if (tp.getValue().startsWith("#")) tp.setValue(url+t.getProfile()); } } } return element; }
ServletContext servletContext = (ServletContext) (theRequest == null ? null : theRequest.getAttribute(RestfulServer.SERVLET_CONTEXT_ATTRIBUTE)); String serverBase = getServerConfiguration().getServerAddressStrategy().determineServerBase(servletContext, theRequest); resource.getProfile().setReference((def.getResourceProfile(serverBase))); .setReference("OperationDefinition/" + opName); if (operationNames.add(opName)) { rest.addOperation().setName(methodBinding.getName()).getDefinition() .setReference("OperationDefinition/" + opName);
public static Reference makeReference(String url) { Reference rr = new Reference(); rr.setReference(url); return rr; }
public static Reference makeReference(String url, String text) { Reference rr = new Reference(); rr.setReference(url); if (!Utilities.noString(text)) rr.setDisplay(text); return rr; }
public org.hl7.fhir.instance.model.Reference convertReference(org.hl7.fhir.dstu3.model.Reference src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Reference tgt = new org.hl7.fhir.instance.model.Reference(); copyElement(src, tgt); tgt.setReference(src.getReference()); tgt.setDisplay(src.getDisplay()); return tgt; }
public org.hl7.fhir.instance.model.Reference convertReference(org.hl7.fhir.r4.model.Reference src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Reference tgt = new org.hl7.fhir.instance.model.Reference(); copyElement(src, tgt); tgt.setReference(src.getReference()); tgt.setDisplay(src.getDisplay()); return tgt; }
/** * Finds internal references in an Element's Binding and StructureDefinition references (in TypeRef) and bases them on the given url * @param url - the base url to use to turn internal references into absolute references * @param element - the Element to update * @return - the updated Element */ private ElementDefinition updateURLs(String url, ElementDefinition element) { if (element != null) { ElementDefinition defn = element; if (defn.hasBinding() && defn.getBinding().getValueSet() instanceof Reference && ((Reference)defn.getBinding().getValueSet()).getReference().startsWith("#")) ((Reference)defn.getBinding().getValueSet()).setReference(url+((Reference)defn.getBinding().getValueSet()).getReference()); for (TypeRefComponent t : defn.getType()) { for (UriType tp : t.getProfile()) { if (tp.getValue().startsWith("#")) tp.setValue(url+t.getProfile()); } } } return element; }
ServletContext servletContext = (ServletContext) (theRequest == null ? null : theRequest.getAttribute(RestfulServer.SERVLET_CONTEXT_ATTRIBUTE)); String serverBase = getServerConfiguration().getServerAddressStrategy().determineServerBase(servletContext, theRequest); resource.getProfile().setReference((def.getResourceProfile(serverBase))); .setReference("OperationDefinition/" + opName); if (operationNames.add(opName)) { rest.addOperation().setName(methodBinding.getName()).getDefinition() .setReference("OperationDefinition/" + opName);