DirectoryMetadata
DIRAC FileCatalog mix-in class to manage directory metadata
- class DIRAC.DataManagementSystem.DB.FileCatalogComponents.DirectoryMetadata.DirectoryMetadata.DirectoryMetadata(database=None)
Bases:
object
- __init__(database=None)
- addMetadataField(pName, pType, credDict)
Add a new metadata parameter to the Metadata Database.
- 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
- Parameters:
- Returns:
S_OK/S_ERROR, Value list file IDs in selected directories
- 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)
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
- Parameters:
credDict (dict) – client credential dictionary
- Returns:
S_OK/S_ERROR, Value is the metadata:metadata type dictionary
- 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