Class DataMetadataStorage
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.core.workflow.DataMetadataStorage
-
public class DataMetadataStorage extends Object
This class define a storage for data metadata of all files generated by the workflow.- Since:
- 2.0
- Author:
- Laurent Jourdren
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DataMetadataStorage
getInstance(DataFile metadataDir)
Get the singleton.Map<String,String>
getMetadata(DataFile file)
Get the metadata of a file.boolean
loadMetadata(Data data)
Set the metadata of a data from the metadata storage.boolean
loadMetadata(Data data, List<DataFile> files)
Set the metadata of a data from the metadata storage.void
saveMetaData(Data data)
Save metadata of a Data object.
-
-
-
Method Detail
-
loadMetadata
public boolean loadMetadata(Data data)
Set the metadata of a data from the metadata storage.- Parameters:
data
- the date which metadata must be set- Returns:
- true if the metadata for the data has been found in the metadata storage
-
loadMetadata
public boolean loadMetadata(Data data, List<DataFile> files)
Set the metadata of a data from the metadata storage.- Parameters:
data
- the date which metadata must be setfiles
- files to search in the storage to get metadata- Returns:
- true if the metadata for the data has been found in the metadata storage
-
getMetadata
public Map<String,String> getMetadata(DataFile file)
Get the metadata of a file.- Parameters:
file
- the file- Returns:
- the metadata of the file in a Map
-
saveMetaData
public void saveMetaData(Data data)
Save metadata of a Data object.- Parameters:
data
- the data object
-
getInstance
public static DataMetadataStorage getInstance(DataFile metadataDir)
Get the singleton.- Parameters:
metadataDir
- directory where store metadata- Returns:
- the DataMetadataStorage object
-
-