

If left alone, these would cause false positive conflicts to appear in the FITS consolidated output.

A tool could report a sampling frequency unit of “2”, while another may report the text string “inches”. For example, one tool could report the format of a PNG image as “Portable Network Graphics”, while another may report “PNG”. It’s possible for tools to output conflicting data when they actually mean the same thing. For tools that do not return XML, the output can either be a) directly converted to FITS XML, or b) converted to a basic intermediate XML format and then converted using XSLT.
#Exiftool java windows#
It then can decide if it should use the standard Perl version of Exiftool or the windows executable.įor tools that natively return XML, XSLT can be used to convert the output to FITS XML. The Exiftool tool wrapper checks for the operating system type and whether or not Perl is installed. If the tool depends on a specific operating system, the necessary checks should be made within the tool wrapper to prevent execution on incompatible systems. It is the responsibility of the tool wrapper to convert the tool output into FITS XML and return a valid ToolOutput object. ToolOutput must contain a valid FITS XML JDOM object. See existing tools in the codebase to use as examples. These two alternatives are implemented via Java Reflection in ToolBelt.createToolClassInstance(.). In either case the constructor should call super() on ToolBase. Alternatively, it's possible to create a constructor with Fits.java as its sole argument should the tool need access to data from within the Fits instance. The first is a simple no-argument constructor.

The implementing class has two options for its constructor. Jhove and NLNZ ME support a small set of popular preservation formats, while Exiftool and File utility support a wide range.Ī tool wrapper must be created for the tool that encapsulates the complexities of invoking the tool, capturing the output, and converting it to FITS XML. A tool wrapper must implement the Tool.java interface and extend the ToolBase.java base class. In addition, different tools support different formats. Jhove, Exiftool, NLNZ ME), while others can only identify file formats (Droid, FFident, File Utility). Any type of tool, whether it's based on Perl, Java, or something else entirely, can be added to FITS. Certain tools can extract technical metadata for files (e.g.
