Mercurial > hg > orthanc
comparison OrthancServer/Sources/ServerContext.cpp @ 5590:8b32213af23e find-refactoring
replaced FindRequest::ResponseContent by booleans
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 03 May 2024 18:17:53 +0200 |
parents | b51ee994cd6f |
children | 1e2631b8b9af |
comparison
equal
deleted
inserted
replaced
5589:b51ee994cd6f | 5590:8b32213af23e |
---|---|
2726 { | 2726 { |
2727 // convert to ExpandedResource to re-use the serialization code TODO-FIND: check if this is the right way to do. shouldn't we copy the code and finally get rid of ExpandedResource ? | 2727 // convert to ExpandedResource to re-use the serialization code TODO-FIND: check if this is the right way to do. shouldn't we copy the code and finally get rid of ExpandedResource ? |
2728 ExpandedResource resource(request, item); | 2728 ExpandedResource resource(request, item); |
2729 | 2729 |
2730 ExpandResourceFlags expandFlags = ExpandResourceFlags_None; | 2730 ExpandResourceFlags expandFlags = ExpandResourceFlags_None; |
2731 if (request.HasResponseContent(FindRequest::ResponseContent_Children)) | 2731 if (request.IsRetrieveChildrenIdentifiers()) |
2732 { | 2732 { |
2733 expandFlags = static_cast<ExpandResourceFlags>(expandFlags | ExpandResourceFlags_IncludeChildren); | 2733 expandFlags = static_cast<ExpandResourceFlags>(expandFlags | ExpandResourceFlags_IncludeChildren); |
2734 } | 2734 } |
2735 if (request.HasResponseContent(FindRequest::ResponseContent_Metadata)) | 2735 if (request.IsRetrieveMetadata()) |
2736 { | 2736 { |
2737 expandFlags = static_cast<ExpandResourceFlags>(expandFlags | ExpandResourceFlags_IncludeAllMetadata | ExpandResourceFlags_IncludeMetadata ); | 2737 expandFlags = static_cast<ExpandResourceFlags>(expandFlags | ExpandResourceFlags_IncludeAllMetadata | ExpandResourceFlags_IncludeMetadata ); |
2738 } | 2738 } |
2739 if (request.HasResponseContent(FindRequest::ResponseContent_MainDicomTags)) | 2739 if (request.IsRetrieveTagsAtLevel(request.GetLevel())) |
2740 { | 2740 { |
2741 expandFlags = static_cast<ExpandResourceFlags>(expandFlags | ExpandResourceFlags_IncludeMainDicomTags); | 2741 expandFlags = static_cast<ExpandResourceFlags>(expandFlags | ExpandResourceFlags_IncludeMainDicomTags); |
2742 } | 2742 } |
2743 if (request.HasResponseContent(FindRequest::ResponseContent_IsStable)) | 2743 if (true /* request.HasResponseContent(FindRequest::ResponseContent_IsStable) */) // TODO-FIND: Is this correct? |
2744 { | 2744 { |
2745 expandFlags = static_cast<ExpandResourceFlags>(expandFlags | ExpandResourceFlags_IncludeIsStable); | 2745 expandFlags = static_cast<ExpandResourceFlags>(expandFlags | ExpandResourceFlags_IncludeIsStable); |
2746 } | 2746 } |
2747 if (request.HasResponseContent(FindRequest::ResponseContent_Labels)) | 2747 if (request.IsRetrieveLabels()) |
2748 { | 2748 { |
2749 expandFlags = static_cast<ExpandResourceFlags>(expandFlags | ExpandResourceFlags_IncludeLabels); | 2749 expandFlags = static_cast<ExpandResourceFlags>(expandFlags | ExpandResourceFlags_IncludeLabels); |
2750 } | 2750 } |
2751 | 2751 |
2752 Json::Value jsonItem; | 2752 Json::Value jsonItem; |