public Reader obtainReader() { return textSource.obtainReader(); } }
protected void announceSeeds(CountDownLatch latchOrNull) { BufferedReader reader = new BufferedReader(textSource.obtainReader()); try { announceSeedsFromReader(reader,latchOrNull); } finally { IOUtils.closeQuietly(reader); } }
public Robotstxt(ReadSource customRobots) { Reader reader = customRobots.obtainReader(); try { initializeFromReader(reader); } catch (IOException e) { logger.log(Level.SEVERE, "robots ReadSource problem: potential for inadvertent overcrawling", e); } finally { IOUtils.closeQuietly(reader); } }
/** * Create a new ScriptEngine instance, preloaded with any supplied * source file and the variables 'self' (this ScriptedDecideRule) * and 'context' (the ApplicationContext). * * @return the new Interpreter instance */ protected ScriptEngine newEngine() { ScriptEngine interpreter = new ScriptEngineManager().getEngineByName(engineName); interpreter.put("self", this); interpreter.put("context", appCtx); Reader reader = null; try { reader = getScriptSource().obtainReader(); interpreter.eval(reader); } catch (ScriptException e) { logger.log(Level.SEVERE,"script problem",e); } finally { IOUtils.closeQuietly(reader); } return interpreter; }
/** * Create a new {@link ScriptEngine} instance, preloaded with any supplied * source file and the variables 'self' (this {@link ScriptedProcessor}) and * 'context' (the {@link ApplicationContext}). * * @return the new ScriptEngine instance */ protected ScriptEngine newEngine() { ScriptEngine interpreter = new ScriptEngineManager().getEngineByName(engineName); interpreter.put("self", this); interpreter.put("context", appCtx); Reader reader = null; try { reader = getScriptSource().obtainReader(); interpreter.eval(reader); } catch (ScriptException e) { logger.log(Level.SEVERE,"script problem",e); } finally { IOUtils.closeQuietly(reader); } return interpreter; } }
/** * Construct the set of prefixes to use, from the seed list ( * which may include both URIs and '+'-prefixed directives). */ protected void buildSurtPrefixSet() { if (getSurtsSource() != null) { if (logger.isLoggable(Level.FINE)) { logger.fine("reading surt prefixes from " + getSurtsSource()); } Reader reader = getSurtsSource().obtainReader(); try { surtPrefixes.importFromMixed(reader, true); } finally { IOUtils.closeQuietly(reader); } } }
public Reader obtainReader() { return textSource.obtainReader(); } }
public Robotstxt(ReadSource customRobots) { BufferedReader reader = new BufferedReader(customRobots.obtainReader()); try { initializeFromReader(reader); } catch (IOException e) { logger.log(Level.SEVERE, "robots ReadSource problem: potential for inadvertent overcrawling", e); } finally { IOUtils.closeQuietly(reader); } }
public Robotstxt(ReadSource customRobots) { Reader reader = customRobots.obtainReader(); try { initializeFromReader(reader); } catch (IOException e) { logger.log(Level.SEVERE, "robots ReadSource problem: potential for inadvertent overcrawling", e); } finally { IOUtils.closeQuietly(reader); } }
public Robotstxt(ReadSource customRobots) { BufferedReader reader = new BufferedReader(customRobots.obtainReader()); try { initializeFromReader(reader); } catch (IOException e) { logger.log(Level.SEVERE, "robots ReadSource problem: potential for inadvertent overcrawling", e); } finally { IOUtils.closeQuietly(reader); } }
protected void announceSeeds(CountDownLatch latchOrNull) { BufferedReader reader = new BufferedReader(textSource.obtainReader()); try { announceSeedsFromReader(reader,latchOrNull); } finally { IOUtils.closeQuietly(reader); } }
/** * Create a new ScriptEngine instance, preloaded with any supplied * source file and the variables 'self' (this ScriptedDecideRule) * and 'context' (the ApplicationContext). * * @return the new Interpreter instance */ protected ScriptEngine newEngine() { ScriptEngine interpreter = new ScriptEngineManager().getEngineByName(engineName); interpreter.put("self", this); interpreter.put("context", appCtx); Reader reader = null; try { reader = getScriptSource().obtainReader(); interpreter.eval(reader); } catch (ScriptException e) { logger.log(Level.SEVERE,"script problem",e); } finally { IOUtils.closeQuietly(reader); } return interpreter; }
/** * Create a new {@link ScriptEngine} instance, preloaded with any supplied * source file and the variables 'self' (this {@link ScriptedProcessor}) and * 'context' (the {@link ApplicationContext}). * * @return the new ScriptEngine instance */ protected ScriptEngine newEngine() { ScriptEngine interpreter = new ScriptEngineManager().getEngineByName(engineName); interpreter.put("self", this); interpreter.put("context", appCtx); Reader reader = null; try { reader = getScriptSource().obtainReader(); interpreter.eval(reader); } catch (ScriptException e) { logger.log(Level.SEVERE,"script problem",e); } finally { IOUtils.closeQuietly(reader); } return interpreter; } }
/** * Construct the set of prefixes to use, from the seed list ( * which may include both URIs and '+'-prefixed directives). */ protected void buildSurtPrefixSet() { if (getSurtsSource() != null) { if (logger.isLoggable(Level.FINE)) { logger.fine("reading surt prefixes from " + getSurtsSource()); } Reader reader = getSurtsSource().obtainReader(); try { surtPrefixes.importFromMixed(reader, true); } finally { IOUtils.closeQuietly(reader); } } }