Mercurial > hg > orthanc
annotate OrthancServer/Sources/Database/FindRequest.cpp @ 5856:d1dea8ad74a6 find-refactoring
implement StorageAccessOnFind for answers
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 04 Nov 2024 21:51:24 +0100 |
parents | 7030fa489669 |
children |
rev | line source |
---|---|
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
5641
3f13db27b399
integration mainline->find-refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5621
diff
changeset
|
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
3f13db27b399
integration mainline->find-refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5621
diff
changeset
|
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 * |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 * This program is free software: you can redistribute it and/or |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 * modify it under the terms of the GNU General Public License as |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * published by the Free Software Foundation, either version 3 of the |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * License, or (at your option) any later version. |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 * This program is distributed in the hope that it will be useful, but |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 * WITHOUT ANY WARRANTY; without even the implied warranty of |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 * General Public License for more details. |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 * |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 * You should have received a copy of the GNU General Public License |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 **/ |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 #include "FindRequest.h" |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 #include "../../../OrthancFramework/Sources/OrthancException.h" |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 |
5614
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5610
diff
changeset
|
28 #include "MainDicomTagsRegistry.h" |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 #include <cassert> |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 |
5614
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5610
diff
changeset
|
32 |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 namespace Orthanc |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 { |
5676
b744a2cf408a
shorten ParentRetrieveSpecification/ChildrenRetrieveSpecification as ParentSpecification/ChildrenSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5674
diff
changeset
|
35 FindRequest::ParentSpecification& FindRequest::GetParentSpecification(ResourceType level) |
5619
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
36 { |
5697 | 37 if (!IsResourceLevelAboveOrEqual(level, level_) || |
38 level == level_) | |
5619
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
39 { |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
40 throw OrthancException(ErrorCode_ParameterOutOfRange); |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
41 } |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
42 |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
43 switch (level) |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
44 { |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
45 case ResourceType_Patient: |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
46 return retrieveParentPatient_; |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
47 |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
48 case ResourceType_Study: |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
49 return retrieveParentStudy_; |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
50 |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
51 case ResourceType_Series: |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
52 return retrieveParentSeries_; |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
53 |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
54 default: |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
55 throw OrthancException(ErrorCode_ParameterOutOfRange); |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
56 } |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
57 } |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
58 |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
59 |
5676
b744a2cf408a
shorten ParentRetrieveSpecification/ChildrenRetrieveSpecification as ParentSpecification/ChildrenSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5674
diff
changeset
|
60 FindRequest::ChildrenSpecification& FindRequest::GetChildrenSpecification(ResourceType level) |
5621
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
61 { |
5697 | 62 if (!IsResourceLevelAboveOrEqual(level_, level) || |
63 level == level_) | |
5621
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
64 { |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
65 throw OrthancException(ErrorCode_ParameterOutOfRange); |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
66 } |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
67 |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
68 switch (level) |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
69 { |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
70 case ResourceType_Study: |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
71 return retrieveChildrenStudies_; |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
72 |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
73 case ResourceType_Series: |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
74 return retrieveChildrenSeries_; |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
75 |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
76 case ResourceType_Instance: |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
77 return retrieveChildrenInstances_; |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
78 |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
79 default: |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
80 throw OrthancException(ErrorCode_ParameterOutOfRange); |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
81 } |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
82 } |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
83 |
732ec9feeea8
introduction of FindRequest::ChildrenRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5619
diff
changeset
|
84 |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
85 FindRequest::FindRequest(ResourceType level) : |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
86 level_(level), |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
87 hasLimits_(false), |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
88 limitsSince_(0), |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
89 limitsCount_(0), |
5677
dc96401dbe88
starting the refactoring of /tools/find
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5676
diff
changeset
|
90 labelsConstraint_(LabelsConstraint_All), |
5619
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
91 retrieveMainDicomTags_(false), |
1864b16bc7b1
added FindRequest::ParentRetrieveSpecification
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5614
diff
changeset
|
92 retrieveMetadata_(false), |
5590
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
93 retrieveLabels_(false), |
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
94 retrieveAttachments_(false), |
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
95 retrieveParentIdentifier_(false), |
5772
093a8693ba16
replaced SetRetrieveOneInstanceIdentifier() by SetRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5697
diff
changeset
|
96 retrieveOneInstanceMetadataAndAttachments_(false) |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
98 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
100 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
101 FindRequest::~FindRequest() |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
102 { |
5828 | 103 for (std::deque<Ordering*>::iterator it = ordering_.begin(); it != ordering_.end(); ++it) |
104 { | |
105 assert(*it != NULL); | |
106 delete *it; | |
107 } | |
5567
f3562c1a150d
FindRequest: group metadata and tag constrains in a single class, allow ordering against metadata
Alain Mazy <am@orthanc.team>
parents:
5565
diff
changeset
|
108 |
5828 | 109 for (std::deque<DatabaseMetadataConstraint*>::iterator it = metadataConstraints_.begin(); it != metadataConstraints_.end(); ++it) |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
110 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
111 assert(*it != NULL); |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
112 delete *it; |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
113 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
114 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
115 |
5609
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
116 |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
117 void FindRequest::SetOrthancId(ResourceType level, |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
118 const std::string& id) |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
119 { |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
120 switch (level) |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
121 { |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
122 case ResourceType_Patient: |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
123 SetOrthancPatientId(id); |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
124 break; |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
125 |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
126 case ResourceType_Study: |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
127 SetOrthancStudyId(id); |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
128 break; |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
129 |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
130 case ResourceType_Series: |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
131 SetOrthancSeriesId(id); |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
132 break; |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
133 |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
134 case ResourceType_Instance: |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
135 SetOrthancInstanceId(id); |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
136 break; |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
137 |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
138 default: |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
139 throw OrthancException(ErrorCode_ParameterOutOfRange); |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
140 } |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
141 } |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
142 |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
143 |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
144 void FindRequest::SetOrthancPatientId(const std::string& id) |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
145 { |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
146 orthancIdentifiers_.SetPatientId(id); |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
147 } |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
148 |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
149 |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
150 void FindRequest::SetOrthancStudyId(const std::string& id) |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
151 { |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
152 if (level_ == ResourceType_Patient) |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
153 { |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
154 throw OrthancException(ErrorCode_BadSequenceOfCalls); |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
155 } |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
156 else |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
157 { |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
158 orthancIdentifiers_.SetStudyId(id); |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
159 } |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
160 } |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
161 |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
162 |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
163 void FindRequest::SetOrthancSeriesId(const std::string& id) |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
164 { |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
165 if (level_ == ResourceType_Patient || |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
166 level_ == ResourceType_Study) |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
167 { |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
168 throw OrthancException(ErrorCode_BadSequenceOfCalls); |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
169 } |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
170 else |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
171 { |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
172 orthancIdentifiers_.SetSeriesId(id); |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
173 } |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
174 } |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
175 |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
176 |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
177 void FindRequest::SetOrthancInstanceId(const std::string& id) |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
178 { |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
179 if (level_ == ResourceType_Patient || |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
180 level_ == ResourceType_Study || |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
181 level_ == ResourceType_Series) |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
182 { |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
183 throw OrthancException(ErrorCode_BadSequenceOfCalls); |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
184 } |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
185 else |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
186 { |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
187 orthancIdentifiers_.SetInstanceId(id); |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
188 } |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
189 } |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
190 |
4690a0d2b01e
preliminary support of requestedTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5596
diff
changeset
|
191 |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
192 void FindRequest::SetLimits(uint64_t since, |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
193 uint64_t count) |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
194 { |
5688
d0a264b803f1
first implementation of database paging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5681
diff
changeset
|
195 hasLimits_ = true; |
d0a264b803f1
first implementation of database paging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5681
diff
changeset
|
196 limitsSince_ = since; |
d0a264b803f1
first implementation of database paging
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5681
diff
changeset
|
197 limitsCount_ = count; |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
198 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
199 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
200 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
201 uint64_t FindRequest::GetLimitsSince() const |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
202 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
203 if (hasLimits_) |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
204 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
205 return limitsSince_; |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
206 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
207 else |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
208 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
209 throw OrthancException(ErrorCode_BadSequenceOfCalls); |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
210 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
211 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
212 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
213 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
214 uint64_t FindRequest::GetLimitsCount() const |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
215 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
216 if (hasLimits_) |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
217 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
218 return limitsCount_; |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
219 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
220 else |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
221 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
222 throw OrthancException(ErrorCode_BadSequenceOfCalls); |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
223 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
224 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
225 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
226 |
5567
f3562c1a150d
FindRequest: group metadata and tag constrains in a single class, allow ordering against metadata
Alain Mazy <am@orthanc.team>
parents:
5565
diff
changeset
|
227 void FindRequest::AddOrdering(const DicomTag& tag, |
f3562c1a150d
FindRequest: group metadata and tag constrains in a single class, allow ordering against metadata
Alain Mazy <am@orthanc.team>
parents:
5565
diff
changeset
|
228 OrderingDirection direction) |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
229 { |
5567
f3562c1a150d
FindRequest: group metadata and tag constrains in a single class, allow ordering against metadata
Alain Mazy <am@orthanc.team>
parents:
5565
diff
changeset
|
230 ordering_.push_back(new Ordering(Key(tag), direction)); |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
231 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
232 |
5592
1e2631b8b9af
GenericFind::Execute() is working for a basic request
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5590
diff
changeset
|
233 |
5567
f3562c1a150d
FindRequest: group metadata and tag constrains in a single class, allow ordering against metadata
Alain Mazy <am@orthanc.team>
parents:
5565
diff
changeset
|
234 void FindRequest::AddOrdering(MetadataType metadataType, |
f3562c1a150d
FindRequest: group metadata and tag constrains in a single class, allow ordering against metadata
Alain Mazy <am@orthanc.team>
parents:
5565
diff
changeset
|
235 OrderingDirection direction) |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
236 { |
5567
f3562c1a150d
FindRequest: group metadata and tag constrains in a single class, allow ordering against metadata
Alain Mazy <am@orthanc.team>
parents:
5565
diff
changeset
|
237 ordering_.push_back(new Ordering(Key(metadataType), direction)); |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
238 } |
5567
f3562c1a150d
FindRequest: group metadata and tag constrains in a single class, allow ordering against metadata
Alain Mazy <am@orthanc.team>
parents:
5565
diff
changeset
|
239 |
5590
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
240 |
5828 | 241 void FindRequest::AddMetadataConstraint(DatabaseMetadataConstraint* constraint) |
242 { | |
243 metadataConstraints_.push_back(constraint); | |
244 } | |
245 | |
246 | |
5590
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
247 void FindRequest::SetRetrieveParentIdentifier(bool retrieve) |
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
248 { |
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
249 if (level_ == ResourceType_Patient) |
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
250 { |
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
251 throw OrthancException(ErrorCode_BadParameterType); |
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
252 } |
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
253 else |
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
254 { |
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
255 retrieveParentIdentifier_ = retrieve; |
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
256 } |
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
257 } |
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
258 |
8b32213af23e
replaced FindRequest::ResponseContent by booleans
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
259 |
5772
093a8693ba16
replaced SetRetrieveOneInstanceIdentifier() by SetRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5697
diff
changeset
|
260 void FindRequest::SetRetrieveOneInstanceMetadataAndAttachments(bool retrieve) |
5610
d4b570834d3a
adding safeguards around FindRequest::SetRetrieveOneInstanceIdentifier()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5609
diff
changeset
|
261 { |
d4b570834d3a
adding safeguards around FindRequest::SetRetrieveOneInstanceIdentifier()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5609
diff
changeset
|
262 if (level_ == ResourceType_Instance) |
d4b570834d3a
adding safeguards around FindRequest::SetRetrieveOneInstanceIdentifier()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5609
diff
changeset
|
263 { |
d4b570834d3a
adding safeguards around FindRequest::SetRetrieveOneInstanceIdentifier()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5609
diff
changeset
|
264 throw OrthancException(ErrorCode_BadSequenceOfCalls); |
d4b570834d3a
adding safeguards around FindRequest::SetRetrieveOneInstanceIdentifier()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5609
diff
changeset
|
265 } |
d4b570834d3a
adding safeguards around FindRequest::SetRetrieveOneInstanceIdentifier()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5609
diff
changeset
|
266 else |
d4b570834d3a
adding safeguards around FindRequest::SetRetrieveOneInstanceIdentifier()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5609
diff
changeset
|
267 { |
5772
093a8693ba16
replaced SetRetrieveOneInstanceIdentifier() by SetRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5697
diff
changeset
|
268 retrieveOneInstanceMetadataAndAttachments_ = retrieve; |
093a8693ba16
replaced SetRetrieveOneInstanceIdentifier() by SetRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5697
diff
changeset
|
269 } |
093a8693ba16
replaced SetRetrieveOneInstanceIdentifier() by SetRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5697
diff
changeset
|
270 } |
093a8693ba16
replaced SetRetrieveOneInstanceIdentifier() by SetRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5697
diff
changeset
|
271 |
093a8693ba16
replaced SetRetrieveOneInstanceIdentifier() by SetRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5697
diff
changeset
|
272 |
093a8693ba16
replaced SetRetrieveOneInstanceIdentifier() by SetRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5697
diff
changeset
|
273 bool FindRequest::IsRetrieveOneInstanceMetadataAndAttachments() const |
093a8693ba16
replaced SetRetrieveOneInstanceIdentifier() by SetRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5697
diff
changeset
|
274 { |
5778
f679ae844839
revert change to FindRequest::IsRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5776
diff
changeset
|
275 if (level_ == ResourceType_Instance) |
f679ae844839
revert change to FindRequest::IsRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5776
diff
changeset
|
276 { |
f679ae844839
revert change to FindRequest::IsRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5776
diff
changeset
|
277 throw OrthancException(ErrorCode_BadSequenceOfCalls); |
f679ae844839
revert change to FindRequest::IsRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5776
diff
changeset
|
278 } |
f679ae844839
revert change to FindRequest::IsRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5776
diff
changeset
|
279 else |
f679ae844839
revert change to FindRequest::IsRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5776
diff
changeset
|
280 { |
f679ae844839
revert change to FindRequest::IsRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5776
diff
changeset
|
281 return retrieveOneInstanceMetadataAndAttachments_; |
f679ae844839
revert change to FindRequest::IsRetrieveOneInstanceMetadataAndAttachments()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5776
diff
changeset
|
282 } |
5610
d4b570834d3a
adding safeguards around FindRequest::SetRetrieveOneInstanceIdentifier()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5609
diff
changeset
|
283 } |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
284 } |