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

Method isValid

src/main/java/gate/creole/Plugin.java:300–332  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

298 }
299
300 public boolean isValid() {
301 // we need to ensure parseCreole() has been called before we can know if the
302 // valid flag is .... valid
303 getResourceInfoList();
304
305 //Main.version
306 if (Gate.VERSION == null || minGateVersion == null || minGateVersion.isEmpty()) {
307 Utils.logOnce(log, Level.DEBUG,
308 "unable to check minimum GATE version, plugins may not load or might produce errors");
309 return valid;
310 }
311
312 try {
313 Version pluginVersion = versionScheme.parseVersion(minGateVersion);
314
315 boolean validGateVersion = Gate.VERSION.compareTo(pluginVersion) >= 0;
316
317 if(!validGateVersion) {
318 Utils.logOnce(log, Level.WARN,
319 getName()
320 + " is not compatible with this version of GATE, requires at least GATE"
321 + pluginVersion.toString());
322 }
323
324 valid = valid && validGateVersion;
325 } catch(InvalidVersionSpecificationException e) {
326 Utils.logOnce(log, Level.DEBUG,
327 "unable to parse minimum GATE version, plugin, " + getName()
328 + ", may not load or might produce errors");
329 }
330
331 return valid;
332 }
333
334 public void copyResources(File dir) throws IOException, URISyntaxException {
335 throw new UnsupportedOperationException(

Callers 4

getValueAtMethod · 0.95
isCellEditableMethod · 0.95
endElementMethod · 0.45
registerPluginMethod · 0.45

Calls 6

getResourceInfoListMethod · 0.95
logOnceMethod · 0.95
getNameMethod · 0.95
compareToMethod · 0.65
toStringMethod · 0.65
isEmptyMethod · 0.45

Tested by

no test coverage detected