annotate OrthancServer/Sources/Database/ResourcesContent.h @ 5432:59e3b6f8c5be

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