/*.................................................................................................................*/
 public void processOutputFiles(String jobURL) {
   if (rootDir != null) {
     downloadWorkingResults(jobURL, rootDir, true);
     if (outputFileProcessor != null && outputFilePaths != null && lastModified != null) {
       String[] paths = outputFileProcessor.modifyOutputPaths(outputFilePaths);
       for (int i = 0; i < paths.length && i < lastModified.length; i++) {
         File file = new File(paths[i]);
         long lastMod = file.lastModified();
         if (!MesquiteLong.isCombinable(lastModified[i]) || lastMod > lastModified[i]) {
           outputFileProcessor.processOutputFile(paths, i);
           lastModified[i] = lastMod;
         }
       }
     }
   }
 }
  /**
   * This processes information about the files contained in either the results or working directory
   * of a job.
   */
  public CipresJobFile[] processFilesDocument(Document cipresResponseDoc) {
    Element jobfiles = cipresResponseDoc.getRootElement().element("jobfiles");
    if (jobfiles == null) return null;
    List tools = jobfiles.elements("jobfile");
    int count = 0;
    for (Iterator iter = tools.iterator(); iter.hasNext(); ) {
      Element nextTool = (Element) iter.next();
      count++;
    }
    if (count == 0) return null;
    CipresJobFile[] cipresJobFile = new CipresJobFile[count];
    count = 0;
    for (Iterator iter = tools.iterator(); iter.hasNext(); ) {
      Element nextJob = (Element) iter.next();
      if (nextJob != null) {
        if (cipresJobFile[count] == null) cipresJobFile[count] = new CipresJobFile();
        Element jobFileElement = nextJob.element("downloadUri");
        String fileInfo = null;
        if (jobFileElement != null) {
          fileInfo = jobFileElement.elementText("url");
          if (!StringUtil.blank(fileInfo) && count < cipresJobFile.length) {
            cipresJobFile[count].setDownloadURL(fileInfo);
          }
          fileInfo = jobFileElement.elementText("title");
          if (!StringUtil.blank(fileInfo) && count < cipresJobFile.length) {
            cipresJobFile[count].setDownloadTitle(fileInfo);
          }
        }
        fileInfo = nextJob.elementText("dateModified");
        if (!StringUtil.blank(fileInfo) && count < cipresJobFile.length) {
          cipresJobFile[count].setLastModified(fileInfo);
        }
        fileInfo = nextJob.elementText("filename");
        if (!StringUtil.blank(fileInfo) && count < cipresJobFile.length) {
          cipresJobFile[count].setFileName(fileInfo);
        }
        fileInfo = nextJob.elementText("length");
        if (!StringUtil.blank(fileInfo) && count < cipresJobFile.length) {
          cipresJobFile[count].setLength(MesquiteLong.fromString(fileInfo));
        }

        count++;
      }
    }
    return cipresJobFile;
  }