@Test public void getFormatByExtension() { Assert.assertEquals(BiologicalDataItemFormat.VCF, NgbFileUtils.getFormatByExtension("vcf_file.vcf")); Assert.assertEquals(BiologicalDataItemFormat.VCF, NgbFileUtils.getFormatByExtension("vcf_file.vcf.gz")); Assert.assertEquals(BiologicalDataItemFormat.VCF_INDEX, NgbFileUtils.getFormatByExtension( "vcf_file.vcf.gz.tbi")); Assert.assertEquals(BiologicalDataItemFormat.VCF_INDEX, NgbFileUtils.getFormatByExtension("vcf_file.vcf.idx")); Assert.assertEquals(BiologicalDataItemFormat.INDEX, NgbFileUtils.getFormatByExtension("index.tbi")); Assert.assertEquals(BiologicalDataItemFormat.INDEX, NgbFileUtils.getFormatByExtension("index.foo.tbi")); }
public static BiologicalDataItemFormat getFormatByExtension(String fileName) { return FORMAT_MAP.get(getFileExtension(fileName)); }
NgbFileUtils { public static BiologicalDataItemFormat getFormatByExtension(String fileName) { return FORMAT_MAP.get(getFileExtension(fileName)); } }
NgbFileUtils { public static BiologicalDataItemFormat getFormatByExtension(String fileName) { return FORMAT_MAP.get(getFileExtension(fileName)); } private  NgbFileUtils(); }
NgbFileUtils { public static BiologicalDataItemFormat getFormatByExtension(String fileName) { return FORMAT_MAP.get(getFileExtension(fileName)); } private  NgbFileUtils(); static String[] getSupportedExtensions(); static boolean isFileSupported(String fileName); static BiologicalDataItemFormat getFormatByExtension(String fileName); static String getFileExtension(String fileName); static boolean isFileBrowsingAllowed(BiologicalDataItemFormat format); static boolean isGzCompressed(String fileName); static boolean isRemotePath(String path); }
NgbFileUtils { public static BiologicalDataItemFormat getFormatByExtension(String fileName) { return FORMAT_MAP.get(getFileExtension(fileName)); } private  NgbFileUtils(); static String[] getSupportedExtensions(); static boolean isFileSupported(String fileName); static BiologicalDataItemFormat getFormatByExtension(String fileName); static String getFileExtension(String fileName); static boolean isFileBrowsingAllowed(BiologicalDataItemFormat format); static boolean isGzCompressed(String fileName); static boolean isRemotePath(String path); static final String GZ_EXTENSION; static final String TBI_EXTENSION; static final String IDX_EXTENSION; }