NCBI C++ ToolKit
Functions | Variables
pubseq_gateway_convert_utils.cpp File Reference
#include <ncbi_pch.hpp>
#include <corelib/ncbistr.hpp>
#include <objtools/pubseq_gateway/protobuf/psg_protobuf.pb.h>
#include "pubseq_gateway_convert_utils.hpp"
#include "pubseq_gateway_utils.hpp"
+ Include dependency graph for pubseq_gateway_convert_utils.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Functions

string ToBioseqProtobuf (const CBioseqInfoRecord &bioseq_info)
 
string ToJsonString (const CBioseqInfoRecord &bioseq_info, SPSGS_ResolveRequest::TPSGS_BioseqIncludeData include_data_flags, const string &custom_blob_id)
 
string ToJsonString (const CBlobRecord &blob_prop)
 
string ToJsonString (const CNAnnotRecord &annot_record, int32_t sat, const string &custom_blob_id)
 
string ToJsonString (const map< string, int > &per_na_results)
 
string ToJsonString (const CBioseqInfoFetchRequest &request)
 
string ToJsonString (const CSi2CsiFetchRequest &request)
 
string ToJsonString (const CBlobFetchRequest &request)
 
string ToJsonString (const CSI2CSIRecord &record)
 
string ToJsonString (const CCassBlobTaskLoadBlob &request)
 
string ToJsonString (const CCassBlobTaskFetchSplitHistory &request)
 
string ToJsonString (const CCassNAnnotTaskFetch &request)
 
string ToJsonString (const CCassStatusHistoryTaskGetPublicComment &request)
 
string ToJsonString (const CCassAccVerHistoryTaskFetch &request)
 
string ToJsonString (const CPubseqGatewayFetchIpgReportRequest &request)
 
string ToJsonString (const SAccVerHistRec &history_record)
 
string ToJsonString (const CIpgStorageReportEntry &ipg_entry)
 

Variables

 USING_NCBI_SCOPE
 
static const string kAccessionItem = "\"accession\": "
 
static const string kVersionItem = "\"version\": "
 
static const string kSeqIdTypeItem = "\"seq_id_type\": "
 
static const string kNameItem = "\"name\": "
 
static const string kGiItem = "\"gi\": "
 
static const string kDateChangedItem = "\"date_changed\": "
 
static const string kHashItem = "\"hash\": "
 
static const string kLengthItem = "\"length\": "
 
static const string kMolItem = "\"mol\": "
 
static const string kSatItem = "\"sat\": "
 
static const string kSatKeyItem = "\"sat_key\": "
 
static const string kBlobIdItem = "\"blob_id\": "
 
static const string kSeqIdsItem = "\"seq_ids\": "
 
static const string kSeqStateItem = "\"seq_state\": "
 
static const string kStateItem = "\"state\": "
 
static const string kTaxIdItem = "\"tax_id\": "
 
static const string kSep = ", "
 
static const string kDictValueSep = ": "
 
static const string kKeyItem = "\"key\": "
 
static const string kLastModifiedItem = "\"last_modified\": "
 
static const string kFlagsItem = "\"flags\": "
 
static const string kSizeItem = "\"size\": "
 
static const string kSizeUnpackedItem = "\"size_unpacked\": "
 
static const string kClassItem = "\"class\": "
 
static const string kDateAsn1Item = "\"date_asn1\": "
 
static const string kHupDateItem = "\"hup_date\": "
 
static const string kDivItem = "\"div\": "
 
static const string kId2InfoItem = "\"id2_info\": "
 
static const string kOwnerItem = "\"owner\": "
 
static const string kUserNameItem = "\"username\": "
 
static const string kNChunksItem = "\"n_chunks\": "
 
static const string kStartItem = "\"start\": "
 
static const string kStopItem = "\"stop\": "
 
static const string kAnnotInfoItem = "\"annot_info\": "
 
static const string kSeqAnnotInfoItem = "\"seq_annot_info\": "
 
static const string kRequestItem = "\"request\": "
 
static const string kSecSeqIdItem = "\"sec_seq_id\": "
 
static const string kSecSeqIdTypeItem = "\"sec_seq_id_type\": "
 
static const string kSecSeqStateItem = "\"sec_seq_state\": "
 
static const string kSatNameItem = "\"sat_name\": "
 
static const string kChunksRequestedItem = "\"chunk_requested\": "
 
static const string kBlopPropProvidedItem = "\"blob_prop_provided\": "
 
static const string kSplitVersionItem = "\"split_version\": "
 
static const string kAnnotNamesItem = "\"annotation_names\": "
 
static const string kDateItem = "\"date\": "
 
static const string kChainItem = "\"chain\": "
 
static const string kIPGItem = "\"ipg\": "
 
static const string kProteinItem = "\"protein\": "
 
static const string kNucleotideItem = "\"nucleotide\": "
 
static const string kProductNameItem = "\"product_name\": "
 
static const string kDivisionItem = "\"division\": "
 
static const string kAssemblyItem = "\"assembly\": "
 
static const string kStrainItem = "\"strain\": "
 
static const string kBioProjectItem = "\"bio_project\": "
 
static const string kGBStateItem = "\"gb_state\": "
 

Function Documentation

◆ ToBioseqProtobuf()

string ToBioseqProtobuf ( const CBioseqInfoRecord bioseq_info)

◆ ToJsonString() [1/16]

string ToJsonString ( const CBioseqInfoFetchRequest request)

◆ ToJsonString() [2/16]

string ToJsonString ( const CBioseqInfoRecord bioseq_info,
SPSGS_ResolveRequest::TPSGS_BioseqIncludeData  include_data_flags,
const string custom_blob_id 
)

Definition at line 156 of file pubseq_gateway_convert_utils.cpp.

References buf, SPSGS_ResolveRequest::fPSGS_BlobId, SPSGS_ResolveRequest::fPSGS_CanonicalId, SPSGS_ResolveRequest::fPSGS_DateChanged, SPSGS_ResolveRequest::fPSGS_Gi, SPSGS_ResolveRequest::fPSGS_Hash, SPSGS_ResolveRequest::fPSGS_Length, SPSGS_ResolveRequest::fPSGS_MoleculeType, SPSGS_ResolveRequest::fPSGS_Name, SPSGS_ResolveRequest::fPSGS_SeqIds, SPSGS_ResolveRequest::fPSGS_SeqState, SPSGS_ResolveRequest::fPSGS_State, SPSGS_ResolveRequest::fPSGS_TaxId, CBioseqInfoRecord::GetAccession(), CBioseqInfoRecord::GetDateChanged(), CBioseqInfoRecord::GetGI(), CBioseqInfoRecord::GetHash(), CBioseqInfoRecord::GetLength(), CBioseqInfoRecord::GetMol(), CBioseqInfoRecord::GetName(), CBioseqInfoRecord::GetSat(), CBioseqInfoRecord::GetSatKey(), CBioseqInfoRecord::GetSeqIds(), CBioseqInfoRecord::GetSeqIdType(), CBioseqInfoRecord::GetSeqState(), CBioseqInfoRecord::GetState(), CBioseqInfoRecord::GetTaxId(), CBioseqInfoRecord::GetVersion(), NStr::JsonEncode(), kAccessionItem, kBlobIdItem, kDateChangedItem, kGiItem, kHashItem, kLengthItem, kMolItem, kNameItem, kSatItem, kSatKeyItem, kSep, kSeqIdsItem, kSeqIdTypeItem, kSeqStateItem, kStateItem, kTaxIdItem, kVersionItem, len, and PSGToString().

Referenced by CPSGS_TSEChunkProcessor::OnGetBlobProp(), CBlobPropCallback::operator()(), CPSGS_Dispatcher::x_ConcludeIDGetNARequestStatus(), CPSGS_GetProcessor::x_GetBlobFinalStage(), CPSGS_IPGResolveProcessor::x_InitiateIPGFetch(), CPSGCache::x_LookupBioseqInfo(), CPSGCache::x_LookupBlobProp(), CPSGCache::x_LookupINSDCBioseqInfo(), CPSGCache::x_LookupSi2csi(), CPSGS_AsyncBioseqInfoBase::x_MakeRequest(), CPSGS_AccessionVersionHistoryProcessor::x_OnAccVerHistData(), CPSGS_AsyncBioseqInfoBase::x_OnBioseqInfo(), CPSGS_AsyncResolveBase::x_OnBioseqInfo(), CPSGS_AsyncBioseqInfoBase::x_OnBioseqInfoWithoutSeqIdType(), CPSGS_AsyncResolveBase::x_OnBioseqInfoWithoutSeqIdType(), CPSGS_IPGResolveProcessor::x_OnIPGResolveData(), CPSGS_AccessionVersionHistoryProcessor::x_OnSeqIdResolveFinished(), CPSGS_AnnotProcessor::x_OnSeqIdResolveFinished(), CPSGS_AsyncResolveBase::x_OnSi2csiRecord(), CPSGS_CassBlobBase::x_PrepareBlobPropData(), CPSGS_AsyncResolveBase::x_PreparePrimaryBioseqInfoQuery(), CPSGS_AsyncResolveBase::x_PrepareSi2csiQuery(), CPSGS_GetBlobProcessor::x_Process(), CPSGS_TSEChunkProcessor::x_ProcessIdModVerId2InfoFinalStage(), CPSGS_TSEChunkProcessor::x_ProcessSatInfoChunkVerId2InfoFinalStage(), CPSGS_AnnotProcessor::x_RequestBlobProp(), CPSGS_CassBlobBase::x_RequestID2BlobChunks(), CPSGS_CassBlobBase::x_RequestOriginalBlobChunks(), CPSGS_TSEChunkProcessor::x_RequestTSEChunk(), CPSGS_CDDProcessor::x_SendAnnot(), CPSGS_AnnotProcessor::x_SendAnnotDataToClient(), CPSGS_AccessionVersionHistoryProcessor::x_SendBioseqInfo(), CPSGS_AnnotProcessor::x_SendBioseqInfo(), CPSGS_GetProcessor::x_SendBioseqInfo(), CPSGS_ResolveProcessor::x_SendBioseqInfo(), CPSGS_WGSProcessor::x_SendBioseqInfo(), CPSGS_SNPProcessor::x_SendBlobProps(), CPSGS_WGSProcessor::x_SendBlobProps(), CPSGS_SNPProcessor::x_SendChunkBlobProps(), and CPSGS_WGSProcessor::x_SendChunkBlobProps().

◆ ToJsonString() [3/16]

string ToJsonString ( const CBlobFetchRequest request)

◆ ToJsonString() [4/16]

string ToJsonString ( const CBlobRecord blob_prop)

◆ ToJsonString() [5/16]

string ToJsonString ( const CCassAccVerHistoryTaskFetch request)

◆ ToJsonString() [6/16]

string ToJsonString ( const CCassBlobTaskFetchSplitHistory request)

◆ ToJsonString() [7/16]

string ToJsonString ( const CCassBlobTaskLoadBlob request)

◆ ToJsonString() [8/16]

string ToJsonString ( const CCassNAnnotTaskFetch request)

◆ ToJsonString() [9/16]

◆ ToJsonString() [10/16]

string ToJsonString ( const CIpgStorageReportEntry ipg_entry)

◆ ToJsonString() [11/16]

string ToJsonString ( const CNAnnotRecord annot_record,
int32_t  sat,
const string custom_blob_id 
)

◆ ToJsonString() [12/16]

string ToJsonString ( const CPubseqGatewayFetchIpgReportRequest request)

◆ ToJsonString() [13/16]

string ToJsonString ( const CSi2CsiFetchRequest request)

◆ ToJsonString() [14/16]

string ToJsonString ( const CSI2CSIRecord record)

◆ ToJsonString() [15/16]

string ToJsonString ( const map< string, int > &  per_na_results)

◆ ToJsonString() [16/16]

string ToJsonString ( const SAccVerHistRec history_record)

Variable Documentation

◆ kAccessionItem

const string kAccessionItem = "\"accession\": "
static

Definition at line 41 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kAnnotInfoItem

const string kAnnotInfoItem = "\"annot_info\": "
static

Definition at line 74 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kAnnotNamesItem

const string kAnnotNamesItem = "\"annotation_names\": "
static

Definition at line 84 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kAssemblyItem

const string kAssemblyItem = "\"assembly\": "
static

Definition at line 92 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kBioProjectItem

const string kBioProjectItem = "\"bio_project\": "
static

Definition at line 94 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kBlobIdItem

const string kBlobIdItem = "\"blob_id\": "
static

Definition at line 52 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kBlopPropProvidedItem

const string kBlopPropProvidedItem = "\"blob_prop_provided\": "
static

Definition at line 82 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kChainItem

const string kChainItem = "\"chain\": "
static

Definition at line 86 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kChunksRequestedItem

const string kChunksRequestedItem = "\"chunk_requested\": "
static

Definition at line 81 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kClassItem

const string kClassItem = "\"class\": "
static

Definition at line 64 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kDateAsn1Item

const string kDateAsn1Item = "\"date_asn1\": "
static

Definition at line 65 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kDateChangedItem

const string kDateChangedItem = "\"date_changed\": "
static

Definition at line 46 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kDateItem

const string kDateItem = "\"date\": "
static

Definition at line 85 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kDictValueSep

const string kDictValueSep = ": "
static

Definition at line 58 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kDivisionItem

const string kDivisionItem = "\"division\": "
static

Definition at line 91 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kDivItem

const string kDivItem = "\"div\": "
static

Definition at line 67 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kFlagsItem

const string kFlagsItem = "\"flags\": "
static

Definition at line 61 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kGBStateItem

const string kGBStateItem = "\"gb_state\": "
static

Definition at line 95 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kGiItem

const string kGiItem = "\"gi\": "
static

Definition at line 45 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kHashItem

const string kHashItem = "\"hash\": "
static

Definition at line 47 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kHupDateItem

const string kHupDateItem = "\"hup_date\": "
static

Definition at line 66 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kId2InfoItem

const string kId2InfoItem = "\"id2_info\": "
static

Definition at line 68 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kIPGItem

const string kIPGItem = "\"ipg\": "
static

Definition at line 87 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kKeyItem

const string kKeyItem = "\"key\": "
static

Definition at line 59 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kLastModifiedItem

const string kLastModifiedItem = "\"last_modified\": "
static

Definition at line 60 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kLengthItem

const string kLengthItem = "\"length\": "
static

Definition at line 48 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kMolItem

const string kMolItem = "\"mol\": "
static

Definition at line 49 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kNameItem

const string kNameItem = "\"name\": "
static

Definition at line 44 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kNChunksItem

const string kNChunksItem = "\"n_chunks\": "
static

Definition at line 71 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kNucleotideItem

const string kNucleotideItem = "\"nucleotide\": "
static

Definition at line 89 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kOwnerItem

const string kOwnerItem = "\"owner\": "
static

Definition at line 69 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kProductNameItem

const string kProductNameItem = "\"product_name\": "
static

Definition at line 90 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kProteinItem

const string kProteinItem = "\"protein\": "
static

Definition at line 88 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kRequestItem

const string kRequestItem = "\"request\": "
static

Definition at line 76 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kSatItem

const string kSatItem = "\"sat\": "
static

Definition at line 50 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kSatKeyItem

const string kSatKeyItem = "\"sat_key\": "
static

Definition at line 51 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kSatNameItem

const string kSatNameItem = "\"sat_name\": "
static

Definition at line 80 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kSecSeqIdItem

const string kSecSeqIdItem = "\"sec_seq_id\": "
static

Definition at line 77 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kSecSeqIdTypeItem

const string kSecSeqIdTypeItem = "\"sec_seq_id_type\": "
static

Definition at line 78 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kSecSeqStateItem

const string kSecSeqStateItem = "\"sec_seq_state\": "
static

Definition at line 79 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kSep

const string kSep = ", "
static

Definition at line 57 of file pubseq_gateway_convert_utils.cpp.

Referenced by CDirEntry::NormalizePath(), and ToJsonString().

◆ kSeqAnnotInfoItem

const string kSeqAnnotInfoItem = "\"seq_annot_info\": "
static

Definition at line 75 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kSeqIdsItem

const string kSeqIdsItem = "\"seq_ids\": "
static

Definition at line 53 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kSeqIdTypeItem

const string kSeqIdTypeItem = "\"seq_id_type\": "
static

Definition at line 43 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kSeqStateItem

const string kSeqStateItem = "\"seq_state\": "
static

Definition at line 54 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kSizeItem

const string kSizeItem = "\"size\": "
static

Definition at line 62 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kSizeUnpackedItem

const string kSizeUnpackedItem = "\"size_unpacked\": "
static

Definition at line 63 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kSplitVersionItem

const string kSplitVersionItem = "\"split_version\": "
static

Definition at line 83 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kStartItem

const string kStartItem = "\"start\": "
static

Definition at line 72 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kStateItem

const string kStateItem = "\"state\": "
static

Definition at line 55 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kStopItem

const string kStopItem = "\"stop\": "
static

Definition at line 73 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kStrainItem

const string kStrainItem = "\"strain\": "
static

Definition at line 93 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kTaxIdItem

const string kTaxIdItem = "\"tax_id\": "
static

Definition at line 56 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kUserNameItem

const string kUserNameItem = "\"username\": "
static

Definition at line 70 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ kVersionItem

const string kVersionItem = "\"version\": "
static

Definition at line 42 of file pubseq_gateway_convert_utils.cpp.

Referenced by ToJsonString().

◆ USING_NCBI_SCOPE

USING_NCBI_SCOPE

Definition at line 39 of file pubseq_gateway_convert_utils.cpp.

Modified on Sun Jul 21 04:22:08 2024 by modify_doxy.py rev. 669887