|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gate.Gate
The class is responsible for initialising the GATE libraries, and providing access to singleton utility objects, such as the GATE class loader, CREOLE register and so on.
Constructor Summary | |
Gate()
|
Method Summary | |
static void |
addCreoleListener(CreoleListener l)
Registers a CreoleListener with the Gate system |
static boolean |
getApplicationAttribute(FeatureMap fm)
Returns the value for the APPLICATION attribute of a feature map |
static GateClassLoader |
getClassLoader()
Get the GATE class loader. |
static CreoleRegister |
getCreoleRegister()
Get the CREOLE register. |
static DataStoreRegister |
getDataStoreRegister()
Get the DataStore register. |
static boolean |
getHiddenAttribute(FeatureMap fm)
Returns the value for the HIDDEN attribute of a feature map |
static String |
getMinJdkVersion()
Get the minimum supported version of the JDK |
static String |
getName(FeatureMap fm)
Gets the NAME attribute feature map. |
static URL |
getUrl()
Get a URL that points to either an HTTP server or a file system that contains GATE files (such as test cases). |
static URL |
getUrl(String path)
Get a URL that points to either an HTTP server or a file system that contains GATE files (such as test cases). |
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. |
static void |
initDataStoreRegister()
Initialise the DataStore register. |
static boolean |
isLocalWebServer()
Should we assume there's a local web server? |
static boolean |
isNetConnected()
Should we assume we're connected to the net? |
static String |
locateGateFiles()
Find the location of the GATE binaries (and resources) in the local file system. |
static void |
setApplicationAttribute(FeatureMap fm,
boolean isApplication)
Sets the value for the APPLICATION attribute of a feature map |
static void |
setHiddenAttribute(FeatureMap fm,
boolean hidden)
Sets the value for the HIDDEN attribute of a feature map |
static void |
setLocalWebServer(boolean b)
Tell GATE whether to assume there's a local web server. |
static void |
setName(FeatureMap fm,
String name)
Sets the NAME attribute in a feature map. |
static void |
setNetConnected(boolean b)
Tell GATE whether to assume we're connected to the net. |
static void |
setUrlBase(URL urlBase)
Set the URL base for GATE files, e.g. |
static boolean |
tryNetServer(String hostName,
int serverPort,
String path)
Try to contact a network server. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Gate()
Method Detail |
public static String getMinJdkVersion()
public static void init() throws GateException
initCreoleRegister()
public static void initCreoleRegister() throws GateException
public static void initDataStoreRegister()
public static void initConfigData() throws GateException
public static URL getUrl() throws GateException
Note that the value returned will only be calculated when the existing value recorded by this class is null (which will be the case when neither setUrlBase nor getUrlBase have been called, or if setUrlBase(null) has been called).
public static URL getUrl(String path) throws GateException
path
- a path to add to the base URL.getUrl()
public static boolean isNetConnected()
public static void setNetConnected(boolean b)
init()
.public static boolean isLocalWebServer()
public static void setLocalWebServer(boolean b)
public static boolean tryNetServer(String hostName, int serverPort, String path) throws MalformedURLException
hostName
- the name of the host to try and connect toserverPort
- the port to try and connect topath
- a path to append to the URL when we make a successfull
connection. E.g. for host xyz, port 80, path /thing, the resultant URL
would be http://xyz:80/thing.public static String locateGateFiles()
public static boolean getHiddenAttribute(FeatureMap fm)
public static void setHiddenAttribute(FeatureMap fm, boolean hidden)
public static boolean getApplicationAttribute(FeatureMap fm)
public static void setApplicationAttribute(FeatureMap fm, boolean isApplication)
public static String getName(FeatureMap fm)
public static void setName(FeatureMap fm, String name)
public static void addCreoleListener(CreoleListener l)
CreoleListener
with the Gate systempublic static void setUrlBase(URL urlBase)
public static GateClassLoader getClassLoader()
public static CreoleRegister getCreoleRegister()
public static DataStoreRegister getDataStoreRegister()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |