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 voidprintError(String msg)Print an error message.voidprintExampleInput(String extractorName, ExtractorRegistry registry)Prints an example of input for the provided extractor.voidprintExampleOutput(String extractorName, ExtractorRegistry registry)Prints an output example for the given extractor.voidprintExtractorList(ExtractorRegistry registry)Prints the list of all the available extractor names, labels and supported mimetypes.voidprintReport(ExtractorRegistry registry)Prints a complete report on all the available extractors.voidrun()Runs the tool and retrieves the exit code.
-
-
-
Method Detail
-
run
public void run() throws ExceptionDescription copied from interface:ToolRuns 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- theExtractorRegistrycontaining 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- theExtractorRegistrycontaining 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- theExtractorRegistrycontaining 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- theExtractorRegistrycontaining all extractors- Throws:
IOException- raised if no extractor is found with that nameExtractionException- if there is an error duing extraction
-
-