Overview of interfaces

Tool

The Tool interface defines the following methods: 

  • ToolOutput extractInfo(File file) -- Called by FITS to invoke the tool against the input file. It must return a ToolOutput object containing valid FITS XML
  • boolean isIdentityKnown(FileIdentity identity) -- Logic for determining if the tool was able to identify the input file
  • ToolInfo getToolInfo() -- Returns a ToolInfo object describing the tool.
  • Boolean canIdentify() -- indicates whether or not the tool can identify file formats. This is important to know for output consolidation purposes.
  • void addExcludedExtension() -- Adds a file extension to specify that FITS should not use this tool wrapper to process files with that extension (set from xml/fits.xml tool definitions)
  • boolean hasExcludedExtension(String ext) -- Checks if the tool can process files having the provided file extension.

ToolOutputConsolidator

The ToolOutputConsolidator interface defines one method: 

  • FitsOutput processResults(List<ToolOutput> results)

Classes implementing the ToolOutputConsolidator must accept a list of ToolOutput objects, merge them, and return a FitsOutput object.