org.eclipse.rdf4j.console.command

## Class ConsoleCommand

- java.lang.Object
- - org.eclipse.rdf4j.console.command.ConsoleCommand

- All Implemented Interfaces:
    Command, Help
  Direct Known Subclasses:
    Clear, Close, Connect, Convert, Create, Disconnect, Drop, Export, Federate, Load, Open, PrintHelp, PrintInfo, QueryEvaluator, SetParameters, Show, Verify

      public abstract class ConsoleCommand
      extends Object
      implements Command, Help

  Abstract command
  Author:
    Bart Hanssens

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConsoleCommand(ConsoleIO consoleIO)` Constructor
    `ConsoleCommand(ConsoleIO consoleIO, ConsoleState state)` Constructor

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Map<String,ConsoleSetting>` | `convertParams(ConsoleParameters parameters)` Deprecated.
    `void` | `execute(String... parameters)` Execute the given parameters.
    `ConsoleIO` | `getConsoleIO()` Get console IO
    `ConsoleState` | `getConsoleState()` Get console state
    `String` | `getHelpLong()` Get long description
    `String` | `getHelpShort()` Get short description, small enough to fit on one console row

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.rdf4j.console.Help

      `getName`

- - ### Constructor Detail

    - #### ConsoleCommand

          public ConsoleCommand(ConsoleIO consoleIO)

      Constructor
      Parameters:
        `consoleIO` -

    - #### ConsoleCommand

          public ConsoleCommand(ConsoleIO consoleIO,
                                ConsoleState state)

      Constructor
      Parameters:
        `consoleIO` -
        `state` -

  - ### Method Detail

    - #### convertParams

          @Deprecated
          public static Map<String,ConsoleSetting> convertParams(ConsoleParameters parameters)

      Deprecated.
      Convert old console parameters to new way (map) of storing parameters.
      Parameters:
        `parameters` - console parameters
      Returns:
        map of console settings

    - #### getConsoleIO

          public ConsoleIO getConsoleIO()

      Get console IO
      Returns:

    - #### getConsoleState

          public ConsoleState getConsoleState()

      Get console state
      Returns:

    - #### getHelpShort

          public String getHelpShort()

      Get short description, small enough to fit on one console row
      Specified by:
        `getHelpShort` in interface `Help`
      Returns:

    - #### getHelpLong

          public String getHelpLong()

      Get long description
      Specified by:
        `getHelpLong` in interface `Help`
      Returns:
        string, can be multiple lines

    - #### execute

          public void execute(String... parameters)
                       throws IOException

      Description copied from interface: `Command`
      Execute the given parameters.
      Specified by:
        `execute` in interface `Command`
      Parameters:
        `parameters` - parameters typed by user
      Throws:
        `IOException` - if a problem occurs reading or writing

Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.