1 #ifndef GBLOADER__HPP_INCLUDED
2 #define GBLOADER__HPP_INCLUDED
43 #if !defined(NDEBUG) && defined(DEBUG_SYNC)
58 #define GENBANK_NEW_READER_WRITER
105 m_LoaderName = loader_name;
114 m_LoaderMethod = loader_method;
119 return m_LoaderMethod;
124 m_ReaderName = reader_name;
133 m_WriterName = writer_name;
140 void SetReaderPtr(
CReader* reader_ptr);
141 CReader* GetReaderPtr(
void)
const;
160 m_HasHUPIncluded = include_hup;
161 m_WebCookie = web_cookie;
165 return m_HasHUPIncluded;
175 return m_PSGServiceName;
180 m_PSGServiceName = service_name;
183 bool GetUsePSG()
const;
187 m_UsePSGInitialized =
true;
197 m_PSGNoSplit = no_split;
200 bool IsSetEnableSNP(
void)
const;
201 bool GetEnableSNP(
void)
const;
202 void SetEnableSNP(
bool enable);
204 bool IsSetEnableWGS(
void)
const;
205 bool GetEnableWGS(
void)
const;
206 void SetEnableWGS(
bool enable);
208 bool IsSetEnableCDD(
void)
const;
209 bool GetEnableCDD(
void)
const;
210 void SetEnableCDD(
bool enable);
245 int sub_sat = 0)
const = 0;
255 static string GetLoaderNameFromArgs(
CReader* reader = 0);
267 static TRegisterLoaderInfo RegisterInObjectManager(
269 const string& reader_name,
272 static string GetLoaderNameFromArgs(
const string& reader_name);
278 static TRegisterLoaderInfo RegisterInObjectManager(
280 EIncludeHUP include_hup,
283 static string GetLoaderNameFromArgs(EIncludeHUP include_hup);
284 static TRegisterLoaderInfo RegisterInObjectManager(
286 EIncludeHUP include_hup,
287 const string& web_cookie,
290 static string GetLoaderNameFromArgs(EIncludeHUP include_hup,
291 const string& web_cookie);
296 static TRegisterLoaderInfo RegisterInObjectManager(
298 const string& reader_name,
299 EIncludeHUP include_hup,
302 static string GetLoaderNameFromArgs(
const string& reader_name,
303 EIncludeHUP include_hup);
304 static TRegisterLoaderInfo RegisterInObjectManager(
306 const string& reader_name,
307 EIncludeHUP include_hup,
308 const string& web_cookie,
311 static string GetLoaderNameFromArgs(
const string& reader_name,
312 EIncludeHUP include_hup,
313 const string& web_cookie);
323 static string GetLoaderNameFromArgs(
const TParamTree& params);
336 const string& named_acc) = 0;
348 const string& subnode_name);
351 const string& reader_name);
353 const string& param_name,
354 const string& param_value);
360 const string& subnode_name);
363 const string& reader_name);
364 static string GetParam(
const TParamTree* params,
365 const string& param_name);
376 time_t access_timeout = 0) = 0;
383 return m_IdExpirationTimeout;
389 return m_AlwaysLoadExternal;
394 m_AlwaysLoadExternal = flag;
399 return m_AlwaysLoadNamedAcc;
404 m_AlwaysLoadNamedAcc = flag;
409 return m_AddWGSMasterDescr;
414 m_AddWGSMasterDescr = flag;
419 return m_HasHUPIncluded;
425 return m_PTISErrorAction;
430 m_PTISErrorAction = action;
434 virtual bool GetTrackSplitSeq()
const override;
437 template <
class TDataLoader>
451 return new TDataLoader(m_Name, m_Params);
457 info.Set(m_RegisterInfo.GetLoader(), m_RegisterInfo.IsCreated());
466 static string x_GetLoaderMethod(
const TParamTree* params);
483 static bool IsUsingPSGLoader(
void);
TRegisterInfo GetRegisterInfo(void)
virtual CDataLoader * CreateLoader(void) const
SRegisterLoaderInfo< CGBDataLoader > TRegisterInfo
virtual ~CGBLoaderMaker(void)
CGBLoaderMaker(const CGBLoaderParams ¶ms)
virtual TRealBlobId x_GetRealBlobId(const TBlobId &blob_id) const =0
void SetAlwaysLoadExternal(bool flag)
static string GetLoaderNameFromArgs(CReader *reader=0)
virtual void CloseCache(void)=0
virtual void PurgeCache(TCacheType cache_type, time_t access_timeout=0)=0
void SetAddWGSMasterDescr(bool flag)
TExpirationTimeout m_IdExpirationTimeout
virtual TNamedAnnotNames GetNamedAnnotAccessions(const CSeq_id_Handle &idh)=0
void SetIdExpirationTimeout(TExpirationTimeout timeout)
bool GetAlwaysLoadExternal(void) const
virtual TBlobId GetBlobIdFromSatSatKey(int sat, int sat_key, int sub_sat=0) const =0
bool GetAddWGSMasterDescr(void) const
bool m_AlwaysLoadExternal
EGBErrorAction GetPTISErrorAction(void) const
CGBDataLoader(const CGBDataLoader &)
bool HasHUPIncluded(void) const
void SetAlwaysLoadNamedAcc(bool flag)
TExpirationTimeout GetIdExpirationTimeout(void) const
EGBErrorAction m_PTISErrorAction
void SetPTISErrorAction(EGBErrorAction action)
virtual TNamedAnnotNames GetNamedAnnotAccessions(const CSeq_id_Handle &idh, const string &named_acc)=0
set< string > TNamedAnnotNames
TPluginManagerParamTree TParamTree
bool GetAlwaysLoadNamedAcc(void) const
bool m_AlwaysLoadNamedAcc
CGBDataLoader & operator=(const CGBDataLoader &)
virtual bool HaveCache(TCacheType cache_type=fCache_Any)=0
CReaderCacheManager::TCacheType TCacheType
SRegisterLoaderInfo< CGBDataLoader > TRegisterLoaderInfo
bool GetPSGNoSplit(void) const
const string & GetPSGServiceName(void) const
const string & GetLoaderMethod(void) const
EPreopenConnection m_Preopen
const string & GetLoaderName(void) const
TPluginManagerParamTree TParamTree
void SetPSGNoSplit(bool no_split)
EPreopenConnection GetPreopenConnection(void) const
const TParamTree * m_ParamTree
void SetReaderName(const string &reader_name)
void SetPSGServiceName(const string &service_name)
const TParamTree * GetParamTree(void) const
void SetPreopenConnection(EPreopenConnection preopen=ePreopenAlways)
CRef< CReader > m_ReaderPtr
void SetLoaderMethod(const string &loader_method)
CNullable< bool > m_EnableCDD
void SetWriterName(const string &writer_name)
CNullable< bool > m_EnableSNP
void SetUsePSG(bool use_psg=true)
const string & GetWebCookie(void) const
const string & GetWriterName(void) const
CNullable< bool > m_EnableWGS
bool HasHUPIncluded(void) const
CGBLoaderParams & operator=(const CGBLoaderParams &)
const string & GetReaderName(void) const
void SetHUPIncluded(bool include_hup=true, const string &web_cookie=NcbiEmptyString)
CGBLoaderParams(TParamTreePtr param_tree)
CGBLoaderParams(const CGBLoaderParams &)
CGBLoaderParams(TReaderPtr reader_ptr)
const TPluginManagerParamTree * TParamTreePtr
void SetLoaderName(const string &loader_name)
definition of a Culling tree
Include a standard set of the NCBI C++ Toolkit most basic headers.
NCBI_PARAM_DECL(string, GENBANK, LOADER_METHOD)
void NCBI_EntryPoint_xloader_genbank(CPluginManager< objects::CDataLoader >::TDriverInfoList &info_list, CPluginManager< objects::CDataLoader >::EEntryPointRequest method)
void NCBI_EntryPoint_DataLoader_GB(CPluginManager< objects::CDataLoader >::TDriverInfoList &info_list, CPluginManager< objects::CDataLoader >::EEntryPointRequest method)
EIsDefault
Flag defining if the data loader is included in the "default" group.
@ kPriority_NotSet
Deprecated: use kPriority_Default instead.
list< SDriverInfo > TDriverInfoList
List of driver information.
EEntryPointRequest
Actions performed by the entry point.
uint32_t Uint4
4-byte (32-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
#define NCBI_XLOADER_GENBANK_EXPORT
Interfaces for a local cache of versioned binary large objects (BLOBS).
Multi-threading – mutexes; rw-locks; semaphore.
Multi-threading – classes, functions, and features.
Plugin manager (using class factory paradigm).
CRef< objects::CObjectManager > om