public class Gate extends Object implements GateConstants
| Modifier and Type | Class and Description | 
|---|---|
| static class  | Gate.ResourceInfoStores information about a resource defined by a CREOLE directory. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected static List<Plugin> | autoloadPluginsThe list of plugins (aka CREOLE directories) the system loads automatically
 at start-up. | 
| static String | BUILDThe build number of the running GATE (i.e. | 
| protected static URL | builtinCreoleDirThe "builtin" creole directory URL, where the creole.xml that defines
 things like DocumentImpl can be found. | 
| protected static String | ENABLE_BENCHMARKING_FEATURE_NAMEFeature name that should be used to set if the benchmarking logging should
 be enabled or disabled. | 
| protected static File | gateHomeThe top level directory of the GATE installation. | 
| static int | HASH_STH_SIZEThe default size to be used for Hashtable, HashMap and HashSet. | 
| protected static boolean | initFinishedRecords initialisation status. | 
| protected static org.slf4j.Logger | logA logger to use instead of sending messages to Out or Err | 
| protected static String | MIN_JDK_VERSIONMinimum version of JDK we support | 
| protected static File | pluginsHomeThe top level directory for GATE installed plugins. | 
| static int | STRINGBUFFER_SIZEThe default StringBuffer size, it seems that we need longer string than the
 StringBuffer class default because of the high number of buffer expansions | 
| static String | URIThe GATE URI used to interpret custom GATE tags | 
| protected static File | userSessionFileThe user session file to use. | 
| static org.eclipse.aether.version.Version | VERSIONThe version of GATE that is currently running. | 
| static String | VERSION_STRINGThe version of GATE that is currently running, as a string. | 
ABOUT_URL_JAVA_PROPERTY_NAME, ADD_NAMESPACE_FEATURES, ANNOT_TYPE_TO_EXPORT, APP_ICON_JAVA_PROPERTY_NAME, APP_SPLASH_JAVA_PROPERTY_NAME, APPLICATION_JAVA_PROPERTY_NAME, AUTOLOAD_PLUGIN_PATH_KEY, AUTOLOAD_PLUGIN_PATH_PROPERTY_NAME, BUILTIN_CREOLE_DIR_PROPERTY_NAME, COMPILER_TYPE_KEY, CORPUS_INDEX_DEFINITION_FEATURE_KEY, CORPUS_INDEX_STATISTICS_FEATURE_KEY, DOC_RTOL_ORIENTATION, DOCEDIT_INSERT_APPEND, DOCEDIT_INSERT_PREPEND, DOCEDIT_READ_ONLY, DOCUMENT_ADD_SPACE_ON_UNPACK_FEATURE_NAME, DOCUMENT_NEW_LINE_TYPE, DOCUMENT_REPOSITIONING_INFO_FEATURE_NAME, ELEMENT_NAMESPACE_PREFIX, ELEMENT_NAMESPACE_URI, GATE_CONFIG_PROPERTY, GATE_DOT_SER, GATE_DOT_XML, GATE_HOME_PROPERTY_NAME, GATE_SITE_CONFIG_PROPERTY_NAME, GATE_USER_CONFIG_PROPERTY_NAME, GATE_USER_SESSION_PROPERTY_NAME, HIDDEN_FEATURE_KEY, KNOWN_PLUGIN_PATH_KEY, LOOK_AND_FEEL, MAIN_FRAME_HEIGHT, MAIN_FRAME_MAXIMIZED, MAIN_FRAME_WIDTH, MENU_PATH_KEY, MENUS_FONT, ORIGINAL_DOCUMENT_CONTENT_FEATURE_NAME, ORIGINAL_MARKUPS_ANNOT_SET_NAME, OTHER_COMPONENTS_FONT, PLUGINS, PLUGINS_HOME_PROPERTY_NAME, SAVE_FEATURES_WHEN_PRESERVING_FORMAT, SAVE_OPTIONS_ON_EXIT, SAVE_SESSION_ON_EXIT, SITE_CONFIG_PROPERTY_NAME, TEXT_COMPONENTS_FONT, THROWEX_FORMAT_PROPERTY_NAME, TITLE_JAVA_PROPERTY_NAME, TOOLBAR_TEXT, USER_CONFIG_PROPERTY_NAME, WORDNET_CONFIG_FILE| Constructor and Description | 
|---|
| Gate() | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | addAutoloadPlugin(Plugin plugin)Adds a new directory to the list of plugins that are loaded automatically
 at start-up. | 
| static void | addCreoleListener(CreoleListener l)Registers a  CreoleListenerwith the Gate system | 
| static void | addKnownPlugin(Plugin plugin)Adds the plugin to the list of known plugins. | 
| static void | configureXStreamSecurity(com.thoughtworks.xstream.XStream xstream) | 
| static String | genSym()Returns a new unique string | 
| static List<Plugin> | getAutoloadPlugins()Returns the list of CREOLE directories the system loads automatically at
 start-up. | 
| static URL | getBuiltinCreoleDir()Get the URL to the "builtin" creole directory, i.e. | 
| static GateClassLoader | getClassLoader()Get the GATE class loader. | 
| static CreoleRegister | getCreoleRegister()Get the CREOLE register. | 
| static DataStoreRegister | getDataStoreRegister()Get the DataStore register. | 
| static String | getDefaultUserConfigFileName()Get the default path to the user's config file, which is used unless an
 alternative name has been specified via system properties or
  setUserConfigFile(java.io.File). | 
| static String | getDefaultUserSessionFileName()Get the default path to the user's session file, which is used unless an
 alternative name has been specified via system properties or
  setUserSessionFile(File) | 
| static String | getEmptyConfigFile()Get an empty config file. | 
| static Executable | getExecutable()Returns the curently set executable. | 
| static File | getGateHome()Gets the GATE home location. | 
| static boolean | getHiddenAttribute(FeatureMap fm)Returns the value for the HIDDEN attribute of a feature map | 
| static Set<Plugin> | getKnownPlugins()Returns the list of CREOLE directories the system knows about (either
 pre-installed plugins in the plugins directory or CREOLE directories that
 have previously been loaded manually). | 
| static Map<String,EventListener> | getListeners()Returns the listeners map, a map that holds all the listeners that
 are singletons (e.g. | 
| static String | getMinJdkVersion()Get the minimum supported version of the JDK | 
| static OptionsMap | getOriginalUserConfig()Get the original, initialisation-time, GATE development environment
 configuration data (initialised from gate.xml). | 
| static Set<Plugin> | getPlugins(String resourceClassName)Returns information about plugin directories which provide the requested
 resource | 
| static File | getPluginsHome()Get the location of the plugins directory. | 
| static Set<String> | getRegisteredIREngines()Gets the set of registered IR engines. | 
| static File | getSiteConfigFile()Get the site config file (generally set during command-line processing or
 as a gate.config property). | 
| static OptionsMap | getUserConfig()Get the GATE development environment configuration data (initialised from
 gate.xml). | 
| static String | getUserConfigElement()Gate the name of the XML element for GATE development environment config
 data. | 
| static File | getUserConfigFile()Get the location of the user's config file. | 
| static File | getUserSessionFile()Get the user session file. | 
| static boolean | getUseXMLSerialization()Should we use XML serialization for applications. | 
| static XStreamSecurity | getXStreamSecurity() | 
| static void | init()Initialisation - must be called by all clients before using any other parts
 of the library. | 
| static void | initConfigData()Reads config data (gate.xml files). | 
| static void | initCreoleRegister()Initialise the CREOLE register. | 
| protected static void | initCreoleRepositories()Loads the CREOLE repositories (aka plugins) that the user has selected for
 automatic loading. | 
| static void | initDataStoreRegister()Initialise the DataStore register. | 
| protected static void | initLocalPaths()Initialises the paths to local files of interest like the GATE home, the
 installed plugins home and site and user configuration files. | 
| static boolean | isGateType(String classname)Checks whether a particular class is a Gate defined type | 
| static boolean | isInitialised()Have we successfully run  init()before? | 
| static boolean | isSandboxed()Find out if GATE is to be run in a sandbox or not. | 
| static URL | normaliseCreoleUrl(URL url)Makes sure the provided URL ends with "/" (CREOLE URLs always point to
 directories so thry should always end with a slash. | 
| static void | registerIREngine(String className)Registers a new IR engine. | 
| static void | removeAutoloadPlugin(Plugin plugin)Tells the system to remove a plugin URL from the list of plugins that are
 loaded automatically at system start-up. | 
| static void | removeKnownPlugin(Plugin plugin)Tells the system to "forget" about one previously known
 directory. | 
| static void | runInSandbox(boolean sandboxed)Method to tell GATE if it is being run inside a JVM sandbox. | 
| static boolean | runningOnMac()This method tries to guess if we are on a Mac OS X system. | 
| static boolean | runningOnUnix()This method tries to guess if we are on a UNIX system. | 
| static void | setBuiltinCreoleDir(URL builtinCreoleDir)Set the URL to the "builtin" creole directory. | 
| static void | setExecutable(Executable executable)Sets the  Executablecurrently under execution. | 
| static void | setGateHome(File gateHome)Set the location of the GATE home directory. | 
| static void | setHiddenAttribute(FeatureMap fm,
                  boolean hidden)Sets the value for the HIDDEN attribute of a feature map | 
| static void | setPluginsHome(File pluginsHome)Set the location of the plugins directory. | 
| static void | setSiteConfigFile(File siteConfigFile)Set the site config file (e.g. | 
| static void | setUserConfigFile(File userConfigFile)Set the location of the user's config file. | 
| static void | setUserSessionFile(File newUserSessionFile)Set the user session file. | 
| static void | setUseXMLSerialization(boolean useXMLSerialization)Tell GATE whether to use XML serialization for applications. | 
| static void | setXStreamSecurity(XStreamSecurity xStreamSecurity) | 
| static boolean | unregisterIREngine(String className)Unregisters a previously registered IR engine. | 
| static void | writeUserConfig()Update the GATE development environment configuration data in the user's
 gate.xml file (create one if it doesn't exist). | 
protected static final org.slf4j.Logger log
public static final int STRINGBUFFER_SIZE
public static final int HASH_STH_SIZE
public static final String URI
protected static final String MIN_JDK_VERSION
protected static final String ENABLE_BENCHMARKING_FEATURE_NAME
public static final String VERSION_STRING
public static final String BUILD
public static final org.eclipse.aether.version.Version VERSION
protected static boolean initFinished
protected static File gateHome
protected static File pluginsHome
protected static URL builtinCreoleDir
protected static File userSessionFile
public static boolean isSandboxed()
public static void runInSandbox(boolean sandboxed)
sandboxed - true if GATE is to be run in a sandbox, false otherwisepublic static String getMinJdkVersion()
public static void init()
                 throws GateException
GateExceptioninitCreoleRegister()public static boolean isInitialised()
init() before?protected static void initLocalPaths()
protected static void initCreoleRepositories()
public static void initCreoleRegister()
                               throws GateException
GateExceptionpublic static void initDataStoreRegister()
public static void initConfigData()
                           throws GateException
GateExceptionpublic static void registerIREngine(String className) throws GateException, ClassNotFoundException
IREngine and be accessible via the GATE class
 loader.className - the fully qualified name of the class to be registeredGateException - if the class does not implement the
           IREngine interface.ClassNotFoundException - if the named class cannot be found.public static boolean unregisterIREngine(String className)
className - the name of the class to be removed from the list of registered IR
          engines.public static Set<String> getRegisteredIREngines()
Set value.public static File getGateHome()
public static boolean isGateType(String classname)
public static boolean getHiddenAttribute(FeatureMap fm)
public static void setHiddenAttribute(FeatureMap fm, boolean hidden)
public static void addCreoleListener(CreoleListener l)
CreoleListener with the Gate systempublic static GateClassLoader getClassLoader()
public static CreoleRegister getCreoleRegister()
public static DataStoreRegister getDataStoreRegister()
public static void setExecutable(Executable executable)
Executable currently under execution. At a given time
 there can be only one executable set. After the executable has finished its
 execution this value should be set back to null. An attempt to set the
 executable while this value is not null will result in the method call
 waiting until the old executable is set to null.public static Executable getExecutable()
setExecutable(gate.Executable)public static String genSym()
public static String getUserConfigElement()
public static File getSiteConfigFile()
public static void setSiteConfigFile(File siteConfigFile)
public static String getEmptyConfigFile()
public static OptionsMap getUserConfig()
public static OptionsMap getOriginalUserConfig()
public static void writeUserConfig()
                            throws GateException
GateExceptionpublic static String getDefaultUserConfigFileName()
setUserConfigFile(java.io.File).public static String getDefaultUserSessionFileName()
setUserSessionFile(File)public static boolean runningOnUnix()
public static boolean runningOnMac()
runningOnUnix() will also
 return true (i.e. Mac is considered a Unix platform) but the reverse is
 not necessarily the case.public static Set<Plugin> getKnownPlugins()
public static void addKnownPlugin(Plugin plugin)
plugin - the plugin to add to the list of known plugins.public static URL normaliseCreoleUrl(URL url)
url - the URL to be normalisedpublic static List<Plugin> getAutoloadPlugins()
public static void addAutoloadPlugin(Plugin plugin)
plugin - the plugin to add to the list of autoload plugins.public static Set<Plugin> getPlugins(String resourceClassName)
resourceClassName - the class name of the resource you are interested inpublic static void removeKnownPlugin(Plugin plugin)
plugin - the the plugin to remove from the list of known pluginspublic static void removeAutoloadPlugin(Plugin plugin)
plugin - the plugin to remove from the list of autoload pluginspublic static void setGateHome(File gateHome)
IllegalStateException - if the value has already been set.public static void setPluginsHome(File pluginsHome)
IllegalStateException - if the value has already been set.public static File getPluginsHome()
Gate.init() has not yet been called).public static void setUserConfigFile(File userConfigFile)
IllegalStateException - if the value has already been set.public static File getUserConfigFile()
Gate.init() has not yet been called).public static void setBuiltinCreoleDir(URL builtinCreoleDir)
IllegalStateException - if the value has already been set.public static URL getBuiltinCreoleDir()
public static void setUserSessionFile(File newUserSessionFile)
IllegalStateException - if the value has already been set.public static File getUserSessionFile()
public static void setUseXMLSerialization(boolean useXMLSerialization)
public static boolean getUseXMLSerialization()
public static Map<String,EventListener> getListeners()
public static XStreamSecurity getXStreamSecurity()
public static void setXStreamSecurity(XStreamSecurity xStreamSecurity)
public static void configureXStreamSecurity(com.thoughtworks.xstream.XStream xstream)
Copyright © 2024 GATE. All rights reserved.