DirectoryMetadata

DIRAC FileCatalog mix-in class to manage directory metadata

class DIRAC.DataManagementSystem.DB.FileCatalogComponents.DirectoryMetadata.DirectoryMetadata(database=None)
__init__(database=None)
addMetadataField(pname, ptype, credDict)

Add a new metadata parameter to the Metadata Database. pname - parameter name, ptype - parameter type in the MySQL notation

addMetadataSet(metaSetName, metaSetDict, credDict)

Add a new metadata set with the contents from metaSetDict

deleteMetadataField(pname, credDict)

Remove metadata field

findDirIDsByMetadata(**kwargs)
findDirectoriesByMetadata(**kwargs)
findFileIDsByMetadata(metaDict, path, credDict, startItem=0, maxItems=25)

Find Files satisfying the given metadata

findFilesByMetadata(metaDict, path, credDict)

Find Files satisfying the given metadata

getCompatibleMetadata(queryDict, path, credDict)

Get distinct metadata values compatible with the given already defined metadata

getDirectoryMetaParameters(dpath, credDict, inherited=True, owndata=True)

Get meta parameters for the given directory

getDirectoryMetadata(path, credDict, inherited=True, owndata=True)

Get metadata for the given directory aggregating metadata for the directory itself and for all the parent directories if inherited flag is True. Get also the non-indexed metadata parameters.

getMetadataFields(credDict)

Get all the defined metadata fields

getMetadataSet(metaSetName, expandFlag, credDict)

Get fully expanded contents of the metadata set

removeMetadata(dpath, metadata, credDict)

Remove the specified metadata for the given directory

removeMetadataForDirectory(dirList, credDict)

Remove all the metadata for the given directory list

setDatabase(database)
setMetaParameter(dpath, metaName, metaValue, credDict)

Set an meta parameter - metadata which is not used in the the data search operations

setMetadata(dpath, metadict, credDict)

Set the value of a given metadata field for the the given directory path