Class DataFileStorage


  • public class DataFileStorage
    extends fr.ens.biologie.genomique.kenetre.storage.AbstractFileStorage
    This class define a storage using DataFile API.
    Since:
    2.6
    Author:
    Laurent Jourdren
    • Constructor Detail

      • DataFileStorage

        public DataFileStorage​(String rootPath,
                               List<String> extensions)
        Constructor.
        Parameters:
        rootPath - root of the storage
        extensions - extension of the files
    • Method Detail

      • newDataPath

        protected fr.ens.biologie.genomique.kenetre.storage.DataPath newDataPath​(String source)
        Specified by:
        newDataPath in class fr.ens.biologie.genomique.kenetre.storage.AbstractFileStorage
      • newDataPath

        protected fr.ens.biologie.genomique.kenetre.storage.DataPath newDataPath​(fr.ens.biologie.genomique.kenetre.storage.DataPath parent,
                                                                                 String filename)
        Specified by:
        newDataPath in class fr.ens.biologie.genomique.kenetre.storage.AbstractFileStorage
      • getDataFile

        public DataFile getDataFile​(String shortName)
                             throws IOException
        Get a Datafile related to a short name
        Parameters:
        shortName - the short name of a file
        Returns:
        a DataFile
        Throws:
        IOException - if the file cannot be found
      • getFile

        public File getFile​(String shortName)
                     throws IOException
        Get a file related to a short name
        Overrides:
        getFile in class fr.ens.biologie.genomique.kenetre.storage.AbstractFileStorage
        Parameters:
        shortName - the short name of a file
        Returns:
        a DataFile
        Throws:
        IOException - if the file cannot be found