Class 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 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 set
        files - 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