@param path @param scriptingLang @param namespace @throws IOException
(String path, String scriptingLang, String namespace)
| 43 | * @throws IOException |
| 44 | */ |
| 45 | public void parseRegister(String path, String scriptingLang, String namespace) throws IOException { |
| 46 | try { |
| 47 | URI uri = new URI(path); |
| 48 | if (resolvesToJar(uri)) { |
| 49 | if (scriptingLang != null || namespace != null) { |
| 50 | throw new ParserException("Cannot register a jar with a scripting language or namespace"); |
| 51 | } |
| 52 | URI[] uriList = resolve(uri); |
| 53 | for (URI jarUri : uriList) { |
| 54 | pigServer.registerJar(jarUri.toString()); |
| 55 | } |
| 56 | } else { |
| 57 | pigServer.registerCode(path, scriptingLang, namespace); |
| 58 | } |
| 59 | } catch (URISyntaxException e) { |
| 60 | throw new ParserException("URI " + path + " is incorrect.", e); |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * @param uri |