Package com.mindee
Class CommandLineInterface
- java.lang.Object
-
- com.mindee.CommandLineInterface
-
- All Implemented Interfaces:
ProductProcessor
public class CommandLineInterface extends Object implements ProductProcessor
Command Line Interface for the Mindee client.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CommandLineInterface.ProductCommandHandler
Adds all commands from CommandLineInterfaceProducts automatically.
-
Constructor Summary
Constructors Constructor Description CommandLineInterface()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PageOptions
getDefaultPageOptions()
static void
main(String[] args)
Instantiates all products one by one in a separate picocli instance and relays the command to them.<T extends Inference<?,?>>
StringstandardProductAsyncOutput(Class<T> productClass, File file)
<T extends Inference<?,?>>
StringstandardProductOutput(Class<T> productClass, File file)
-
-
-
Method Detail
-
main
public static void main(String[] args)
Instantiates all products one by one in a separate picocli instance and relays the command to them.- Parameters:
args
- CLI args.
-
getDefaultPageOptions
protected PageOptions getDefaultPageOptions()
-
standardProductOutput
public <T extends Inference<?,?>> String standardProductOutput(Class<T> productClass, File file) throws IOException
- Specified by:
standardProductOutput
in interfaceProductProcessor
- Type Parameters:
T
- Type of the product.- Parameters:
productClass
- Product class to be processed for synchronous products.file
- Input file.- Returns:
- A string representation of the result of the parsing.
- Throws:
IOException
- Throws if the parsing goes wrong.
-
standardProductAsyncOutput
public <T extends Inference<?,?>> String standardProductAsyncOutput(Class<T> productClass, File file) throws IOException, InterruptedException
- Specified by:
standardProductAsyncOutput
in interfaceProductProcessor
- Type Parameters:
T
- Type of the product.- Parameters:
productClass
- Product class to be processed for asynchronous products.file
- Input file.- Returns:
- A string representation of the result of the parsing.
- Throws:
IOException
- Throws if the parsing goes wrong.InterruptedException
- Throws if the polling is interrupted.
-
-