Class ExtractorDocumentation

  • All Implemented Interfaces:
    Tool

    public class ExtractorDocumentation
    extends Object
    This class provides some command-line documentation about available extractors and their usage.
    • Constructor Detail

      • ExtractorDocumentation

        public ExtractorDocumentation()
    • Method Detail

      • run

        public void run()
                 throws Exception
        Description copied from interface: Tool
        Runs the tool and retrieves the exit code.
        Throws:
        Exception - if there is an error running the tool.
      • printError

        public void printError​(String msg)
        Print an error message.
        Parameters:
        msg - the error message to be printed
      • printExtractorList

        public void printExtractorList​(ExtractorRegistry registry)
        Prints the list of all the available extractor names, labels and supported mimetypes.
        Parameters:
        registry - the ExtractorRegistry containing all extractors
      • printExampleInput

        public void printExampleInput​(String extractorName,
                                      ExtractorRegistry registry)
                               throws IOException
        Prints an example of input for the provided extractor.
        Parameters:
        extractorName - the name of the extractor
        registry - the ExtractorRegistry containing all extractors
        Throws:
        IOException - raised if no extractor is found with that name