public static String determineFileType(FileMetadata fm) throws IOException { // TODO: networkDataFile StudyFile sf = fm.getStudyFile(); if (sf instanceof TabularDataFile) { return determineTabularDataFileType((TabularDataFile) sf); } else { if (sf.isRemote()) { return FileUtil.determineFileType(fm.getLabel()); } else { return FileUtil.determineFileType(new File(sf.getFileSystemLocation()), fm.getLabel()); } } }
public static File getStudyFileDir(String authority, String studyId) { File file = new File(FileUtil.getStudyFileDir(), authority + File.separator + studyId.toUpperCase()); if (!file.exists()) { file.mkdirs(); } return file; }
public static File getStudyFileDir(Study study) { File file = new File( FileUtil.getStudyFileDir(), study.getAuthority() + File.separator + study.getStudyId()); if (!file.exists()) { file.mkdirs(); } return file; }
public String getSubsetFileName() { return "subset_" + FileUtil.replaceExtension(file.getFileName(), "zip"); }