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)
| 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 |