# HG changeset patch # User Sebastien Jodogne # Date 1734344715 -3600 # Node ID ce2a754600ef705cd1b3868b60127cf9ae24ae9e # Parent beb8c5b81925c34cbbcf508ab431b543cd500e22 simplification by removing MultipleTags and MultipleMetadata in protobuf diff -r beb8c5b81925 -r ce2a754600ef Framework/Plugins/IndexBackend.cpp --- a/Framework/Plugins/IndexBackend.cpp Thu Dec 12 17:58:26 2024 +0100 +++ b/Framework/Plugins/IndexBackend.cpp Mon Dec 16 11:25:15 2024 +0100 @@ -4076,8 +4076,8 @@ case QUERY_CHILDREN_MAIN_DICOM_TAGS: { Orthanc::DatabasePluginMessages::Find_Response_ChildrenContent* content = GetChildrenContent(responses[internalId], static_cast(request.level() + 1)); - Orthanc::DatabasePluginMessages::Find_Response_MultipleTags* tag = content->add_main_dicom_tags(); - tag->add_values(statement->ReadString(C3_STRING_1)); // TODO: handle sequences ?? + Orthanc::DatabasePluginMessages::Find_Response_Tag* tag = content->add_main_dicom_tags(); + tag->set_value(statement->ReadString(C3_STRING_1)); // TODO: handle sequences ?? tag->set_group(statement->ReadInteger32(C6_INT_1)); tag->set_element(statement->ReadInteger32(C7_INT_2)); }; break; @@ -4085,10 +4085,11 @@ case QUERY_CHILDREN_METADATA: { Orthanc::DatabasePluginMessages::Find_Response_ChildrenContent* content = GetChildrenContent(responses[internalId], static_cast(request.level() + 1)); - Orthanc::DatabasePluginMessages::Find_Response_MultipleMetadata* metadata = content->add_metadata(); - - metadata->add_values(statement->ReadString(C3_STRING_1)); + Orthanc::DatabasePluginMessages::Find_Response_Metadata* metadata = content->add_metadata(); + + metadata->set_value(statement->ReadString(C3_STRING_1)); metadata->set_key(statement->ReadInteger32(C6_INT_1)); + metadata->set_revision(0); // Setting a revision is not required in this case, as of Orthanc 1.12.5 }; break; case QUERY_GRAND_CHILDREN_IDENTIFIERS: @@ -4107,9 +4108,9 @@ case QUERY_GRAND_CHILDREN_MAIN_DICOM_TAGS: { Orthanc::DatabasePluginMessages::Find_Response_ChildrenContent* content = GetChildrenContent(responses[internalId], static_cast(request.level() + 2)); - Orthanc::DatabasePluginMessages::Find_Response_MultipleTags* tag = content->add_main_dicom_tags(); - - tag->add_values(statement->ReadString(C3_STRING_1)); // TODO: handle sequences ?? + Orthanc::DatabasePluginMessages::Find_Response_Tag* tag = content->add_main_dicom_tags(); + + tag->set_value(statement->ReadString(C3_STRING_1)); // TODO: handle sequences ?? tag->set_group(statement->ReadInteger32(C6_INT_1)); tag->set_element(statement->ReadInteger32(C7_INT_2)); }; break; @@ -4117,10 +4118,11 @@ case QUERY_GRAND_CHILDREN_METADATA: { Orthanc::DatabasePluginMessages::Find_Response_ChildrenContent* content = GetChildrenContent(responses[internalId], static_cast(request.level() + 2)); - Orthanc::DatabasePluginMessages::Find_Response_MultipleMetadata* metadata = content->add_metadata(); - - metadata->add_values(statement->ReadString(C3_STRING_1)); + Orthanc::DatabasePluginMessages::Find_Response_Metadata* metadata = content->add_metadata(); + + metadata->set_value(statement->ReadString(C3_STRING_1)); metadata->set_key(statement->ReadInteger32(C6_INT_1)); + metadata->set_revision(0); // Setting a revision is not required in this case, as of Orthanc 1.12.5 }; break; case QUERY_GRAND_GRAND_CHILDREN_IDENTIFIERS: