Package de.dlr.proseo.ui.cli.parser
Class CLIParser
java.lang.Object
de.dlr.proseo.ui.cli.parser.CLIParser
Parser for the prosEO Command Line Interface
Command line syntax is based on a YAML specification. The general command syntax is: "proseo" command [subcommand...] [option...]
[parameter...]
- Author:
- Dr. Thomas Bassler
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the currently applicable syntaxvoidLoad the command line syntax from the configured syntax fileParse a command string using the given syntax structure
-
Field Details
-
TOP_LEVEL_COMMAND_NAME
The name of the top-level command- See Also:
-
-
Constructor Details
-
CLIParser
public CLIParser()
-
-
Method Details
-
loadSyntax
Load the command line syntax from the configured syntax file- Throws:
FileNotFoundException- if the given file could not be readorg.yaml.snakeyaml.error.YAMLException- if the given file could not be parsed
-
getSyntax
Return the currently applicable syntax- Returns:
- the syntax
-
parse
Parse a command string using the given syntax structure- Parameters:
commandString- the command string to parse- Returns:
- a command structure for execution
- Throws:
ParseException- if an error is detected in the command syntaxIOException- if an I/O error occurs during input tokenizing
-