1 #ifndef OBJECTS_OBJMGR___DATA_LOADER__HPP
2 #define OBJECTS_OBJMGR___DATA_LOADER__HPP
122 template <
class TDataLoader>
128 m_Name = TDataLoader::GetLoaderNameFromArgs();
135 return new TDataLoader(
m_Name);
149 template <
class TDataLoader,
class TParam>
159 m_Name = TDataLoader::GetLoaderNameFromArgs(param);
235 static bool IsRequestedNA(
const string& na,
const SAnnotSelector* sel);
236 static bool IsProcessedNA(
const string& na,
const TProcessedNAs* processed_nas);
237 static void SetProcessedNA(
const string& na,
TProcessedNAs* processed_nas);
283 typedef vector<CSeq_id_Handle>
TIds;
350 virtual STypeFound GetSequenceTypeFound(
const CSeq_id_Handle& idh);
370 : sequence_found(
false),
376 virtual SHashFound GetSequenceHashFound(
const CSeq_id_Handle& idh);
407 virtual void GetSequenceLengths(
const TIds& ids,
TLoaded& loaded,
410 virtual void GetSequenceTypes(
const TIds& ids,
TLoaded& loaded,
413 virtual void GetSequenceStates(
const TIds& ids,
TLoaded& loaded,
416 virtual void GetSequenceHashes(
const TIds& ids,
TLoaded& loaded,
429 virtual TBlobId GetBlobIdFromString(
const string&
str)
const;
432 virtual bool CanGetBlobById(
void)
const;
439 virtual void GetChunk(
TChunk chunk_info);
440 virtual void GetChunks(
const TChunkSet& chunks);
446 void SetTargetDataSource(
CDataSource& data_source);
448 string GetName(
void)
const;
456 virtual void GC(
void);
466 virtual unsigned GetDefaultBlobCacheSizeLimit()
const;
467 virtual bool GetTrackSplitSeq()
const;
472 static void RegisterInObjectManager(
478 void SetName(
const string& loader_name);
pair< string, int > GetAccVer(const CAlignModel &a, CScope &scope)
Template function to create dll resolver for interface.
Service class for DLLs resolution.
IEditSaver * GetEditSaver(const Handle &handle)
unsigned int TSeqPos
Type for sequence locations and lengths.
SStrictId_Tax::TId TTaxId
Taxon id type.
string GetLabel(const CSeq_id &id)
TTaxId GetTaxId(const CBioseq_Handle &handle)
return the tax-id associated with a given sequence.
virtual CDataLoader * CreateLoader(void) const
SRegisterLoaderInfo< TDataLoader > TRegisterInfo
CParamLoaderMaker(TParam param)
CDataLoader(const CDataLoader &)
TLoader * GetLoader(void) const
Get pointer to the loader.
CRef< IEditSaver > TEditSaver
set< CSeq_id_Handle > TSeq_idSet
set< SAnnotTypeSelector > TAnnotTypesSet
vector< TSeqPos > TSequenceLengths
CDataLoader & operator=(const CDataLoader &)
vector< CTSE_Lock > TCDD_Locks
virtual CDataLoader * CreateLoader(void) const =0
vector< CSeq_id_Handle > TIds
SRegisterLoaderInfo< TDataLoader > TRegisterInfo
virtual ~CParamLoaderMaker(void)
vector< bool > THashKnown
TRegisterInfo GetRegisterInfo(void)
virtual CDataLoader * CreateLoader(void) const
virtual ~CSimpleLoaderMaker(void)
CRef< CTSE_Chunk_Info > TChunk
EChoice
main blob is blob with sequence all other blobs are external and contain external annotations
CPluginManager_DllResolver * operator()(void)
vector< CSeq_inst::TMol > TSequenceTypes
vector< vector< CSeq_id_Handle > > TSeqIdSets
TRegisterInfo_Base m_RegisterInfo
EIsDefault
Flag defining if the data loader is included in the "default" group.
map< CSeq_id_Handle, TTSE_LockSet > TTSE_LockSets
TRegisterInfo GetRegisterInfo(void)
set< string > TProcessedNAs
vector< bool > TLoaded
Bulk loading interface for a small pieces of information per id.
bool IsCreated(void) const
Return true if the loader was just created, false if already registered or if the operation failed.
TAnnotBlobType m_AnnotBlobType
virtual ~CLoaderMaker_Base(void)
SRegisterLoaderInfo< CDataLoader > TRegisterInfo_Base
NCBI_DECLARE_INTERFACE_VERSION(objects::CDataLoader, "xloader", 8, 0, 0)
map< CAnnotName, TAnnotTypesSet > TAnnotSet
vector< int > TSequenceStates
vector< int > TSequenceHashes
vector< TChunk > TChunkSet
CDataSource * m_DataSource
set< TTSE_Lock > TTSE_LockSet
@ eExtFeatures
external features
@ eExtAnnot
all external annotations
@ eExtAlign
external aligns
@ eOrphanAnnot
all external annotations if no Bioseq exists
@ eGraph
graph annotations from main blob
@ eCore
?only seq-entry core?
@ eAnnot
all annotations from main blob
@ eBioseq
main blob with complete bioseq
@ eAlign
aligns from main blob
@ eBioseqCore
main blob with bioseq core (no seqdata and annots)
@ eExtGraph
external graph annotations
@ eFeatures
features from main blob
virtual void SetDllNamePrefix(const string &prefix)
Set DLL file name prefix.
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_XOBJMGR_EXPORT
EMol
molecule class in living organism
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
Plugin manager (using class factory paradigm).
static bool GetIds(const T &d, set< string > &labels, const string name="", bool detect=false, bool found=false)
Uint4 GetSequenceType(const CBioseq_Handle &bsh)
Return a (corrected) set of flags identifying the sequence type.
CRef< objects::CObjectManager > om
static const char * str(char *buf, int n)
Better replacement of GetAccVer(), this method should be defined in data loaders, GetAccVer() is left...
Better replacement of GetGi(), this method should be defined in data loaders, GetGi() is left for com...
Better replacement of GetSequenceHash(), this method should be defined in data loaders,...
Better replacement of GetSequenceType(), this method should be defined in data loaders,...