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

Method getGateResource

src/main/java/gate/util/Files.java:417–421  ·  view source on GitHub ↗

Get a resource from the GATE resources directory. The return value is a java.net.URL that can be used to retrieve the contents of the resource. The resource name should be relative to resourcePath which is equal with gate/resources ; e.g. for a resource stored as ga

(String resourceName)

Source from the content-addressed store, hash-verified

415 * this method should be passed the name <TT>jape/Test11.jape</TT>.
416 */
417 public static URL getGateResource(String resourceName) {
418 if(resourceName.startsWith("/") || resourceName.startsWith("\\") )
419 return getResource(resourcePath + resourceName);
420 else return getResource(resourcePath + "/" + resourceName);
421 }
422
423 /**
424 * This method takes a regular expression and a directory name and returns

Callers 1

initMethod · 0.95

Calls 1

getResourceMethod · 0.95

Tested by

no test coverage detected