## gate
Class Main

    java.lang.Object
      |
      +--gate.Main

public class Main
extends Object

Top-level entry point for the GATE command-line and GUI interfaces.

Field Summary
`private static Map` `annotatorArgsMap` Map of annotator arguments.
`private static List` `annotatorNames` List of annotators we were asked to run on the collection.
`static boolean` `batchMode` Are we in batch mode?
`static String` `build`
`private static String` `collName` Name of the collection we were asked to process.
`private static String` `creolePath` Search path for CREOLE modules.
`private static boolean` `DEBUG` Debug flag
`private static List` `debugNames` List of classes we were asked to debug.
`private static boolean` `destroyColl` Don't save collection after batch?
`private static List` `fileNames` List of files we were asked to build a collection from.
`private static MainFrame` `frame` Main Frame of the GUI; null when no GUI running
`static String` `name`
`private static List` `pendingCreoleUrls` The list of pending URLs to add to the CREOLE register
`private static boolean` `runCorpusBenchmarkTool`
`private static Splash` `splash` The splash shown when Gate starts
`private static int` `STATUS_ERROR` Status flag for error exit.
`private static int` `STATUS_NORMAL` Status flag for normal exit.
`private static boolean` `verbose` Verbose?
`static String` `version`

Constructor Summary
`Main()`

Method Summary
`(package private) static void` `<clinit>()`
`protected static void` `applyUserPreferences()` Reads the user config data and applies the required settings.
`private static void` `batchProcess()` Run commands as a batch process.
`static MainFrame` `getMainFrame()` Get the main frame of the GUI.
`static void` `help()` Display a help message
`static void` `main(String[] args)` Main routine for GATE.
`static void` `processArgs(String[] args)` Process arguments and set up member fields appropriately.
`private static void` `registerCreoleUrls()` Register any CREOLE URLs that we got on the command line
`private static void` `runGui()` Run the user interface.
`static void` `usage()` Display a usage message

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Field Detail

### DEBUG

    private static final boolean DEBUG

  Debug flag

### STATUS_NORMAL

    private static final int STATUS_NORMAL

  Status flag for normal exit.

### STATUS_ERROR

    private static final int STATUS_ERROR

  Status flag for error exit.

### frame

    private static MainFrame frame

  Main Frame of the GUI; null when no GUI running

### splash

    private static Splash splash

  The splash shown when Gate starts

### collName

    private static String collName

  Name of the collection we were asked to process.

### creolePath

    private static String creolePath

  Search path for CREOLE modules.

### fileNames

    private static List fileNames

  List of files we were asked to build a collection from.

### annotatorNames

    private static List annotatorNames

  List of annotators we were asked to run on the collection.

### annotatorArgsMap

    private static Map annotatorArgsMap

  Map of annotator arguments.

### debugNames

    private static List debugNames

  List of classes we were asked to debug.

### batchMode

    public static boolean batchMode

  Are we in batch mode?

### destroyColl

    private static boolean destroyColl

  Don't save collection after batch?

### verbose

    private static boolean verbose

  Verbose?

### runCorpusBenchmarkTool

    private static boolean runCorpusBenchmarkTool

### name

    public static String name

### version

    public static String version

### build

    public static String build

### pendingCreoleUrls

    private static List pendingCreoleUrls

  The list of pending URLs to add to the CREOLE register

Constructor Detail

### Main

    public Main()

Method Detail

### main

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

  Main routine for GATE. Command-line arguments:
  - -h display a short help message
  - -d URL define URL to be a location for CREOLE resoures
  - -i file additional initialisation file (probably called `gate.xml`). Used for site-wide initialisation by the start-up scripts.

### registerCreoleUrls

    private static void registerCreoleUrls()

  Register any CREOLE URLs that we got on the command line

### getMainFrame

    public static MainFrame getMainFrame()
                                  throws GateException

  Get the main frame of the GUI. If the GUI isn't running, it is started.

### runGui

    private static void runGui()
                        throws GateException

  Run the user interface.

### applyUserPreferences

    protected static void applyUserPreferences()

  Reads the user config data and applies the required settings.

### <clinit>

    static void <clinit>()

### processArgs

    public static void processArgs(String[] args)

  Process arguments and set up member fields appropriately. Will shut down the process (via System.exit) if there are incorrect arguments, or if the arguments ask for something simple like printing the help message.

### batchProcess

    private static void batchProcess()
                              throws GateException

  Run commands as a batch process.

### usage

    public static void usage()

  Display a usage message

### help

    public static void help()

  Display a help message