![]() |
The Gaudi Framework
v41r0 (bdbe7744)
|
This class constitutes the core of the XML based FileCatalog API. More...
#include </builds/gaudi/Gaudi/GaudiUtils/src/component/XMLFileCatalog.h>


Public Member Functions | |
| XMLFileCatalog (CSTR url, IMessageSvc *m) | |
| Create a catalog file, initialization of XercesC. | |
| std::string | createFID () const override |
| Catalog interface. | |
| CSTR | connectInfo () const override |
| Access to connect string. | |
| void | init () override |
| Parse the DOM tree of the XML catalog. | |
| void | commit () override |
| Save DOM catalog to file. | |
| void | rollback () override |
| Save DOM catalog to file. | |
| bool | readOnly () const override |
| Check if the catalog is read-only. | |
| bool | dirty () const override |
| Check if the catalog should be updated. | |
| bool | existsPFN (CSTR pfn) const override |
| Return the status of a physical file name. | |
| std::string | lookupPFN (CSTR fid) const override |
| Lookup file identifier by physical file name. | |
| bool | existsLFN (CSTR lfn) const override |
| Return the status of a logical file name. | |
| std::string | lookupLFN (CSTR lfn) const override |
| Lookup file identifier by logical file name. | |
| bool | existsFID (CSTR fid) const override |
| Return the status of a FileID. | |
| void | getPFN (CSTR fid, Files &files) const override |
| Dump all physical file names of the catalog and their attributes associate to the FileID. | |
| void | getLFN (CSTR fid, Files &files) const override |
| Dump all logical file names of the catalog associate to the FileID. | |
| void | getFID (Strings &fids) const override |
| Dump all file Identifiers. | |
| void | deleteFID (CSTR FileID) const override |
| Delete FileID Node from the catalog. | |
| void | registerPFN (CSTR fid, CSTR pfn, CSTR ftype) const override |
| Create a FileID and Node of the physical file name with all the attributes. | |
| void | registerLFN (CSTR fid, CSTR lfn) const override |
| Create a FileID and Node of the logical file name with all the attributes. | |
| void | registerFID (CSTR fid) const override |
| Create a FileID and Node. | |
| void | renamePFN (CSTR pfn, CSTR new_pfn) const override |
| rename a PFN | |
| void | deletePFN (CSTR pfn) const override |
| remove a PFN | |
| void | getMetaData (CSTR fid, Attributes &attr) const override |
| Dump all MetaData of the catalog for a given file ID. | |
| std::string | getMetaDataItem (CSTR fid, CSTR name) const override |
| Access metadata item. | |
| void | setMetaData (CSTR fid, CSTR name, CSTR value) const override |
| Insert/update metadata item. | |
| void | dropMetaData (CSTR fid) const override |
| Drop all metadata of one FID. | |
| void | dropMetaData (CSTR fid, CSTR attr) const override |
| Drop specified metadata item. | |
| Public Member Functions inherited from implements< IFileCatalog > | |
| void const * | i_cast (const InterfaceID &tid) const override |
| Implementation of IInterface::i_cast. | |
| StatusCode | queryInterface (const InterfaceID &ti, void **pp) override |
| Implementation of IInterface::queryInterface. | |
| std::vector< std::string > | getInterfaceNames () const override |
| Implementation of IInterface::getInterfaceNames. | |
| implements ()=default | |
| Default constructor. | |
| implements & | operator= (const implements &) |
| Assignment operator (do not touch the reference count). | |
| unsigned long | addRef () const override |
| Reference Interface instance. | |
| unsigned long | release () const override |
| Release Interface instance. | |
| unsigned long | refCount () const override |
| Current reference count. | |
Protected Types | |
| typedef const std::string & | CSTR |
Private Member Functions | |
| xercesc::DOMDocument * | getDoc (bool throw_if_no_exists=true) const |
| std::string | getfile (bool create) |
| void | printError (CSTR msg, bool throw_exc=true) const |
| std::string | lookupFID (CSTR lfn) const |
| xercesc::DOMNode * | element (CSTR fid, bool print_err=true) const |
| xercesc::DOMNode * | child (xercesc::DOMNode *par, CSTR tag, CSTR attr="", CSTR val="") const |
| std::pair< xercesc::DOMElement *, xercesc::DOMElement * > | i_registerFID (CSTR fid) const |
Private Attributes | |
| bool | m_rdOnly = false |
| bool | m_update = false |
| xercesc::DOMDocument * | m_doc = nullptr |
| std::unique_ptr< xercesc::XercesDOMParser > | m_parser |
| std::unique_ptr< xercesc::ErrorHandler > | m_errHdlr |
| std::string | m_file |
| IMessageSvc * | m_msgSvc |
Additional Inherited Members | |
| Public Types inherited from implements< IFileCatalog > | |
| using | base_class |
| Typedef to this class. | |
| using | extend_interfaces_base |
| Typedef to the base of this class. | |
| using | iids |
| Public Types inherited from extend_interfaces< Interfaces... > | |
| using | ext_iids |
| take union of the ext_iids of all Interfaces... | |
| Protected Member Functions inherited from implements< IFileCatalog > | |
| unsigned long | decRef () const override |
| Protected Attributes inherited from implements< IFileCatalog > | |
| std::atomic_ulong | m_refCount |
| Reference counter. | |
This class constitutes the core of the XML based FileCatalog API.
It uses the DOM model and the external XercesC library for parsing.
Definition at line 36 of file XMLFileCatalog.h.
|
protected |
Definition at line 38 of file XMLFileCatalog.h.
| XMLFileCatalog::XMLFileCatalog | ( | CSTR | url, |
| IMessageSvc * | m ) |
Create a catalog file, initialization of XercesC.
Definition at line 189 of file XMLFileCatalog.cpp.
|
private |
Definition at line 270 of file XMLFileCatalog.cpp.
|
override |
Save DOM catalog to file.
Definition at line 449 of file XMLFileCatalog.cpp.
|
inlineoverride |
|
override |
Catalog interface.
Create file identifier using UUID mechanism.
Create file identifier using UUID mechanism
Definition at line 192 of file XMLFileCatalog.cpp.
|
override |
Delete FileID Node from the catalog.
Definition at line 315 of file XMLFileCatalog.cpp.
|
override |
remove a PFN
Definition at line 338 of file XMLFileCatalog.cpp.
|
inlineoverride |
|
inlineoverride |
Drop all metadata of one FID.
Definition at line 96 of file XMLFileCatalog.h.
Drop specified metadata item.
Definition at line 301 of file XMLFileCatalog.cpp.
|
private |
Definition at line 309 of file XMLFileCatalog.cpp.
|
inlineoverride |
|
inlineoverride |
|
inlineoverride |
|
private |
Definition at line 194 of file XMLFileCatalog.cpp.
|
override |
|
private |
Definition at line 476 of file XMLFileCatalog.cpp.
|
override |
Dump all logical file names of the catalog associate to the FileID.
Definition at line 257 of file XMLFileCatalog.cpp.
|
override |
Dump all MetaData of the catalog for a given file ID.
Definition at line 263 of file XMLFileCatalog.cpp.
|
override |
Dump all physical file names of the catalog and their attributes associate to the FileID.
Definition at line 251 of file XMLFileCatalog.cpp.
|
private |
It creates a new node File with name = fid in the XML file catalog
Definition at line 353 of file XMLFileCatalog.cpp.
|
override |
Parse the DOM tree of the XML catalog.
Definition at line 205 of file XMLFileCatalog.cpp.
Definition at line 230 of file XMLFileCatalog.cpp.
|
inlineoverride |
Lookup file identifier by logical file name.
Definition at line 68 of file XMLFileCatalog.h.
|
inlineoverride |
|
private |
Definition at line 199 of file XMLFileCatalog.cpp.
|
inlineoverride |
|
override |
Create a FileID and Node.
Definition at line 321 of file XMLFileCatalog.cpp.
Create a FileID and Node of the logical file name with all the attributes.
Definition at line 419 of file XMLFileCatalog.cpp.
Create a FileID and Node of the physical file name with all the attributes.
Definition at line 389 of file XMLFileCatalog.cpp.
rename a PFN
Definition at line 330 of file XMLFileCatalog.cpp.
|
inlineoverride |
Save DOM catalog to file.
Definition at line 54 of file XMLFileCatalog.h.
Insert/update metadata item.
Definition at line 280 of file XMLFileCatalog.cpp.
|
private |
Definition at line 110 of file XMLFileCatalog.h.
|
private |
Definition at line 112 of file XMLFileCatalog.h.
|
private |
Definition at line 113 of file XMLFileCatalog.h.
|
private |
Definition at line 114 of file XMLFileCatalog.h.
|
private |
Definition at line 111 of file XMLFileCatalog.h.
|
private |
Definition at line 108 of file XMLFileCatalog.h.
|
mutableprivate |
Definition at line 109 of file XMLFileCatalog.h.