Package org.daisy.braille.ui
Class BasicUI
- java.lang.Object
-
- org.daisy.cli.AbstractUI
-
- org.daisy.braille.ui.BasicUI
-
public class BasicUI extends AbstractUI
Provides a basic command line UI for core functionality in org.daisy.braille.- Author:
- Joel HÃ¥kansson
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.daisy.cli.AbstractUI
AbstractUI.Argument, AbstractUI.Definition, AbstractUI.ExitCode, AbstractUI.OptionalArgument
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
emboss
static java.lang.String
generate
static java.lang.String
list
static java.lang.String
merge
static java.lang.String
pef2text
static java.lang.String
split
static java.lang.String
text2pef
static java.lang.String
validate
-
Fields inherited from class org.daisy.cli.AbstractUI
ARG_PREFIX
-
-
Constructor Summary
Constructors Constructor Description BasicUI(java.lang.String[] args)
Creates a new Basic UI
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Gets the name for the UIjava.util.List<AbstractUI.OptionalArgument>
getOptionalArguments()
Gets optional argumentsjava.util.List<AbstractUI.Argument>
getRequiredArguments()
Gets required argumentsstatic void
main(java.lang.String[] args)
Command line entry pointvoid
run()
Runs the application.void
setPluginsDir(java.io.File dir)
Sets the context class loader to an URLClassLoader containing the jars found in the specified path.-
Methods inherited from class org.daisy.cli.AbstractUI
displayHelp, exitWithCode, exitWithCode, expandShortForm, getDefinitionList, getOptional, getRequired, setKeyValueDelimiter, setOptionalArgumentPrefix, toMap
-
-
-
-
Field Detail
-
emboss
public static final java.lang.String emboss
- See Also:
- Constant Field Values
-
text2pef
public static final java.lang.String text2pef
- See Also:
- Constant Field Values
-
pef2text
public static final java.lang.String pef2text
- See Also:
- Constant Field Values
-
validate
public static final java.lang.String validate
- See Also:
- Constant Field Values
-
split
public static final java.lang.String split
- See Also:
- Constant Field Values
-
merge
public static final java.lang.String merge
- See Also:
- Constant Field Values
-
generate
public static final java.lang.String generate
- See Also:
- Constant Field Values
-
list
public static final java.lang.String list
- See Also:
- Constant Field Values
-
-
Method Detail
-
setPluginsDir
public void setPluginsDir(java.io.File dir)
Sets the context class loader to an URLClassLoader containing the jars found in the specified path.- Parameters:
dir
- the directory to search for jar-files.
-
run
public void run() throws java.lang.Exception
Runs the application.- Throws:
java.lang.Exception
- if something bad happens
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
Command line entry point- Parameters:
args
- the application arguments- Throws:
java.lang.Exception
-
getName
public java.lang.String getName()
Description copied from class:AbstractUI
Gets the name for the UI- Specified by:
getName
in classAbstractUI
- Returns:
- returns the UI name
-
getRequiredArguments
public java.util.List<AbstractUI.Argument> getRequiredArguments()
Description copied from class:AbstractUI
Gets required arguments- Specified by:
getRequiredArguments
in classAbstractUI
- Returns:
- returns a list of required arguments that can be passed to the UI on startup
-
getOptionalArguments
public java.util.List<AbstractUI.OptionalArgument> getOptionalArguments()
Description copied from class:AbstractUI
Gets optional arguments- Specified by:
getOptionalArguments
in classAbstractUI
- Returns:
- returns a list of optional arguments that can be passed to the UI on startup
-
-