1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.openehealth.ipf.commons.ihe.xds.core.responses;
17
18 import lombok.EqualsAndHashCode;
19 import lombok.Getter;
20 import lombok.Setter;
21 import lombok.ToString;
22 import org.openehealth.ipf.commons.ihe.xds.core.requests.DocumentReference;
23
24 import javax.activation.DataHandler;
25 import javax.xml.bind.annotation.XmlAccessType;
26 import javax.xml.bind.annotation.XmlAccessorType;
27 import javax.xml.bind.annotation.XmlElementRef;
28 import javax.xml.bind.annotation.XmlRootElement;
29 import javax.xml.bind.annotation.XmlType;
30 import java.io.Serializable;
31
32
33
34
35
36
37
38 @XmlAccessorType(XmlAccessType.FIELD)
39 @XmlType(name = "RetrievedDocument", propOrder = {"requestData", "mimeType", "newRepositoryUniqueId",
40 "newDocumentUniqueId"})
41 @XmlRootElement(name = "retrievedDocument")
42 @EqualsAndHashCode(doNotUseGetters = true)
43 @ToString(doNotUseGetters = true)
44 public class RetrievedDocument implements Serializable {
45 private static final long serialVersionUID = -3950026651885804263L;
46
47 @Getter @Setter private transient DataHandler dataHandler;
48 @XmlElementRef
49 @Getter @Setter private DocumentReference requestData;
50 @Getter @Setter private String mimeType;
51 @Getter @Setter private String newRepositoryUniqueId;
52 @Getter @Setter private String newDocumentUniqueId;
53
54
55
56
57 public RetrievedDocument() {}
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76 public RetrievedDocument(
77 DataHandler dataHandler,
78 DocumentReference requestData,
79 String newRepositoryUniqueId,
80 String newDocumentUniqueId,
81 String mimeType)
82 {
83 this.dataHandler = dataHandler;
84 this.requestData = requestData;
85 this.newRepositoryUniqueId = newRepositoryUniqueId;
86 this.newDocumentUniqueId = newDocumentUniqueId;
87 this.mimeType = mimeType;
88 }
89
90 }