NCBI C++ ToolKit
osg_getblob_base.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: osg_getblob_base.cpp 98931 2023-01-24 23:57:14Z vasilche $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Eugene Vasilchenko
27  *
28  * File Description: processor for data from OSG
29  *
30  */
31 
32 #include <ncbi_pch.hpp>
33 
34 #include "osg_getblob_base.hpp"
35 
36 #include <objects/id2/id2__.hpp>
39 #include "pubseq_gateway.hpp"
42 #include "id2info.hpp"
43 
47 
48 
50 {
51 }
52 
53 
55 {
56 }
57 
58 
60  TID2SplitVersion split_version)
61 {
62  m_PSGBlobId2SplitVersion[GetPSGBlobId(osg_blob_id)] = split_version;
63 }
64 
65 
68 {
69  return m_PSGBlobId2SplitVersion[GetPSGBlobId(osg_blob_id)];
70 }
71 
72 
74 {
75  switch ( reply.GetReply().Which() ) {
77  if ( IsEnabledOSGBlob(reply.GetReply().GetGet_blob().GetBlob_id()) ) {
78  if ( 0 && reply.GetReply().GetGet_blob().GetBlob_id().GetSat() == 8087 ) {
79  PSG_ERROR("OSG: simulating CDD blob read failure");
80  return;
81  }
82  if ( m_Blob ) {
83  PSG_ERROR(GetName()<<": "
84  "Duplicate blob reply: "<<MSerial_AsnText<<reply);
85  }
86  m_Blob = &reply.GetReply().GetGet_blob();
87  }
88  break;
91  if ( 0 && reply.GetReply().GetGet_blob().GetBlob_id().GetSat() == 8087 ) {
92  PSG_ERROR("OSG: simulating CDD blob read failure");
93  return;
94  }
95  if ( m_SplitInfo ) {
96  PSG_ERROR(GetName()<<": "
97  "Duplicate blob reply: "<<MSerial_AsnText<<reply);
98  }
100  }
101  break;
103  if ( IsEnabledOSGBlob(reply.GetReply().GetGet_chunk().GetBlob_id()) ) {
104  if ( m_Chunk ) {
105  PSG_ERROR(GetName()<<": "
106  "Duplicate blob reply: "<<MSerial_AsnText<<reply);
107  }
108  m_Chunk = &reply.GetReply().GetGet_chunk();
109  }
110  break;
111  default:
112  PSG_ERROR(GetName()<<": "
113  "Invalid blob reply: "<<MSerial_AsnText<<reply);
114  break;
115  }
116 }
117 
118 
120  const CID2_Reply_Data& data)
121 {
122  size_t blob_size = 0;
123  for ( auto& chunk : data.GetData() ) {
124  blob_size += chunk->size();
125  }
127 }
128 
129 
131  const CID2_Blob_Id& blob_id)
132 {
133  if ( blob_id.IsSetVersion() ) {
134  blob_props.SetModified(int64_t(blob_id.GetVersion())*60000);
135  }
136 }
137 
138 
140  const CID2_Reply_Data& data)
141 {
142  if ( data.GetData_compression() == data.eData_compression_gzip ) {
143  blob_props.SetGzip(true);
144  }
145  blob_props.SetNChunks(data.GetData().size());
146 }
147 
148 
150  TID2BlobState blob_state)
151 {
152  if ( blob_state & (1<<eID2_Blob_State_withdrawn) ) {
153  blob_props.SetWithdrawn(true);
154  }
155  if ( blob_state & ((1<<eID2_Blob_State_suppressed)|
157  blob_props.SetSuppress(true);
158  }
159  if ( blob_state & (1<<eID2_Blob_State_dead) ) {
160  blob_props.SetDead(true);
161  }
162 }
163 
164 
165 void CPSGS_OSGGetBlobBase::SendExcludedBlob(const string& psg_blob_id)
166 {
167  size_t item_id = m_Reply->GetItemId();
168  if ( GetDebugLevel() >= eDebug_exchange ) {
169  LOG_POST(GetDiagSeverity() << "OSG: "
170  "Sending blob excluded: "<<psg_blob_id);
171  }
172  m_Reply->PrepareBlobExcluded(item_id, GetName(), psg_blob_id, ePSGS_BlobExcluded);
173 }
174 
175 
177 {
178  if ( m_SplitInfo ) {
180  }
181  else if ( m_Blob ) {
183  }
184 }
185 
186 
188  TID2BlobState blob_state)
189 {
190  string psg_blob_id = GetPSGBlobId(osg_blob_id);
191  if ( GetDebugLevel() >= eDebug_exchange ) {
192  LOG_POST(GetDiagSeverity() << "OSG: "
193  "Sending blob forbidden: "<<psg_blob_id);
194  }
195 
196  CBlobRecord blob_props;
197  x_SetBlobVersion(blob_props, osg_blob_id);
198  x_SetBlobState(blob_props, blob_state);
199  x_SendBlobProps(psg_blob_id, blob_props);
200 
201  size_t item_id = m_Reply->GetItemId();
202  m_Reply->PrepareBlobMessage(item_id, GetName(),
203  psg_blob_id,
204  "Blob retrieval is not authorized",
207  eDiag_Error);
208  m_Reply->PrepareBlobCompletion(item_id, GetName(), 2);
209 }
210 
211 
212 void CPSGS_OSGGetBlobBase::x_SendBlobProps(const string& psg_blob_id,
213  CBlobRecord& blob_props)
214 {
215  size_t item_id = m_Reply->GetItemId();
216  string data_to_send = ToJsonString(blob_props);
217  if ( GetDebugLevel() >= eDebug_exchange ) {
218  LOG_POST(GetDiagSeverity() << "OSG: "
219  "Sending blob_prop("<<psg_blob_id<<"): "<<data_to_send);
220  }
221  m_Reply->PrepareBlobPropData(item_id, GetName(), psg_blob_id, data_to_send);
222  m_Reply->PrepareBlobPropCompletion(item_id, GetName(), 2);
223 }
224 
225 
226 void CPSGS_OSGGetBlobBase::x_SendChunkBlobProps(const string& id2_info,
227  TID2ChunkId chunk_id,
228  CBlobRecord& blob_props)
229 {
230  size_t item_id = m_Reply->GetItemId();
231  string data_to_send = ToJsonString(blob_props);
232  if ( GetDebugLevel() >= eDebug_exchange ) {
233  LOG_POST(GetDiagSeverity() << "OSG: "
234  "Sending chunk blob_prop("<<id2_info<<','<<chunk_id<<"): "<<data_to_send);
235  }
236  m_Reply->PrepareTSEBlobPropData(item_id, GetName(), chunk_id, id2_info, data_to_send);
237  m_Reply->PrepareBlobPropCompletion(item_id, GetName(), 2);
238 }
239 
240 
241 void CPSGS_OSGGetBlobBase::x_SendBlobData(const string& psg_blob_id,
242  const CID2_Reply_Data& data)
243 {
244  size_t item_id = m_Reply->GetItemId();
245  int chunk_no = 0;
246  for ( auto& chunk : data.GetData() ) {
247  m_Reply->PrepareBlobData(item_id, GetName(), psg_blob_id,
248  (const unsigned char*)chunk->data(), chunk->size(), chunk_no++);
249  }
250  m_Reply->PrepareBlobCompletion(item_id, GetName(), chunk_no+1);
252 }
253 
254 
255 void CPSGS_OSGGetBlobBase::x_SendChunkBlobData(const string& id2_info,
256  TID2ChunkId chunk_id,
257  const CID2_Reply_Data& data)
258 {
259  size_t item_id = m_Reply->GetItemId();
260  int chunk_no = 0;
261  for ( auto& chunk : data.GetData() ) {
262  m_Reply->PrepareTSEBlobData(item_id, GetName(),
263  (const unsigned char*)chunk->data(), chunk->size(), chunk_no++,
264  chunk_id, id2_info);
265  }
266  m_Reply->PrepareTSEBlobCompletion(item_id, GetName(), chunk_no+1);
268 }
269 
270 
271 string CPSGS_OSGGetBlobBase::x_GetSplitInfoPSGBlobId(const string& main_blob_id)
272 {
273  return main_blob_id + '.';
274 }
275 
276 
277 string CPSGS_OSGGetBlobBase::x_GetChunkPSGBlobId(const string& main_blob_id,
278  TID2ChunkId chunk_id)
279 {
280  return main_blob_id + '.' + to_string(chunk_id);
281 }
282 
283 
285  TID2BlobState blob_state,
286  const CID2_Reply_Data& data)
287 {
288  string main_blob_id = GetPSGBlobId(osg_blob_id);
289 
291 
292  CBlobRecord main_blob_props;
293  x_SetBlobVersion(main_blob_props, osg_blob_id);
294  x_SetBlobState(main_blob_props, blob_state);
295  x_SetBlobDataProps(main_blob_props, data);
296  x_SendBlobProps(main_blob_id, main_blob_props);
297  x_SendBlobData(main_blob_id, data);
298 }
299 
300 
302  TID2BlobState blob_state,
303  TID2SplitVersion split_version,
304  const CID2_Reply_Data& data)
305 {
306  // first send main blob props
307  string main_blob_id = GetPSGBlobId(osg_blob_id);
308  string id2_info = GetPSGId2Info(osg_blob_id, split_version);
309 
311 
312  CBlobRecord main_blob_props;
313  x_SetBlobVersion(main_blob_props, osg_blob_id);
314  x_SetBlobState(main_blob_props, blob_state);
315  main_blob_props.SetId2Info(id2_info);
316  x_SendBlobProps(main_blob_id, main_blob_props);
317 
318  CBlobRecord split_info_blob_props;
319  x_SetBlobDataProps(split_info_blob_props, data);
320  x_SendChunkBlobProps(id2_info, kSplitInfoChunk, split_info_blob_props);
322 }
323 
324 
326  TID2ChunkId chunk_id,
327  const CID2_Reply_Data& data)
328 {
329  string id2_info = GetPSGId2Info(osg_blob_id, x_GetSplitVersion(osg_blob_id));
330 
332 
333  CBlobRecord chunk_blob_props;
334  x_SetBlobDataProps(chunk_blob_props, data);
335  x_SendChunkBlobProps(id2_info, chunk_id, chunk_blob_props);
336  x_SendChunkBlobData(id2_info, chunk_id, data);
337 }
338 
339 
341 {
342  if ( m_SplitInfo ) {
343  if ( !m_SplitInfo->IsSetData() ) {
344  return false;
345  }
346  if ( m_Blob ) {
347  return m_Blob->IsSetData();
348  }
349  }
350  else {
351  if ( m_Blob ) {
352  return m_Blob->IsSetData();
353  }
354  }
355  return false;
356 }
357 
358 
360 {
361  if ( blob_state & (1<<eID2_Blob_State_withdrawn) ) {
362  return true;
363  }
364  if ( blob_state & (1<<eID2_Blob_State_protected) ) {
365  return true;
366  }
367  return false;
368 }
369 
370 
372 {
373  if ( HasBlob() ) {
374  return false;
375  }
376  if ( m_SplitInfo ) {
378  }
379  else if ( m_Blob ) {
381  }
382  return false;
383 }
384 
385 
387 {
389  if ( !HasBlob() && Forbidden() ) {
391  status = ePSGS_Done;
392  }
393  else if ( m_SplitInfo && !m_Blob ) {
394  // split_info with blob inside
399  m_SplitInfo->GetData());
400  status = ePSGS_Done;
401  }
402  else if ( m_Blob && !m_SplitInfo && m_Blob->IsSetData() &&
404  // split_info with blob inside in a get-blob reply
405  // TODO: really???
408  0,
409  m_Blob->GetData());
410  status = ePSGS_Done;
411  }
412  else if ( m_Blob && !m_SplitInfo && m_Blob->IsSetData() ) {
413  // blob only
416  m_Blob->GetData());
417  status = ePSGS_Done;
418  }
419  else if ( m_Blob && !m_SplitInfo && !m_Blob->IsSetData() ) {
420  // no blob reply TODO
421  status = ePSGS_NotFound;
422  }
423  else if ( m_Blob && m_SplitInfo ) {
424  // separate blob and m_SplitInfo TODO
425  status = ePSGS_NotFound;
426  }
427  else if ( m_Chunk ) {
429  m_Chunk->GetChunk_id(),
430  m_Chunk->GetData());
431  status = ePSGS_Done;
432  }
433  else {
434  // nothing TODO
435  status = ePSGS_NotFound;
436  }
437  if ( status == ePSGS_NotFound ) {
439  }
440  SetFinalStatus(status);
441 }
442 
443 
444 /////////////////////////////////////////////////////////////////////////////
445 // Blob id parsing methods
446 /////////////////////////////////////////////////////////////////////////////
447 
448 
449 static const char kSubSatSeparator = '/';
450 static const int kOSG_Sat_WGS_min = 1000;
451 static const int kOSG_Sat_WGS_max = 1130;
452 static const int kOSG_Sat_SNP_min = 2001;
453 static const int kOSG_Sat_SNP_max = 3999;
454 static const int kOSG_Sat_CDD_min = 8087;
455 static const int kOSG_Sat_CDD_max = 8088;
456 //static const int kOSG_Sat_NAGraph_min = 8000;
457 //static const int kOSG_Sat_NAGraph_max = 8000;
458 
459 
460 static inline bool s_IsEnabledOSGSat(CPSGS_OSGProcessorBase::TEnabledFlags enabled_flags, Int4 sat)
461 {
462  if ( sat >= kOSG_Sat_WGS_min &&
463  sat <= kOSG_Sat_WGS_max &&
464  (enabled_flags & CPSGS_OSGProcessorBase::fEnabledWGS) ) {
465  return true;
466  }
467  if ( sat >= kOSG_Sat_SNP_min &&
468  sat <= kOSG_Sat_SNP_max &&
469  (enabled_flags & CPSGS_OSGProcessorBase::fEnabledSNP) ) {
470  return true;
471  }
472  if ( sat >= kOSG_Sat_CDD_min &&
473  sat <= kOSG_Sat_CDD_max &&
474  (enabled_flags & CPSGS_OSGProcessorBase::fEnabledCDD) ) {
475  return true;
476  }
477  /*
478  if ( sat >= kOSG_Sat_NAGraph_min &&
479  sat <= kOSG_Sat_NAGraph_max &&
480  (enabled_flags & CPSGS_OSGProcessorBase::fEnabledNAGraph) ) {
481  return true;
482  }
483  */
484  return false;
485 }
486 
487 
488 static inline bool s_IsEnabledCDDSat(CPSGS_OSGProcessorBase::TEnabledFlags enabled_flags, Int4 sat)
489 {
490  if ( sat >= kOSG_Sat_CDD_min &&
491  sat <= kOSG_Sat_CDD_max &&
492  (enabled_flags & CPSGS_OSGProcessorBase::fEnabledCDD) ) {
493  return true;
494  }
495  return false;
496 }
497 
498 
499 static bool s_IsOSGSat(Int4 sat)
500 {
502 }
503 
504 
505 static bool s_IsCDDSat(Int4 sat)
506 {
508 }
509 
510 
511 static bool s_IsOSGBlob(Int4 sat, Int4 /*subsat*/, Int4 /*satkey*/)
512 {
513  return s_IsOSGSat(sat);
514 }
515 
516 
518  Int4 sat, Int4 /*subsat*/, Int4 /*satkey*/)
519 {
520  return s_IsEnabledOSGSat(enabled_flags, sat);
521 }
522 
523 
524 static bool s_IsCDDBlob(Int4 sat, Int4 /*subsat*/, Int4 /*satkey*/)
525 {
526  return s_IsCDDSat(sat);
527 }
528 
529 
531 {
532  return s_IsOSGBlob(blob_id.GetSat(), blob_id.GetSub_sat(), blob_id.GetSat_key());
533 }
534 
535 
537 {
538  return s_IsCDDBlob(blob_id.GetSat(), blob_id.GetSub_sat(), blob_id.GetSat_key());
539 }
540 
541 
542 static bool s_Skip(CTempString& str, char c)
543 {
544  if ( str.empty() || str[0] != c ) {
545  return false;
546  }
547  str = str.substr(1);
548  return true;
549 }
550 
551 
552 static inline bool s_IsValidIntChar(char c)
553 {
554  return c == '-' || (c >= '0' && c <= '9');
555 }
556 
557 
558 template<class Int>
559 static bool s_ParseInt(CTempString& str, Int& v)
560 {
561  size_t int_size = 0;
562  while ( int_size < str.size() && s_IsValidIntChar(str[int_size]) ) {
563  ++int_size;
564  }
565  if ( !NStr::StringToNumeric(str.substr(0, int_size), &v,
567  return false;
568  }
569  str = str.substr(int_size);
570  return true;
571 }
572 
573 
575  Int4& sat, Int4& subsat, Int4& satkey)
576 {
577  if ( s.find(kSubSatSeparator) == NPOS ) {
578  return false;
579  }
580  if ( !s_ParseInt(s, sat) ) {
581  return false;
582  }
583  if ( !s_IsOSGSat(sat) ) {
584  return false;
585  }
586  if ( !s_Skip(s, kSubSatSeparator) ) {
587  return false;
588  }
589  if ( !s_ParseInt(s, subsat) ) {
590  return false;
591  }
592  if ( !s_Skip(s, '.') ) {
593  return false;
594  }
595  if ( !s_ParseInt(s, satkey) ) {
596  return false;
597  }
598  return s_IsOSGBlob(sat, subsat, satkey);
599 }
600 
601 
602 static void s_FormatBlobId(ostream& s, const CID2_Blob_Id& blob_id)
603 {
604  s << blob_id.GetSat()
605  << kSubSatSeparator << blob_id.GetSub_sat()
606  << '.' << blob_id.GetSat_key();
607 }
608 
609 
611 {
612  Int4 sat;
613  Int4 subsat;
614  Int4 satkey;
615  auto id_str = blob_id.GetId();
616  CTempString s = id_str;
617  if ( !s_ParseOSGBlob(s, sat, subsat, satkey) || !s.empty() ) {
618  return null;
619  }
621  id->SetSat(sat);
622  id->SetSub_sat(subsat);
623  id->SetSat_key(satkey);
624  return id;
625 }
626 
627 
629 {
630  ostringstream s;
631  if ( IsOSGBlob(blob_id) ) {
632  s_FormatBlobId(s, blob_id);
633  }
634  return s.str();
635 }
636 
637 
639  TID2SplitVersion split_version)
640 {
641  ostringstream s;
642  if ( IsOSGBlob(tse_id) ) {
643  s_FormatBlobId(s, tse_id);
644  TID2BlobVersion blob_version = tse_id.IsSetVersion()? tse_id.GetVersion(): 0;
645  s << '.' << blob_version << '.' << split_version;
646  }
647  return s.str();
648 }
649 
650 
653 {
654  Int4 sat;
655  Int4 subsat;
656  Int4 satkey;
657  TID2BlobVersion tse_version;
658  TID2SplitVersion split_version;
659 
660  CTempString s = id2_info;
661  if ( !s_ParseOSGBlob(s, sat, subsat, satkey) ||
662  !s_Skip(s, '.') ||
663  !s_ParseInt(s, tse_version) ||
664  !s_Skip(s, '.') ||
665  !s_ParseInt(s, split_version) ||
666  !s.empty() ) {
667  return SParsedId2Info{};
668  }
669 
671  id->SetSat(sat);
672  id->SetSub_sat(subsat);
673  id->SetSat_key(satkey);
674  id->SetVersion(tse_version);
675  return SParsedId2Info{id, split_version};
676 }
677 
678 
680 {
681  return s_IsEnabledOSGBlob(enabled_flags, blob_id.GetSat(), blob_id.GetSub_sat(), blob_id.GetSat_key());
682 }
683 
684 
CBlobRecord & SetNChunks(int32_t value)
CBlobRecord & SetId2Info(string const &value)
CBlobRecord & SetSuppress(bool value)
CBlobRecord & SetGzip(bool value)
CBlobRecord & SetWithdrawn(bool value)
CBlobRecord & SetDead(bool value)
CBlobRecord & SetModified(TTimestamp value)
Definition: blob_record.cpp:70
CID2_Blob_Id –.
Definition: ID2_Blob_Id.hpp:66
CID2_Reply –.
Definition: ID2_Reply.hpp:66
void x_SendChunkBlobData(const string &id2_info, TID2ChunkId chunk_id, const CID2_Reply_Data &data)
void x_SendSplitInfo(const CID2_Blob_Id &osg_blob_id, TID2BlobState blob_state, TID2SplitVersion split_version, const CID2_Reply_Data &data)
static string x_GetChunkPSGBlobId(const string &main_blob_id, TID2ChunkId chunk_id)
static CRef< CID2_Blob_Id > ParsePSGBlobId(const SPSGS_BlobId &blob_id)
static string GetPSGBlobId(const CID2_Blob_Id &blob_id)
void x_SendBlobProps(const string &psg_blob_id, CBlobRecord &blob_props)
void ProcessBlobReply(const CID2_Reply &reply)
static bool IsEnabledOSGBlob(TEnabledFlags enabled_flags, const CID2_Blob_Id &blob_id)
static bool IsOSGBlob(const CID2_Blob_Id &blob_id)
void x_SendChunk(const CID2_Blob_Id &osg_blob_id, TID2ChunkId chunk_id, const CID2_Reply_Data &data)
CConstRef< CID2S_Reply_Get_Split_Info > m_SplitInfo
static string x_GetSplitInfoPSGBlobId(const string &main_blob_id)
CConstRef< CID2_Reply_Get_Blob > m_Blob
void x_SendChunkBlobProps(const string &id2_info, TID2ChunkId chunk_id, CBlobRecord &blob_props)
void SendExcludedBlob(const string &psg_blob_id)
void x_RegisterTimingFound(EPSGOperation operation, const objects::CID2_Reply_Data &data)
void x_SetBlobState(CBlobRecord &blob_props, TID2BlobState blob_state)
void x_SetBlobVersion(CBlobRecord &blob_props, const CID2_Blob_Id &blob_id)
TID2SplitVersion x_GetSplitVersion(const CID2_Blob_Id &osg_blob_id)
static TID2BlobState x_GetBlobState(const C &obj)
CConstRef< CID2S_Reply_Get_Chunk > m_Chunk
void x_SetSplitVersion(const CID2_Blob_Id &osg_blob_id, TID2SplitVersion split_version)
void x_SendMainEntry(const CID2_Blob_Id &osg_blob_id, TID2BlobState blob_state, const CID2_Reply_Data &data)
static string GetPSGId2Info(const CID2_Blob_Id &tse_id, TID2SplitVersion split_version)
map< string, TID2SplitVersion > m_PSGBlobId2SplitVersion
void x_SendBlobData(const string &psg_blob_id, const CID2_Reply_Data &data)
void x_SetBlobDataProps(CBlobRecord &blob_props, const CID2_Reply_Data &data)
static bool IsCDDBlob(const CID2_Blob_Id &blob_id)
void x_SendForbiddenBlob(const CID2_Blob_Id &osg_blob_id, TID2BlobState blob_state)
static SParsedId2Info ParsePSGId2Info(const string &idsss2_info)
void x_RegisterTimingNotFound(EPSGOperation operation)
void x_RegisterTiming(EPSGOperation operation, EPSGOperationStatus status, size_t blob_size)
void SetFinalStatus(EPSGS_Status status)
@ ePSGS_SendAccumulated
Definition: psgs_reply.hpp:54
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Definition: tempstr.hpp:65
virtual string GetName(void) const =0
Tells the processor name (used in logging and tracing)
shared_ptr< CPSGS_Reply > m_Reply
EPSGS_Status
The GetStatus() method returns a processor current status.
static const char * str(char *buf, int n)
Definition: stats.c:84
char data[12]
Definition: iconv.c:80
Int8 int64_t
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
Definition: ncbidiag.hpp:226
@ eDiag_Error
Error message.
Definition: ncbidiag.hpp:653
#define MSerial_AsnText
I/O stream manipulators –.
Definition: serialbase.hpp:696
int32_t Int4
4-byte (32-bit) signed integer
Definition: ncbitype.h:102
#define NPOS
Definition: ncbistr.hpp:133
static TNumeric StringToNumeric(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to a numeric value.
Definition: ncbistr.hpp:330
bool empty(void) const
Return true if the represented string is empty (i.e., the length is zero)
Definition: tempstr.hpp:334
size_type find(const CTempString match, size_type pos=0) const
Find the first instance of the entire matching string within the current string, beginning at an opti...
Definition: tempstr.hpp:655
@ fConvErr_NoErrMessage
Set errno, but do not set CNcbiError message on error.
Definition: ncbistr.hpp:291
@ fConvErr_NoThrow
Do not throw an exception on error.
Definition: ncbistr.hpp:285
operation
Bit operations.
Definition: bmconst.h:191
const TGet_split_info & GetGet_split_info(void) const
Get the variant data.
Definition: ID2_Reply_.cpp:274
TVersion GetVersion(void) const
Get the Version member data.
TSat_key GetSat_key(void) const
Get the Sat_key member data.
E_Choice Which(void) const
Which variant is currently selected.
Definition: ID2_Reply_.hpp:710
const TBlob_id & GetBlob_id(void) const
Get the Blob_id member data.
const TGet_blob & GetGet_blob(void) const
Get the variant data.
Definition: ID2_Reply_.cpp:230
bool IsSetVersion(void) const
version of blob, optional in some requests Check if a value has been assigned to Version data member.
const TBlob_id & GetBlob_id(void) const
Get the Blob_id member data.
const TChunk_id & GetChunk_id(void) const
Get the Chunk_id member data.
const TReply & GetReply(void) const
Get the Reply member data.
Definition: ID2_Reply_.hpp:940
TSub_sat GetSub_sat(void) const
Get the Sub_sat member data.
TData_type GetData_type(void) const
Get the Data_type member data.
const TGet_chunk & GetGet_chunk(void) const
Get the variant data.
Definition: ID2_Reply_.cpp:296
const TData & GetData(void) const
Get the Data member data.
const TData & GetData(void) const
Get the Data member data.
bool IsSetData(void) const
blob split info not set if error occurred Check if a value has been assigned to Data data member.
TSat GetSat(void) const
Get the Sat member data.
const TBlob_id & GetBlob_id(void) const
Get the Blob_id member data.
TSplit_version GetSplit_version(void) const
Get the Split_version member data.
bool IsSetData(void) const
whole blob or blob skeleton not set if error occurred Check if a value has been assigned to Data data...
const TData & GetData(void) const
Get the Data member data.
@ eID2_Blob_State_dead
@ eID2_Blob_State_suppressed
@ eID2_Blob_State_protected
@ eID2_Blob_State_suppressed_temp
@ eID2_Blob_State_withdrawn
const int64_t kSplitInfoChunk
Definition: id2info.hpp:42
static bool s_ParseInt(CTempString &str, Int &v)
static bool s_Skip(CTempString &str, char c)
static const int kOSG_Sat_CDD_max
static bool s_IsEnabledOSGBlob(CPSGS_OSGProcessorBase::TEnabledFlags enabled_flags, Int4 sat, Int4, Int4)
static bool s_IsValidIntChar(char c)
static const int kOSG_Sat_WGS_max
static bool s_ParseOSGBlob(CTempString &s, Int4 &sat, Int4 &subsat, Int4 &satkey)
static bool s_IsCDDSat(Int4 sat)
static bool s_IsEnabledOSGSat(CPSGS_OSGProcessorBase::TEnabledFlags enabled_flags, Int4 sat)
static bool s_IsOSGSat(Int4 sat)
END_NCBI_NAMESPACE
static const int kOSG_Sat_CDD_min
static const int kOSG_Sat_WGS_min
static bool s_IsOSGBlob(Int4 sat, Int4, Int4)
static const char kSubSatSeparator
BEGIN_NCBI_NAMESPACE
static bool s_IsCDDBlob(Int4 sat, Int4, Int4)
static const int kOSG_Sat_SNP_min
static bool x_Forbidden(CPSGS_OSGGetBlobBase::TID2BlobState blob_state)
BEGIN_NAMESPACE(psg)
static const int kOSG_Sat_SNP_max
static bool s_IsEnabledCDDSat(CPSGS_OSGProcessorBase::TEnabledFlags enabled_flags, Int4 sat)
static void s_FormatBlobId(ostream &s, const CID2_Blob_Id &blob_id)
END_NAMESPACE(osg)
Severity GetDiagSeverity()
int GetDebugLevel()
@ eDebug_exchange
string ToJsonString(const CBioseqInfoRecord &bioseq_info, SPSGS_ResolveRequest::TPSGS_BioseqIncludeData include_data_flags, const string &custom_blob_id)
#define PSG_ERROR(message)
@ ePSGS_BlobExcluded
@ ePSGS_BlobRetrievalIsNotAuthorized
string GetId(void) const
@ eOpStatusFound
Definition: timing.hpp:61
EPSGOperation
Definition: timing.hpp:65
@ eTseChunkRetrieve
Definition: timing.hpp:101
@ eBlobRetrieve
Definition: timing.hpp:98
Modified on Fri Apr 12 17:16:24 2024 by modify_doxy.py rev. 669887