Example #1
0
 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());
     }
   }
 }
Example #2
0
  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;
  }
Example #3
0
  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");
 }