Mercurial > hg > orthanc
comparison OrthancServer/Plugins/Engine/OrthancPluginDatabase.cpp @ 5215:8b6da4fdf9fe db-protobuf
cleaning ResourcesContent::TagValue and ResourcesContent::Metadata
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 03 Apr 2023 14:17:39 +0200 |
parents | 055428d92772 |
children | 450ac804d3af |
comparison
equal
deleted
inserted
replaced
5214:a9d00b17a48e | 5215:8b6da4fdf9fe |
---|---|
823 } | 823 } |
824 | 824 |
825 std::list<std::string> tmp; | 825 std::list<std::string> tmp; |
826 GetAllPublicIds(tmp, resourceType); | 826 GetAllPublicIds(tmp, resourceType); |
827 | 827 |
828 if (tmp.size() <= since) | 828 if (tmp.size() <= static_cast<size_t>(since)) |
829 { | 829 { |
830 // Not enough results => empty answer | 830 // Not enough results => empty answer |
831 return; | 831 return; |
832 } | 832 } |
833 | 833 |
1360 | 1360 |
1361 for (ResourcesContent::ListTags::const_iterator | 1361 for (ResourcesContent::ListTags::const_iterator |
1362 it = content.GetListTags().begin(); it != content.GetListTags().end(); ++it) | 1362 it = content.GetListTags().begin(); it != content.GetListTags().end(); ++it) |
1363 { | 1363 { |
1364 OrthancPluginResourcesContentTags tmp; | 1364 OrthancPluginResourcesContentTags tmp; |
1365 tmp.resource = it->resourceId_; | 1365 tmp.resource = it->GetResourceId(); |
1366 tmp.group = it->tag_.GetGroup(); | 1366 tmp.group = it->GetTag().GetGroup(); |
1367 tmp.element = it->tag_.GetElement(); | 1367 tmp.element = it->GetTag().GetElement(); |
1368 tmp.value = it->value_.c_str(); | 1368 tmp.value = it->GetValue().c_str(); |
1369 | 1369 |
1370 if (it->isIdentifier_) | 1370 if (it->IsIdentifier()) |
1371 { | 1371 { |
1372 identifierTags.push_back(tmp); | 1372 identifierTags.push_back(tmp); |
1373 } | 1373 } |
1374 else | 1374 else |
1375 { | 1375 { |
1379 | 1379 |
1380 for (ResourcesContent::ListMetadata::const_iterator | 1380 for (ResourcesContent::ListMetadata::const_iterator |
1381 it = content.GetListMetadata().begin(); it != content.GetListMetadata().end(); ++it) | 1381 it = content.GetListMetadata().begin(); it != content.GetListMetadata().end(); ++it) |
1382 { | 1382 { |
1383 OrthancPluginResourcesContentMetadata tmp; | 1383 OrthancPluginResourcesContentMetadata tmp; |
1384 tmp.resource = it->resourceId_; | 1384 tmp.resource = it->GetResourceId(); |
1385 tmp.metadata = it->metadata_; | 1385 tmp.metadata = it->GetType(); |
1386 tmp.value = it->value_.c_str(); | 1386 tmp.value = it->GetValue().c_str(); |
1387 metadata.push_back(tmp); | 1387 metadata.push_back(tmp); |
1388 } | 1388 } |
1389 | 1389 |
1390 assert(identifierTags.size() + mainDicomTags.size() == content.GetListTags().size() && | 1390 assert(identifierTags.size() + mainDicomTags.size() == content.GetListTags().size() && |
1391 metadata.size() == content.GetListMetadata().size()); | 1391 metadata.size() == content.GetListMetadata().size()); |