示例#1
0
  /**
   * Constructor
   *
   * @param tool The Tool creating this output
   * @param fitsXml JDOM Document following the FITS output schema
   * @param toolOutput Raw XML JDOM Document representing the original output of the tool
   */
  public ToolOutput(Tool tool, Document fitsXml, Document toolOutput) throws FitsToolException {
    if (Fits.validateToolOutput && fitsXml != null && !validateXmlOutput(fitsXml)) {
      throw new FitsToolException(
          tool.getToolInfo().getName()
              + " "
              + tool.getToolInfo().getVersion()
              + " produced invalid FITS XML output");
    }

    this.tool = tool;
    this.toolOutput = toolOutput;
    // map values and get identities from fitsXML if not null
    if (fitsXml != null) {
      // fitsxml doc is mapped here before identities are extracted
      this.fitsXml = Fits.mapper.applyMap(tool, fitsXml);
      identity = createFileIdentities(fitsXml, tool.getToolInfo());
    }
  }
示例#2
0
  public void printToolInfo(boolean sysInfo, PrintStream p) {
    if (sysInfo) {
      // system info
      p.println("OS Name = " + System.getProperty("os.name"));
      p.println("OS Arch = " + System.getProperty("os.arch"));
      p.println("OS Version = " + System.getProperty("os.version"));
      p.println("------------------------------------");
    }

    for (Tool t : tools) {
      p.print(t.getToolInfo().print());
    }
  }