MCPcopy Create free account
hub / github.com/GateNLP/gate-core / Gate

Class Gate

src/main/java/gate/Gate.java:70–1451  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

68 * register and so on.
69 */
70public class Gate implements GateConstants {
71
72 /** A logger to use instead of sending messages to Out or Err **/
73 protected static final Logger log = LoggerFactory.getLogger(Gate.class);
74
75 /**
76 * The default StringBuffer size, it seems that we need longer string than the
77 * StringBuffer class default because of the high number of buffer expansions
78 */
79 public static final int STRINGBUFFER_SIZE = 1024;
80
81 /**
82 * The default size to be used for Hashtable, HashMap and HashSet. The defualt
83 * is 11 and it leads to big memory usage. Having a default load factor of
84 * 0.75, table of size 4 can take 3 elements before being re-hashed - a values
85 * that seems to be optimal for most of the cases.
86 */
87 public static final int HASH_STH_SIZE = 4;
88
89
90
91 /** The GATE URI used to interpret custom GATE tags */
92 public static final String URI = "http://www.gate.ac.uk";
93
94 /** Minimum version of JDK we support */
95 protected static final String MIN_JDK_VERSION = "1.8";
96
97 /**
98 * Feature name that should be used to set if the benchmarking logging should
99 * be enabled or disabled.
100 */
101 protected static final String ENABLE_BENCHMARKING_FEATURE_NAME =
102 "gate.enable.benchmark";
103
104
105 /**
106 * The version of GATE that is currently running, as a string.
107 */
108 public static final String VERSION_STRING;
109
110 /**
111 * The build number of the running GATE (i.e. the Git revision
112 * from which it was compiled).
113 */
114 public static final String BUILD;
115
116 /**
117 * The version of GATE that is currently running.
118 */
119 public static final Version VERSION;
120
121 // find out the version and build numbers
122 static {
123
124 // we can't have the possibility of assigning to a final variable twice so
125 // we put the details into a temp variable and then once we are happy assign
126 // it to the static final variable
127 String temp;

Callers

nothing calls this directly

Calls 4

getNlMethod · 0.95
readLineMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected