annotate OrthancServer/Sources/Database/ResourcesContent.h @ 5653:5e99cf9eebcf Orthanc-1.12.4

Orthanc-1.12.4
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 05 Jun 2024 17:44:48 +0200
parents f7adfb22e20e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
5640
f7adfb22e20e updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5485
diff changeset
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
f7adfb22e20e updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5485
diff changeset
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
5485
48b8dae6dc77 upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5215
diff changeset
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 *
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * This program is free software: you can redistribute it and/or
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * modify it under the terms of the GNU General Public License as
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * published by the Free Software Foundation, either version 3 of the
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * License, or (at your option) any later version.
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 *
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful, but
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * General Public License for more details.
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 *
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 **/
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #pragma once
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
26 #include "../../../OrthancFramework/Sources/DicomFormat/DicomMap.h"
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 #include "../ServerEnumerations.h"
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 #include <boost/noncopyable.hpp>
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 #include <list>
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
3099
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
32
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 namespace Orthanc
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 {
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 namespace Compatibility
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 {
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 class ISetResourcesContent;
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 }
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 class ResourcesContent : public boost::noncopyable
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 {
3099
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
42 public:
5215
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
43 class TagValue
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 {
5215
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
45 private:
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 int64_t resourceId_;
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 bool isIdentifier_;
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 DicomTag tag_;
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 std::string value_;
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50
5215
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
51 public:
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 TagValue(int64_t resourceId,
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 bool isIdentifier,
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 const DicomTag& tag,
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 const std::string& value) :
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 resourceId_(resourceId),
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 isIdentifier_(isIdentifier),
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 tag_(tag),
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 value_(value)
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 {
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 }
5215
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
62
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
63 int64_t GetResourceId() const
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
64 {
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
65 return resourceId_;
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
66 }
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
67
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
68 bool IsIdentifier() const
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
69 {
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
70 return isIdentifier_;
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
71 }
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
72
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
73 const DicomTag& GetTag() const
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
74 {
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
75 return tag_;
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
76 }
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
77
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
78 const std::string& GetValue() const
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
79 {
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
80 return value_;
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
81 }
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 };
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83
5215
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
84 class Metadata
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 {
5215
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
86 private:
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 int64_t resourceId_;
5215
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
88 MetadataType type_;
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 std::string value_;
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90
5215
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
91 public:
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 Metadata(int64_t resourceId,
5215
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
93 MetadataType type,
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 const std::string& value) :
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 resourceId_(resourceId),
5215
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
96 type_(type),
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 value_(value)
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 {
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 }
5215
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
100
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
101 int64_t GetResourceId() const
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
102 {
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
103 return resourceId_;
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
104 }
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
105
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
106 MetadataType GetType() const
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
107 {
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
108 return type_;
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
109 }
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
110
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
111 const std::string& GetValue() const
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
112 {
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
113 return value_;
8b6da4fdf9fe cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
114 }
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 };
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116
3099
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
117 typedef std::list<TagValue> ListTags;
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
118 typedef std::list<Metadata> ListMetadata;
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
119
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
120 private:
4623
95ffe3b6ef7c handling of revisions for metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
121 bool isNewResource_;
3099
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
122 ListTags tags_;
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
123 ListMetadata metadata_;
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 public:
4623
95ffe3b6ef7c handling of revisions for metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
126 explicit ResourcesContent(bool isNewResource) :
95ffe3b6ef7c handling of revisions for metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
127 isNewResource_(isNewResource)
95ffe3b6ef7c handling of revisions for metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
128 {
95ffe3b6ef7c handling of revisions for metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
129 }
95ffe3b6ef7c handling of revisions for metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
130
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 void AddMainDicomTag(int64_t resourceId,
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 const DicomTag& tag,
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 const std::string& value)
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 {
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 tags_.push_back(TagValue(resourceId, false, tag, value));
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 }
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 void AddIdentifierTag(int64_t resourceId,
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 const DicomTag& tag,
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 const std::string& value)
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 {
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 tags_.push_back(TagValue(resourceId, true, tag, value));
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 }
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 void AddMetadata(int64_t resourceId,
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 MetadataType metadata,
4623
95ffe3b6ef7c handling of revisions for metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
147 const std::string& value);
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 void AddResource(int64_t resource,
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 ResourceType level,
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 const DicomMap& dicomSummary);
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 // WARNING: The database should be locked with a transaction!
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 void Store(Compatibility::ISetResourcesContent& target) const;
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155
3099
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
156 const ListTags& GetListTags() const
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
157 {
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
158 return tags_;
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
159 }
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
160
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
161 const ListMetadata& GetListMetadata() const
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
162 {
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
163 return metadata_;
9c71abbff70f removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3094
diff changeset
164 }
3094
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 };
61da3c9b4121 cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 }