NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
CLDS2_DataLoader Class Reference

Search Toolkit Book for CLDS2_DataLoader

#include <objtools/data_loaders/lds2/lds2_dataloader.hpp>

+ Inheritance diagram for CLDS2_DataLoader:
+ Collaboration diagram for CLDS2_DataLoader:

Classes

class  CLDS2_LoaderMaker
 

Public Types

enum  ELockMode { eDefaultLockMode , eLockDatabase , eDoNotLockDatabase , eCacheDatabase }
 Database lock control. More...
 
typedef SRegisterLoaderInfo< CLDS2_DataLoaderTRegisterLoaderInfo
 
typedef CSimpleLoaderMaker< CLDS2_DataLoaderTSimpleMaker
 
typedef CParamLoaderMaker< CLDS2_DataLoader, CLDS2_Database & > TDbMaker
 
- Public Types inherited from CDataLoader
enum  EChoice {
  eBlob , eBioseq , eCore , eBioseqCore ,
  eSequence , eFeatures , eGraph , eAlign ,
  eAnnot , eExtFeatures , eExtGraph , eExtAlign ,
  eExtAnnot , eOrphanAnnot , eAll
}
 main blob is blob with sequence all other blobs are external and contain external annotations More...
 
typedef CTSE_Lock TTSE_Lock
 
typedef set< TTSE_LockTTSE_LockSet
 
typedef CRef< CTSE_Chunk_InfoTChunk
 
typedef vector< TChunkTChunkSet
 
typedef set< stringTProcessedNAs
 
typedef set< CSeq_id_HandleTSeq_idSet
 
typedef vector< CSeq_id_HandleTIds
 
typedef vector< boolTLoaded
 Bulk loading interface for a small pieces of information per id. More...
 
typedef vector< TIdsTBulkIds
 
typedef vector< TGiTGis
 
typedef vector< stringTLabels
 
typedef vector< TTaxIdTTaxIds
 
typedef vector< TSeqPosTSequenceLengths
 
typedef vector< CSeq_inst::TMolTSequenceTypes
 
typedef vector< intTSequenceStates
 
typedef vector< intTSequenceHashes
 
typedef vector< boolTHashKnown
 
typedef map< CSeq_id_Handle, TTSE_LockSetTTSE_LockSets
 
typedef vector< vector< CSeq_id_Handle > > TSeqIdSets
 
typedef vector< CTSE_LockTCDD_Locks
 
typedef CBlobIdKey TBlobId
 
typedef int TBlobVersion
 
typedef CRef< IEditSaverTEditSaver
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 

Public Member Functions

 CLDS2_DataLoader (void)
 
virtual ~CLDS2_DataLoader (void)
 
virtual TTSE_LockSet GetRecords (const CSeq_id_Handle &idh, EChoice choice)
 Request from a datasource using handles and ranges instead of seq-loc The TSEs loaded in this call will be added to the tse_set. More...
 
virtual TTSE_LockSet GetExternalRecords (const CBioseq_Info &bioseq)
 Request from a datasource set of blobs with external annotations. More...
 
virtual TTSE_LockSet GetExternalAnnotRecords (const CSeq_id_Handle &idh, const SAnnotSelector *sel)
 
virtual TTSE_LockSet GetExternalAnnotRecords (const CBioseq_Info &bioseq, const SAnnotSelector *sel)
 
virtual TTSE_Lock ResolveConflict (const CSeq_id_Handle &id, const TTSE_LockSet &tse_set)
 Resolve TSE conflict *select the best TSE from the set of dead TSEs. More...
 
virtual TBlobId GetBlobId (const CSeq_id_Handle &idh)
 
virtual bool CanGetBlobById (void) const
 
virtual TTSE_Lock GetBlobById (const TBlobId &blob_id)
 
virtual void GetIds (const CSeq_id_Handle &idh, TIds &ids)
 
virtual void GetChunk (TChunk chunk_info)
 
void RegisterUrlHandler (CLDS2_UrlHandler_Base *handler)
 Register URL handler. More...
 
virtual CObjectManager::TPriority GetDefaultPriority (void) const
 
- Public Member Functions inherited from CDataLoader
virtual ~CDataLoader (void)
 
TTSE_LockSet GetRecordsNoBlobState (const CSeq_id_Handle &idh, EChoice choice)
 The same as GetRecords() but always returns empty TSE lock set instead of throwing CBlobStateException. More...
 
virtual TTSE_LockSet GetDetailedRecords (const CSeq_id_Handle &idh, const SRequestDetails &details)
 Request from a datasource using handles and ranges instead of seq-loc The TSEs loaded in this call will be added to the tse_set. More...
 
virtual TTSE_LockSet GetOrphanAnnotRecords (const CSeq_id_Handle &idh, const SAnnotSelector *sel)
 old Get*AnnotRecords() methods More...
 
virtual TTSE_LockSet GetOrphanAnnotRecordsNA (const CSeq_id_Handle &idh, const SAnnotSelector *sel, TProcessedNAs *processed_nas)
 new Get*AnnotRecords() methods More...
 
virtual TTSE_LockSet GetOrphanAnnotRecordsNA (const TSeq_idSet &ids, const SAnnotSelector *sel, TProcessedNAs *processed_nas)
 
virtual TTSE_LockSet GetExternalAnnotRecordsNA (const CSeq_id_Handle &idh, const SAnnotSelector *sel, TProcessedNAs *processed_nas)
 
virtual TTSE_LockSet GetExternalAnnotRecordsNA (const CBioseq_Info &bioseq, const SAnnotSelector *sel, TProcessedNAs *processed_nas)
 
virtual void GetIds (const CSeq_id_Handle &idh, TIds &ids)
 Request for a list of all Seq-ids of a sequence. More...
 
bool SequenceExists (const CSeq_id_Handle &idh)
 helper function to check if sequence exists, uses GetIds() More...
 
virtual CSeq_id_Handle GetAccVer (const CSeq_id_Handle &idh)
 Request for a accession.version Seq-id of a sequence. More...
 
virtual SAccVerFound GetAccVerFound (const CSeq_id_Handle &idh)
 
virtual TGi GetGi (const CSeq_id_Handle &idh)
 Request for a gi of a sequence. More...
 
virtual SGiFound GetGiFound (const CSeq_id_Handle &idh)
 
virtual string GetLabel (const CSeq_id_Handle &idh)
 Request for a label string of a sequence. More...
 
virtual TTaxId GetTaxId (const CSeq_id_Handle &idh)
 Request for a taxonomy id of a sequence. More...
 
virtual TSeqPos GetSequenceLength (const CSeq_id_Handle &idh)
 Request for a length of a sequence. More...
 
virtual CSeq_inst::TMol GetSequenceType (const CSeq_id_Handle &idh)
 Request for a type of a sequence Returns CSeq_inst::eMol_not_set if sequence is not known. More...
 
virtual STypeFound GetSequenceTypeFound (const CSeq_id_Handle &idh)
 
virtual int GetSequenceState (const CSeq_id_Handle &idh)
 Request for a state of a sequence. More...
 
virtual int GetSequenceHash (const CSeq_id_Handle &idh)
 Request for a sequence hash. More...
 
virtual SHashFound GetSequenceHashFound (const CSeq_id_Handle &idh)
 
virtual void GetBulkIds (const TIds &ids, TLoaded &loaded, TBulkIds &ret)
 Bulk request for all Seq-ids of a set of sequences. More...
 
virtual void GetAccVers (const TIds &ids, TLoaded &loaded, TIds &ret)
 Bulk request for accession.version Seq-ids of a set of sequences. More...
 
virtual void GetGis (const TIds &ids, TLoaded &loaded, TGis &ret)
 Bulk request for gis of a set of sequences. More...
 
virtual void GetLabels (const TIds &ids, TLoaded &loaded, TLabels &ret)
 Bulk request for label strings of a set of sequences. More...
 
virtual void GetTaxIds (const TIds &ids, TLoaded &loaded, TTaxIds &ret)
 Bulk request for taxonomy ids of a set of sequences. More...
 
virtual void GetSequenceLengths (const TIds &ids, TLoaded &loaded, TSequenceLengths &ret)
 Bulk request for lengths of a set of sequences. More...
 
virtual void GetSequenceTypes (const TIds &ids, TLoaded &loaded, TSequenceTypes &ret)
 Bulk request for types of a set of sequences. More...
 
virtual void GetSequenceStates (const TIds &ids, TLoaded &loaded, TSequenceStates &ret)
 Bulk request for states of a set of sequences. More...
 
virtual void GetSequenceHashes (const TIds &ids, TLoaded &loaded, TSequenceHashes &ret, THashKnown &known)
 Bulk request for hashes of a set of sequences. More...
 
virtual void GetCDDAnnots (const TSeqIdSets &id_sets, TLoaded &loaded, TCDD_Locks &ret)
 
virtual void GetBlobs (TTSE_LockSets &tse_sets)
 
virtual TBlobId GetBlobIdFromString (const string &str) const
 
virtual TBlobVersion GetBlobVersion (const TBlobId &id)
 
virtual SRequestDetails ChoiceToDetails (EChoice choice) const
 
virtual EChoice DetailsToChoice (const SRequestDetails::TAnnotSet &annots) const
 
virtual EChoice DetailsToChoice (const SRequestDetails &details) const
 
virtual void GetChunks (const TChunkSet &chunks)
 
virtual void DropTSE (CRef< CTSE_Info > tse_info)
 
void SetTargetDataSource (CDataSource &data_source)
 Specify datasource to send loaded data to. More...
 
string GetName (void) const
 
virtual void GC (void)
 
virtual TEditSaver GetEditSaver () const
 
virtual Uint4 EstimateLoadBytes (const CTSE_Chunk_Info &chunk) const
 
virtual double EstimateLoadSeconds (const CTSE_Chunk_Info &chunk, Uint4 bytes) const
 
virtual unsigned GetDefaultBlobCacheSizeLimit () const
 
virtual bool GetTrackSplitSeq () const
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 

Static Public Member Functions

static TRegisterLoaderInfo RegisterInObjectManager (CObjectManager &om, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
 Argument-less loader - for compatibility only, unusable. More...
 
static string GetLoaderNameFromArgs (void)
 
static TRegisterLoaderInfo RegisterInObjectManager (CObjectManager &om, const string &db_path, CFastaReader::TFlags fasta_flags=-1, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet, ELockMode lock_mode=eDefaultLockMode)
 Use the specified database file. More...
 
static string GetLoaderNameFromArgs (const string &db_path)
 
static TRegisterLoaderInfo RegisterInObjectManager (CObjectManager &om, CLDS2_Database &lds_db, CFastaReader::TFlags fasta_flags=-1, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet, ELockMode lock_mode=eDefaultLockMode)
 Use the existing LDS2 database object and optional fasta flags. More...
 
static string GetLoaderNameFromArgs (CLDS2_Database &lds_db)
 
- Static Public Member Functions inherited from CDataLoader
static bool IsRequestedAnyNA (const SAnnotSelector *sel)
 
static bool IsRequestedNA (const string &na, const SAnnotSelector *sel)
 
static bool IsProcessedNA (const string &na, const TProcessedNAs *processed_nas)
 
static void SetProcessedNA (const string &na, TProcessedNAs *processed_nas)
 
- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 

Private Types

typedef CLDS2_Database::TBlobSet TBlobSet
 
typedef map< string, CRef< CLDS2_UrlHandler_Base > > THandlers
 

Private Member Functions

void x_LoadBlobs (const TBlobSet &blobs, TTSE_LockSet &locks)
 
void x_LoadTSE (CTSE_LoadLock &load_lock, const SLDS2_Blob &blob)
 
CRef< CSeq_entryx_LoadFastaTSE (CNcbiIstream &in, const SLDS2_Blob &blob)
 
CLDS2_UrlHandler_Basex_GetUrlHandler (const SLDS2_File &info)
 
 CLDS2_DataLoader (const CLDS2_DataLoader &)
 
void operator== (const CLDS2_DataLoader &)
 
 CLDS2_DataLoader (const string &dl_name)
 
 CLDS2_DataLoader (const string &dl_name, CLDS2_Database &lds_db, CFastaReader::TFlags fasta_flags)
 

Private Attributes

CRef< CLDS2_Databasem_Db
 
CFastaReader::TFlags m_FastaFlags
 
THandlers m_Handlers
 

Friends

class CSimpleLoaderMaker< CLDS2_DataLoader >
 
class CParamLoaderMaker< CLDS2_DataLoader, CLDS2_Database & >
 
class CLDS2_LoaderMaker
 

Additional Inherited Members

- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 
- Protected Member Functions inherited from CDataLoader
 CDataLoader (void)
 
 CDataLoader (const string &loader_name)
 
void SetName (const string &loader_name)
 
CDataSourceGetDataSource (void) const
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 
- Static Protected Member Functions inherited from CDataLoader
static void RegisterInObjectManager (CObjectManager &om, CLoaderMaker_Base &loader_maker, CObjectManager::EIsDefault is_default, CObjectManager::TPriority priority)
 Register the loader only if the name is not yet registered in the object manager. More...
 

Detailed Description

Definition at line 58 of file lds2_dataloader.hpp.

Member Typedef Documentation

◆ TBlobSet

Definition at line 162 of file lds2_dataloader.hpp.

◆ TDbMaker

Definition at line 133 of file lds2_dataloader.hpp.

◆ THandlers

Definition at line 185 of file lds2_dataloader.hpp.

◆ TRegisterLoaderInfo

Definition at line 61 of file lds2_dataloader.hpp.

◆ TSimpleMaker

Definition at line 132 of file lds2_dataloader.hpp.

Member Enumeration Documentation

◆ ELockMode

Database lock control.

By default the database is locked so that no other process can access it while the data loader exists. The default mode can be changed throug env/ini value LDS2_DATALOADER_LOCK = {lock | nolock}. If an explicit mode is set in the code, the env/ini parameter is ignored. NOTE: To set locks the database must be writable.

Enumerator
eDefaultLockMode 

Use LDS2_DATALOADER_LOCK parameter, lock by default.

eLockDatabase 

Lock the database.

eDoNotLockDatabase 

Do not lock the database.

eCacheDatabase 

Clone the database into memory.

Definition at line 69 of file lds2_dataloader.hpp.

Constructor & Destructor Documentation

◆ CLDS2_DataLoader() [1/4]

CLDS2_DataLoader::CLDS2_DataLoader ( void  )

◆ ~CLDS2_DataLoader()

CLDS2_DataLoader::~CLDS2_DataLoader ( void  )
virtual

Definition at line 239 of file lds2_dataloader.cpp.

References CLDS2_Database::EndRead(), and m_Db.

◆ CLDS2_DataLoader() [2/4]

CLDS2_DataLoader::CLDS2_DataLoader ( const CLDS2_DataLoader )
private

◆ CLDS2_DataLoader() [3/4]

CLDS2_DataLoader::CLDS2_DataLoader ( const string dl_name)
private

Definition at line 208 of file lds2_dataloader.cpp.

◆ CLDS2_DataLoader() [4/4]

CLDS2_DataLoader::CLDS2_DataLoader ( const string dl_name,
CLDS2_Database lds_db,
CFastaReader::TFlags  fasta_flags 
)
private

Member Function Documentation

◆ CanGetBlobById()

bool CLDS2_DataLoader::CanGetBlobById ( void  ) const
virtual

Reimplemented from CDataLoader.

Definition at line 565 of file lds2_dataloader.cpp.

◆ GetBlobById()

CLDS2_DataLoader::TTSE_Lock CLDS2_DataLoader::GetBlobById ( const TBlobId blob_id)
virtual

◆ GetBlobId()

CLDS2_DataLoader::TBlobId CLDS2_DataLoader::GetBlobId ( const CSeq_id_Handle idh)
virtual

Reimplemented from CDataLoader.

Definition at line 558 of file lds2_dataloader.cpp.

References CLDS2_Database::GetBlobInfo(), SLDS2_Blob::id, m_Db, and s_Int8ToBlobId().

◆ GetChunk()

void CLDS2_DataLoader::GetChunk ( TChunk  chunk_info)
virtual

◆ GetDefaultPriority()

CObjectManager::TPriority CLDS2_DataLoader::GetDefaultPriority ( void  ) const
virtual

Reimplemented from CDataLoader.

Definition at line 676 of file lds2_dataloader.cpp.

References CObjectManager::kPriority_Local.

◆ GetExternalAnnotRecords() [1/2]

CLDS2_DataLoader::TTSE_LockSet CLDS2_DataLoader::GetExternalAnnotRecords ( const CBioseq_Info bioseq,
const SAnnotSelector sel 
)
virtual

Reimplemented from CDataLoader.

Definition at line 527 of file lds2_dataloader.cpp.

References GetExternalRecords().

◆ GetExternalAnnotRecords() [2/2]

CLDS2_DataLoader::TTSE_LockSet CLDS2_DataLoader::GetExternalAnnotRecords ( const CSeq_id_Handle idh,
const SAnnotSelector sel 
)
virtual

Reimplemented from CDataLoader.

Definition at line 519 of file lds2_dataloader.cpp.

References CDataLoader::eExtAnnot, and GetRecords().

◆ GetExternalRecords()

CLDS2_DataLoader::TTSE_LockSet CLDS2_DataLoader::GetExternalRecords ( const CBioseq_Info bioseq)
virtual

Request from a datasource set of blobs with external annotations.

CDataLoader has reasonable default implementation.

Reimplemented from CDataLoader.

Definition at line 503 of file lds2_dataloader.cpp.

References set< Key, Compare >::begin(), CDataLoader::eExtAnnot, set< Key, Compare >::empty(), set< Key, Compare >::end(), CBioseq_Info::GetId(), GetRecords(), set< Key, Compare >::insert(), and ITERATE.

Referenced by GetExternalAnnotRecords().

◆ GetIds()

void CLDS2_DataLoader::GetIds ( const CSeq_id_Handle idh,
TIds ids 
)
virtual

Definition at line 600 of file lds2_dataloader.cpp.

References CLDS2_Database::GetSynonyms(), and m_Db.

◆ GetLoaderNameFromArgs() [1/3]

string CLDS2_DataLoader::GetLoaderNameFromArgs ( CLDS2_Database lds_db)
static

Definition at line 108 of file lds2_dataloader.cpp.

References CLDS2_Database::GetDbFile(), and GetLoaderNameFromArgs().

◆ GetLoaderNameFromArgs() [2/3]

string CLDS2_DataLoader::GetLoaderNameFromArgs ( const string db_path)
static

Definition at line 93 of file lds2_dataloader.cpp.

References CDirEntry::CreateAbsolutePath().

◆ GetLoaderNameFromArgs() [3/3]

string CLDS2_DataLoader::GetLoaderNameFromArgs ( void  )
static

◆ GetRecords()

CDataLoader::TTSE_LockSet CLDS2_DataLoader::GetRecords ( const CSeq_id_Handle idh,
EChoice  choice 
)
virtual

Request from a datasource using handles and ranges instead of seq-loc The TSEs loaded in this call will be added to the tse_set.

The GetRecords() may throw CBlobStateException if the sequence is not available (not known or disabled), and blob state is different from minimal fState_no_data. The actual blob state can be read from the exception in this case.

Reimplemented from CDataLoader.

Definition at line 460 of file lds2_dataloader.cpp.

References CDataLoader::eAlign, CDataLoader::eAll, CDataLoader::eAnnot, CDataLoader::eBioseq, CDataLoader::eBioseqCore, CDataLoader::eBlob, CDataLoader::eCore, CDataLoader::eExtAlign, CDataLoader::eExtAnnot, CDataLoader::eExtFeatures, CDataLoader::eExtGraph, CDataLoader::eFeatures, CDataLoader::eGraph, CDataLoader::eOrphanAnnot, CDataLoader::eSequence, CLDS2_Database::fAnnot_All, CLDS2_Database::fAnnot_External, CLDS2_Database::fAnnot_Internal, CLDS2_Database::GetAnnotBlobs(), CLDS2_Database::GetBioseqBlobs(), CLDS2_Database::GetBioseqId(), m_Db, and x_LoadBlobs().

Referenced by GetExternalAnnotRecords(), and GetExternalRecords().

◆ operator==()

void CLDS2_DataLoader::operator== ( const CLDS2_DataLoader )
private

◆ RegisterInObjectManager() [1/3]

CLDS2_DataLoader::TRegisterLoaderInfo CLDS2_DataLoader::RegisterInObjectManager ( CObjectManager om,
CLDS2_Database lds_db,
CFastaReader::TFlags  fasta_flags = -1,
CObjectManager::EIsDefault  is_default = CObjectManager::eNonDefault,
CObjectManager::TPriority  priority = CObjectManager::kPriority_NotSet,
ELockMode  lock_mode = eDefaultLockMode 
)
static

Use the existing LDS2 database object and optional fasta flags.

Definition at line 142 of file lds2_dataloader.cpp.

References CSimpleLoaderMaker< TDataLoader >::GetRegisterInfo(), om, and CDataLoader::RegisterInObjectManager().

◆ RegisterInObjectManager() [2/3]

◆ RegisterInObjectManager() [3/3]

CLDS2_DataLoader::TRegisterLoaderInfo CLDS2_DataLoader::RegisterInObjectManager ( CObjectManager om,
const string db_path,
CFastaReader::TFlags  fasta_flags = -1,
CObjectManager::EIsDefault  is_default = CObjectManager::eNonDefault,
CObjectManager::TPriority  priority = CObjectManager::kPriority_NotSet,
ELockMode  lock_mode = eDefaultLockMode 
)
static

Use the specified database file.

Definition at line 127 of file lds2_dataloader.cpp.

References CSimpleLoaderMaker< TDataLoader >::GetRegisterInfo(), om, and CDataLoader::RegisterInObjectManager().

◆ RegisterUrlHandler()

void CLDS2_DataLoader::RegisterUrlHandler ( CLDS2_UrlHandler_Base handler)

Register URL handler.

The default handlers "file" and "gzipfile" for local files are registered automatically.

Definition at line 247 of file lds2_dataloader.cpp.

References _ASSERT, m_Handlers, and Ref().

Referenced by CLDS2_DataLoader().

◆ ResolveConflict()

CDataLoader::TTSE_Lock CLDS2_DataLoader::ResolveConflict ( const CSeq_id_Handle id,
const TTSE_LockSet tse_set 
)
virtual

Resolve TSE conflict *select the best TSE from the set of dead TSEs.

*select the live TSE from the list of live TSEs and mark the others one as dead.

Reimplemented from CDataLoader.

Definition at line 535 of file lds2_dataloader.cpp.

References CTSE_Info::GetBlobId(), CBlobIdFor< Value, Converter >::GetValue(), and ITERATE.

◆ x_GetUrlHandler()

CLDS2_UrlHandler_Base * CLDS2_DataLoader::x_GetUrlHandler ( const SLDS2_File info)
private

◆ x_LoadBlobs()

void CLDS2_DataLoader::x_LoadBlobs ( const TBlobSet blobs,
TTSE_LockSet locks 
)
private

◆ x_LoadFastaTSE()

CRef< CSeq_entry > CLDS2_DataLoader::x_LoadFastaTSE ( CNcbiIstream in,
const SLDS2_Blob blob 
)
private

Definition at line 287 of file lds2_dataloader.cpp.

References in(), m_FastaFlags, and CFastaReader::ReadOneSeq().

Referenced by x_LoadTSE().

◆ x_LoadTSE()

void CLDS2_DataLoader::x_LoadTSE ( CTSE_LoadLock load_lock,
const SLDS2_Blob blob 
)
private

Definition at line 296 of file lds2_dataloader.cpp.

References _ASSERT, CTSE_Split_Info::AddChunk(), copy(), CSeq_annot_Base::C_Data::e_Align, CSeq_annot_Base::C_Data::e_Ftable, CSeq_annot_Base::C_Data::e_Graph, CFormatGuess::eBinaryASN, SLDS2_Blob::eBioseq, SLDS2_Blob::eBioseq_set, SLDS2_Blob::eBioseq_set_element, CFormatGuess::eFasta, CObjectIStream::eNoFileHeader, ERR_POST_X, SLDS2_Blob::eSeq_align, SLDS2_Annot::eSeq_align, SLDS2_Blob::eSeq_align_set, SLDS2_Blob::eSeq_annot, SLDS2_Blob::eSeq_entry, SLDS2_Annot::eSeq_feat, SLDS2_Annot::eSeq_graph, SLDS2_Blob::eSeq_submit, eSerial_AsnBinary, eSerial_AsnText, eSerial_Xml, CFormatGuess::eTextASN, CFormatGuess::eXml, SLDS2_Blob::file_id, SLDS2_Blob::file_pos, SLDS2_File::format, CLDS2_Database::GetAnnots(), CSeq_submit_Base::GetData(), CSeq_submit_Base::C_Data::GetEntrys(), CLDS2_Database::GetFileInfo(), CTSE_Info::GetSplitInfo(), CObjectTypeInfo::GetTypeInfo(), SLDS2_File::handler, SLDS2_Blob::id, in(), SLDS2_Annot::is_named, CSeq_submit::IsEntrys(), ITERATE, m_Db, SLDS2_File::name, SLDS2_Annot::name, CObjectIStream::Open(), SLDS2_Annot::ref_ids, CRef< C, Locker >::Reset(), SAnnotTypeSelector::SetAnnotType(), CBioseq_set_Info::SetId(), CTSE_LoadLock::SetLoaded(), CAnnotName::SetNamed(), CTSE_Info::SetSeq_entry(), CSeq_entry_Info::SetSet(), CAnnotName::SetUnnamed(), SLDS2_Blob::type, SLDS2_Annot::type, CTSE_Chunk_Info::x_AddAnnotPlace(), CTSE_Chunk_Info::x_AddAnnotType(), x_GetUrlHandler(), and x_LoadFastaTSE().

Referenced by GetBlobById(), and x_LoadBlobs().

Friends And Related Function Documentation

◆ CLDS2_LoaderMaker

friend class CLDS2_LoaderMaker
friend

Definition at line 160 of file lds2_dataloader.hpp.

◆ CParamLoaderMaker< CLDS2_DataLoader, CLDS2_Database & >

Definition at line 133 of file lds2_dataloader.hpp.

◆ CSimpleLoaderMaker< CLDS2_DataLoader >

friend class CSimpleLoaderMaker< CLDS2_DataLoader >
friend

Definition at line 133 of file lds2_dataloader.hpp.

Member Data Documentation

◆ m_Db

CRef<CLDS2_Database> CLDS2_DataLoader::m_Db
private

◆ m_FastaFlags

CFastaReader::TFlags CLDS2_DataLoader::m_FastaFlags
private

◆ m_Handlers

THandlers CLDS2_DataLoader::m_Handlers
private

Definition at line 189 of file lds2_dataloader.hpp.

Referenced by RegisterUrlHandler(), and x_GetUrlHandler().


The documentation for this class was generated from the following files:
Modified on Tue Jul 23 17:52:42 2024 by modify_doxy.py rev. 669887