com.thinkaurelius.titan.tinkerpop.gremlin

## Class ConsoleSetup

- java.lang.Object
- - com.thinkaurelius.titan.tinkerpop.gremlin.ConsoleSetup

-     public class ConsoleSetup
      extends Object

  Collect and print statements evaluated when setting up a Titan + Gremlin-Groovy console session.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConsoleSetup()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static List<String>` | `getAllImportStatements()` Return a sequence of import statements to prepare a just-instantiated Gremlin-Groovy interpreter.
    `static List<String>` | `getNonStaticImports()`
    `static List<String>` | `getStaticImports()`
    `static void` | `main(String[] args)` Write a properties file with two properties: imports and staticimports.

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

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

- - ### Constructor Detail

    - #### ConsoleSetup

          public ConsoleSetup()

  - ### Method Detail

    - #### getNonStaticImports

          public static List<String> getNonStaticImports()

    - #### getStaticImports

          public static List<String> getStaticImports()

    - #### getAllImportStatements

          public static List<String> getAllImportStatements()

      Return a sequence of import statements to prepare a just-instantiated Gremlin-Groovy interpreter. This includes both Tinkerpop stack and Titan symbol imports. Though intended for use in Gremlin-Groovy, the returned import statements all end with semicolons, so the statements are valid under the syntax of both Groovy and Java. This only returns import and import static statements (at least, as of the last time this comment was updated).
      Returns:
        A sequence of import statements

    - #### main

          public static void main(String[] args)
                           throws FileNotFoundException

      Write a properties file with two properties: imports and staticimports. These are set to comma-separated lists of `getNonStaticImports()` and `getStaticImports()`, respectively.
      Parameters:
        `args` - the file to write (stdout if unspecified)
      Throws:
        `FileNotFoundException` - shouldn't happen since we only open the target file for overwriting and never for appending

Copyright © 2012–2014. All rights reserved.