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.ToString;
20
21 import javax.xml.bind.annotation.XmlAccessType;
22 import javax.xml.bind.annotation.XmlAccessorType;
23 import javax.xml.bind.annotation.XmlElementRef;
24 import javax.xml.bind.annotation.XmlRootElement;
25 import javax.xml.bind.annotation.XmlType;
26 import java.io.Serializable;
27 import java.util.ArrayList;
28 import java.util.List;
29
30
31
32
33
34
35
36 @XmlAccessorType(XmlAccessType.FIELD)
37 @XmlType(name = "RetrievedDocumentSet")
38 @XmlRootElement(name = "retrievedDocumentSet")
39 @EqualsAndHashCode(callSuper = true, doNotUseGetters = true)
40 @ToString(callSuper = true, doNotUseGetters = true)
41 public class RetrievedDocumentSet extends Response implements Serializable {
42 private static final long serialVersionUID = 4389321453383292730L;
43
44 @XmlElementRef
45 private final List<RetrievedDocument> documents = new ArrayList<>();
46
47
48
49
50 public RetrievedDocumentSet() {}
51
52
53
54
55
56
57 public RetrievedDocumentSet(Status status) {
58 super(status);
59 }
60
61
62
63
64
65
66
67
68 public RetrievedDocumentSet(Status status, List<RetrievedDocument> documents) {
69 super(status);
70 this.documents.addAll(documents);
71 }
72
73
74
75
76
77
78
79
80
81
82
83
84 public RetrievedDocumentSet(
85 Throwable throwable,
86 ErrorCode defaultMetaDataError,
87 ErrorCode defaultError,
88 String location) {
89 super(throwable, defaultMetaDataError, defaultError, location);
90 }
91
92
93
94
95 public List<RetrievedDocument> getDocuments() {
96 return documents;
97 }
98
99 }