public static org.hl7.fhir.dstu2016may.model.Attachment convertAttachment(org.hl7.fhir.r4.model.Attachment src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Attachment tgt = new org.hl7.fhir.dstu2016may.model.Attachment(); copyElement(src, tgt); if (src.hasContentType()) tgt.setContentType(src.getContentType()); if (src.hasLanguage()) tgt.setLanguage(src.getLanguage()); if (src.hasData()) tgt.setData(src.getData()); if (src.hasUrl()) tgt.setUrl(src.getUrl()); if (src.hasSize()) tgt.setSize(src.getSize()); if (src.hasHash()) tgt.setHash(src.getHash()); if (src.hasTitle()) tgt.setTitle(src.getTitle()); if (src.hasCreation()) tgt.setCreation(src.getCreation()); return tgt; }
public Attachment addPresentedForm() { //3 Attachment t = new Attachment(); if (this.presentedForm == null) this.presentedForm = new ArrayList<Attachment>(); this.presentedForm.add(t); return t; }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -389131437: return getContentTypeElement(); case -1613589672: return getLanguageElement(); case 3076010: return getDataElement(); case 116079: return getUrlElement(); case 3530753: return getSizeElement(); case 3195150: return getHashElement(); case 110371416: return getTitleElement(); case 1820421855: return getCreationElement(); default: return super.makeProperty(hash, name); } }
public org.hl7.fhir.instance.model.Attachment convertAttachment(org.hl7.fhir.r4.model.Attachment src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Attachment tgt = new org.hl7.fhir.instance.model.Attachment(); copyElement(src, tgt); tgt.setContentType(src.getContentType()); tgt.setLanguage(src.getLanguage()); tgt.setData(src.getData()); tgt.setUrl(src.getUrl()); tgt.setSize(src.getSize()); tgt.setHash(src.getHash()); tgt.setTitle(src.getTitle()); tgt.setCreation(src.getCreation()); return tgt; }
public org.hl7.fhir.r4.model.Attachment convertAttachment(org.hl7.fhir.instance.model.Attachment src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Attachment tgt = new org.hl7.fhir.r4.model.Attachment(); copyElement(src, tgt); tgt.setContentType(src.getContentType()); tgt.setLanguage(src.getLanguage()); tgt.setData(src.getData()); tgt.setUrl(src.getUrl()); tgt.setSize(src.getSize()); tgt.setHash(src.getHash()); tgt.setTitle(src.getTitle()); tgt.setCreation(src.getCreation()); return tgt; }
@Override public String getFilename() { return nextPackage.getUrl(); }
public Attachment copy() { Attachment dst = new Attachment(); copyValues(dst); dst.contentType = contentType == null ? null : contentType.copy(); dst.language = language == null ? null : language.copy(); dst.data = data == null ? null : data.copy(); dst.url = url == null ? null : url.copy(); dst.size = size == null ? null : size.copy(); dst.hash = hash == null ? null : hash.copy(); dst.title = title == null ? null : title.copy(); dst.creation = creation == null ? null : creation.copy(); return dst; }
@Override public InputStream getInputStream() { return new ByteArrayInputStream(nextPackage.getData()); } });
public org.hl7.fhir.instance.model.Attachment convertAttachment(org.hl7.fhir.r4.model.Attachment src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Attachment tgt = new org.hl7.fhir.instance.model.Attachment(); copyElement(src, tgt); tgt.setContentType(src.getContentType()); tgt.setLanguage(src.getLanguage()); tgt.setData(src.getData()); tgt.setUrl(src.getUrl()); tgt.setSize(src.getSize()); tgt.setHash(src.getHash()); tgt.setTitle(src.getTitle()); tgt.setCreation(src.getCreation()); return tgt; }
public static org.hl7.fhir.r4.model.Attachment convertAttachment(org.hl7.fhir.dstu2016may.model.Attachment src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Attachment tgt = new org.hl7.fhir.r4.model.Attachment(); copyElement(src, tgt); if (src.hasContentType()) tgt.setContentType(src.getContentType()); if (src.hasLanguage()) tgt.setLanguage(src.getLanguage()); if (src.hasData()) tgt.setData(src.getData()); if (src.hasUrl()) tgt.setUrl(src.getUrl()); if (src.hasSize()) tgt.setSize(src.getSize()); if (src.hasHash()) tgt.setHash(src.getHash()); if (src.hasTitle()) tgt.setTitle(src.getTitle()); if (src.hasCreation()) tgt.setCreation(src.getCreation()); return tgt; }
if (isBlank(nextPackage.getUrl())) { throw new UnprocessableEntityException("Package is missing mandatory url element");
@Override public InputStream getInputStream() { return new ByteArrayInputStream(nextPackage.getData()); } });
private void checkAttachment(List<ValidationMessage> errors, String path, Element focus, Attachment fixed) { checkFixedValue(errors, path + ".contentType", focus.getNamedChild("contentType"), fixed.getContentTypeElement(), "contentType", focus); checkFixedValue(errors, path + ".language", focus.getNamedChild("language"), fixed.getLanguageElement(), "language", focus); checkFixedValue(errors, path + ".data", focus.getNamedChild("data"), fixed.getDataElement(), "data", focus); checkFixedValue(errors, path + ".url", focus.getNamedChild("url"), fixed.getUrlElement(), "url", focus); checkFixedValue(errors, path + ".size", focus.getNamedChild("size"), fixed.getSizeElement(), "size", focus); checkFixedValue(errors, path + ".hash", focus.getNamedChild("hash"), fixed.getHashElement(), "hash", focus); checkFixedValue(errors, path + ".title", focus.getNamedChild("title"), fixed.getTitleElement(), "title", focus); }
public static org.hl7.fhir.dstu2016may.model.Attachment convertAttachment(org.hl7.fhir.r4.model.Attachment src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Attachment tgt = new org.hl7.fhir.dstu2016may.model.Attachment(); copyElement(src, tgt); if (src.hasContentType()) tgt.setContentType(src.getContentType()); if (src.hasLanguage()) tgt.setLanguage(src.getLanguage()); if (src.hasData()) tgt.setData(src.getData()); if (src.hasUrl()) tgt.setUrl(src.getUrl()); if (src.hasSize()) tgt.setSize(src.getSize()); if (src.hasHash()) tgt.setHash(src.getHash()); if (src.hasTitle()) tgt.setTitle(src.getTitle()); if (src.hasCreation()) tgt.setCreation(src.getCreation()); return tgt; }
public Attachment addImage() { //3 Attachment t = new Attachment(); if (this.image == null) this.image = new ArrayList<Attachment>(); this.image.add(t); return t; }
@Override public String getFilename() { return nextPackage.getUrl(); }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -389131437: return getContentTypeElement(); case -1613589672: return getLanguageElement(); case 3076010: return getDataElement(); case 116079: return getUrlElement(); case 3530753: return getSizeElement(); case 3195150: return getHashElement(); case 110371416: return getTitleElement(); case 1820421855: return getCreationElement(); default: return super.makeProperty(hash, name); } }
public Attachment addPhoto() { //3 Attachment t = new Attachment(); if (this.photo == null) this.photo = new ArrayList<Attachment>(); this.photo.add(t); return t; }
DocumentReference dr = (DocumentReference) resource; for (DocumentReference.DocumentReferenceContentComponent content : dr.getContent()) { expectedBinaryFullUrls.add(content.getAttachment().getUrl());
private void checkAttachment(List<ValidationMessage> errors, String path, Element focus, Attachment fixed) { checkFixedValue(errors, path + ".contentType", focus.getNamedChild("contentType"), fixed.getContentTypeElement(), "contentType", focus); checkFixedValue(errors, path + ".language", focus.getNamedChild("language"), fixed.getLanguageElement(), "language", focus); checkFixedValue(errors, path + ".data", focus.getNamedChild("data"), fixed.getDataElement(), "data", focus); checkFixedValue(errors, path + ".url", focus.getNamedChild("url"), fixed.getUrlElement(), "url", focus); checkFixedValue(errors, path + ".size", focus.getNamedChild("size"), fixed.getSizeElement(), "size", focus); checkFixedValue(errors, path + ".hash", focus.getNamedChild("hash"), fixed.getHashElement(), "hash", focus); checkFixedValue(errors, path + ".title", focus.getNamedChild("title"), fixed.getTitleElement(), "title", focus); }