Package org.apache.any23.cli
Class ExtractorDocumentation
- java.lang.Object
-
- org.apache.any23.cli.ExtractorDocumentation
-
-
Constructor Summary
Constructors Constructor Description ExtractorDocumentation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
printError(String msg)
Print an error message.void
printExampleInput(String extractorName, ExtractorRegistry registry)
Prints an example of input for the provided extractor.void
printExampleOutput(String extractorName, ExtractorRegistry registry)
Prints an output example for the given extractor.void
printExtractorList(ExtractorRegistry registry)
Prints the list of all the available extractor names, labels and supported mimetypes.void
printReport(ExtractorRegistry registry)
Prints a complete report on all the available extractors.void
run()
Runs the tool and retrieves the exit code.
-
-
-
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
- theExtractorRegistry
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 extractorregistry
- theExtractorRegistry
containing all extractors- Throws:
IOException
- raised if no extractor is found with that name
-
printExampleOutput
public void printExampleOutput(String extractorName, ExtractorRegistry registry) throws IOException, ExtractionException
Prints an output example for the given extractor.- Parameters:
extractorName
- the extractor nameregistry
- theExtractorRegistry
containing all extractors- Throws:
IOException
- raised if no extractor is found with that nameExtractionException
- if there is an error duing extraction
-
printReport
public void printReport(ExtractorRegistry registry) throws IOException, ExtractionException
Prints a complete report on all the available extractors.- Parameters:
registry
- theExtractorRegistry
containing all extractors- Throws:
IOException
- raised if no extractor is found with that nameExtractionException
- if there is an error duing extraction
-
-