Package org.eclipse.rdf4j.console
Class Console
- java.lang.Object
-
- org.eclipse.rdf4j.console.Console
-
public class Console extends Object
The RDF4J Console is a command-line application for interacting with RDF4J. It reads commands from standard input and prints feedback to standard output. Available options include loading and querying of data in repositories, repository creation and verification of RDF files.- Author:
- Jeen Broekstra, Arjohn Kampman, Bart Hanssens
-
-
Constructor Summary
Constructors Constructor Description Console()Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConsoleIOgetConsoleIO()Get console IOConsoleStategetState()Get console statestatic voidmain(String[] args)Mainvoidregister(ConsoleCommand cmd)Add command to register of known commandsvoidregister(ConsoleSetting setting)Add setting to register of known settingsprotected voidsetExitOnError(boolean mode)Set exit on error modevoidstart()Start the interactive console, return error code on exit
-
-
-
Constructor Detail
-
Console
public Console() throws IOExceptionConstructor- Throws:
IOException
-
-
Method Detail
-
getState
public ConsoleState getState()
Get console state- Returns:
- basic console state
-
getConsoleIO
public ConsoleIO getConsoleIO()
Get console IO- Returns:
- console
-
setExitOnError
protected void setExitOnError(boolean mode)
Set exit on error mode- Parameters:
mode- true when error should exit
-
main
public static void main(String[] args) throws IOException
Main- Parameters:
args- command line arguments- Throws:
IOException
-
register
public final void register(ConsoleCommand cmd)
Add command to register of known commands- Parameters:
cmd- command to be added
-
register
public final void register(ConsoleSetting setting)
Add setting to register of known settings- Parameters:
setting- setting to be added
-
start
public void start() throws IOExceptionStart the interactive console, return error code on exit- Throws:
IOException
-
-