Class ConsoleCommand
java.lang.Object
org.eclipse.rdf4j.console.command.ConsoleCommand
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConsoleCommand
(ConsoleIO consoleIO) ConstructorConsoleCommand
(ConsoleIO consoleIO, ConsoleState state) ConstructorConsoleCommand
(ConsoleIO consoleIO, ConsoleState state, Map<String, ConsoleSetting> settings) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
askProceed
(String str, boolean defVal) Ask user to proceedvoid
Execute the given parameters.Get console IOGet console settings mapGet console stateGet long descriptionGet short description, small enough to fit on one console rowString[]
Return the names of the settings used.protected void
Write a string to the consoleprotected void
writeError
(String str) Write a string + newline to the console and to the log as an errorprotected void
writeError
(String str, Exception e) Write a string + message of exception + newline to the console and to the log as an errorprotected void
Write a string + newline to the console and to the log at level INFOprotected void
Write a string + newline to the consoleprotected void
Write repository not opened error
-
Field Details
-
LOGGER
protected final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
ConsoleCommand
-
ConsoleCommand
Constructor- Parameters:
consoleIO
-state
-
-
ConsoleCommand
Constructor- Parameters:
consoleIO
- console IOstate
- console statesettings
- console settings
-
-
Method Details
-
getConsoleIO
-
getConsoleState
-
getConsoleSettings
Get console settings map- Returns:
- map of console settings
-
getHelpShort
Get short description, small enough to fit on one console row- Specified by:
getHelpShort
in interfaceHelp
- Returns:
- help string
-
getHelpLong
Get long description- Specified by:
getHelpLong
in interfaceHelp
- Returns:
- string, can be multiple lines
-
usesSettings
Description copied from interface:Command
Return the names of the settings used.- Specified by:
usesSettings
in interfaceCommand
- Returns:
- string array of settings
-
execute
-
write
-
writeln
-
writeInfo
Write a string + newline to the console and to the log at level INFO- Parameters:
str
- text
-
writeError
Write a string + newline to the console and to the log as an error- Parameters:
str
- text
-
writeError
-
writeUnopenedError
protected void writeUnopenedError()Write repository not opened error -
askProceed
Ask user to proceed- Parameters:
str
- question to askdefVal
- default value- Returns:
- true
-