/** * Convenience setter which sets the reference to the complete {@link IIdType#getValue() value} of the given * reference. * * @param theReference The reference, or <code>null</code> * @return * @return Returns a reference to this */ public Reference setReferenceElement(IIdType theReference) { if (theReference != null) { setReference(theReference.getValue()); } else { setReference(null); } return this; } protected void listChildren(List<Property> children) {
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 Reference castToReference(Base b) throws FHIRException { if (b instanceof Reference) return (Reference) b; else if (b.isPrimitive() && Utilities.isURL(b.primitiveValue())) return new Reference().setReference(b.primitiveValue()); else if (b instanceof org.hl7.fhir.r4.elementmodel.Element && b.fhirType().equals("Reference")) { org.hl7.fhir.r4.elementmodel.Element e = (org.hl7.fhir.r4.elementmodel.Element) b; return new Reference().setReference(e.getChildValue("reference")).setDisplay(e.getChildValue("display")); } else throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Reference"); }
public static Reference readAsReference(Element item) { Reference r = new Reference(); r.setDisplay(item.getNamedChildValue("display")); r.setReference(item.getNamedChildValue("reference")); r.setType(item.getNamedChildValue("type")); List<Element> identifier = item.getChildrenByName("identifier"); if (identifier.isEmpty() == false) { r.setIdentifier(readAsIdentifier(identifier.get(0))); } return r; }
public org.hl7.fhir.r4.model.Reference convertReference(org.hl7.fhir.instance.model.Reference src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Reference tgt = new org.hl7.fhir.r4.model.Reference(); copyElement(src, tgt); tgt.setReference(src.getReference()); tgt.setDisplay(src.getDisplay()); return tgt; }
public static org.hl7.fhir.r4.model.Reference convertReference(org.hl7.fhir.dstu2016may.model.Reference src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Reference tgt = new org.hl7.fhir.r4.model.Reference(); copyElement(src, tgt); if (src.hasReference()) tgt.setReference(src.getReference()); if (src.hasDisplay()) tgt.setDisplay(src.getDisplay()); return tgt; }
b.setIdBase(id); return new Reference().setReference(b.fhirType()+"/"+id);
else if (value instanceof StringType) { Reference r = new Reference(); r.setReference(((StringType) value).asStringValue());
/** * Convenience setter which sets the reference to the complete {@link IIdType#getValue() value} of the given * reference. * * @param theReference The reference, or <code>null</code> * @return * @return Returns a reference to this */ public Reference setReferenceElement(IIdType theReference) { if (theReference != null) { setReference(theReference.getValue()); } else { setReference(null); } return this; } protected void listChildren(List<Property> children) {
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 Reference castToReference(Base b) throws FHIRException { if (b instanceof Reference) return (Reference) b; else if (b.isPrimitive() && Utilities.isURL(b.primitiveValue())) return new Reference().setReference(b.primitiveValue()); else if (b instanceof org.hl7.fhir.r4.elementmodel.Element && b.fhirType().equals("Reference")) { org.hl7.fhir.r4.elementmodel.Element e = (org.hl7.fhir.r4.elementmodel.Element) b; return new Reference().setReference(e.getChildValue("reference")).setDisplay(e.getChildValue("display")); } else throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Reference"); }
public static Reference readAsReference(Element item) { Reference r = new Reference(); r.setDisplay(item.getNamedChildValue("display")); r.setReference(item.getNamedChildValue("reference")); r.setType(item.getNamedChildValue("type")); List<Element> identifier = item.getChildrenByName("identifier"); if (identifier.isEmpty() == false) { r.setIdentifier(readAsIdentifier(identifier.get(0))); } return r; }
public org.hl7.fhir.r4.model.Reference convertReference(org.hl7.fhir.instance.model.Reference src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Reference tgt = new org.hl7.fhir.r4.model.Reference(); copyElement(src, tgt); tgt.setReference(src.getReference()); tgt.setDisplay(src.getDisplay()); return tgt; }
public static org.hl7.fhir.r4.model.Reference convertReference(org.hl7.fhir.dstu2016may.model.Reference src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Reference tgt = new org.hl7.fhir.r4.model.Reference(); copyElement(src, tgt); if (src.hasReference()) tgt.setReference(src.getReference()); if (src.hasDisplay()) tgt.setDisplay(src.getDisplay()); return tgt; }
b.setIdBase(id); return new Reference().setReference(b.fhirType()+"/"+id);
else if (value instanceof StringType) { Reference r = new Reference(); r.setReference(((StringType) value).asStringValue());