1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.openehealth.ipf.commons.ihe.xds.core.requests;
17
18 import static org.apache.commons.lang3.Validate.notNull;
19
20 import lombok.EqualsAndHashCode;
21 import lombok.Getter;
22 import lombok.Setter;
23 import lombok.ToString;
24 import org.openehealth.ipf.commons.ihe.xds.core.requests.query.*;
25
26 import javax.xml.bind.annotation.*;
27 import java.io.Serializable;
28
29
30
31
32
33 @XmlAccessorType(XmlAccessType.FIELD)
34 @XmlType(name = "QueryRegistry")
35 @XmlRootElement(name = "queryRegistry")
36 @EqualsAndHashCode(doNotUseGetters = true)
37 @ToString(doNotUseGetters = true)
38 public class QueryRegistry implements Serializable {
39 private static final long serialVersionUID = -7089029668323133489L;
40
41 @XmlElementRefs({
42 @XmlElementRef(type = FetchQuery.class),
43 @XmlElementRef(type = FindDocumentsByReferenceIdQuery.class),
44 @XmlElementRef(type = FindDocumentsForMultiplePatientsQuery.class),
45 @XmlElementRef(type = FindDocumentsQuery.class),
46 @XmlElementRef(type = FindFoldersForMultiplePatientsQuery.class),
47 @XmlElementRef(type = FindFoldersQuery.class),
48 @XmlElementRef(type = FindSubmissionSetsQuery.class),
49 @XmlElementRef(type = GetAllQuery.class),
50 @XmlElementRef(type = GetAssociationsQuery.class),
51 @XmlElementRef(type = GetDocumentsAndAssociationsQuery.class),
52 @XmlElementRef(type = GetDocumentsQuery.class),
53 @XmlElementRef(type = GetFolderAndContentsQuery.class),
54 @XmlElementRef(type = GetFoldersForDocumentQuery.class),
55 @XmlElementRef(type = GetFoldersQuery.class),
56 @XmlElementRef(type = GetRelatedDocumentsQuery.class),
57 @XmlElementRef(type = GetSubmissionSetAndContentsQuery.class),
58 @XmlElementRef(type = GetSubmissionSetsQuery.class)})
59
60 @Getter private Query query;
61 @XmlAttribute
62 @Getter @Setter private QueryReturnType returnType = QueryReturnType.OBJECT_REF;
63
64
65
66
67 public QueryRegistry() {
68 }
69
70
71
72
73
74
75 public QueryRegistry(Query query) {
76 notNull(query, "query cannot be null");
77 this.query = query;
78 }
79
80 }