org.apache.any23.cli
Class ExtractorDocumentation

java.lang.Object
  extended by org.apache.any23.cli.ExtractorDocumentation
All Implemented Interfaces:
Tool

public class ExtractorDocumentation
extends Object
implements Tool

This class provides some command-line documentation about available extractors and their usage.


Constructor Summary
ExtractorDocumentation()
           
 
Method Summary
static void main(String[] args)
          Main method to access the class functionality.
 void printError(String msg)
          Print an error message.
 void printExampleInput(String extractorName)
          Prints an example of input for the provided extractor.
 void printExampleOutput(String extractorName)
          Prints an output example for the given extractor.
 void printExtractorList()
          Prints the list of all the available extractors.
 void printReport()
          Prints a complete report on all the available extractors.
 void printUsage()
          Prints the command line usage help.
 int run(String[] args)
          Runs the tool and retrieves the exit code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtractorDocumentation

public ExtractorDocumentation()
Method Detail

main

public static void main(String[] args)
                 throws ExtractionException,
                        IOException
Main method to access the class functionality. Usage: ExtractorDocumentation -list shows the names of all available extractors ExtractorDocumentation -i extractor-name shows example input for the given extractor ExtractorDocumentation -o extractor-name shows example output for the given extractor ExtractorDocumentation -all shows a report about all available extractors

Parameters:
args - allowed arguments
Throws:
ExtractionException
IOException

run

public int run(String[] args)
Description copied from interface: Tool
Runs the tool and retrieves the exit code.

Specified by:
run in interface Tool
Parameters:
args - command line arguments.
Returns:
exit code.

printUsage

public void printUsage()
Prints the command line usage help.


printError

public void printError(String msg)
Print an error message.

Parameters:
msg - the error message to be printed

printExtractorList

public void printExtractorList()
Prints the list of all the available extractors.


printExampleInput

public void printExampleInput(String extractorName)
                       throws IOException
Prints an example of input for the provided extractor.

Parameters:
extractorName - the name of the extractor
Throws:
IOException - raised if no extractor is found with that name

printExampleOutput

public void printExampleOutput(String extractorName)
                        throws IOException,
                               ExtractionException
Prints an output example for the given extractor.

Parameters:
extractorName - the extractor name
Throws:
IOException - raised if no extractor is found with that name
ExtractionException

printReport

public void printReport()
                 throws IOException,
                        ExtractionException
Prints a complete report on all the available extractors.

Throws:
IOException
ExtractionException


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.