/** * Start a timer of the given string name for the current thread. If no such * timer exists yet, then it will be newly created. * * @param timerName * the name of the timer * @param todoFlags */ public static void startNamedTimer(String timerName, int todoFlags) { getNamedTimer(timerName, todoFlags).start(); }
/** * Reset a timer of the given string name for all todos and the current * thread. If no such timer exists yet, then it will be newly created. * * @param timerName * the name of the timer */ public static void resetNamedTimer(String timerName) { getNamedTimer(timerName).reset(); }
/** * Disables or enables Web access. * * @param offlineModeEnabled * if true, all Web access is disabled and only local files will * be processed */ public void setOfflineMode(boolean offlineModeEnabled) { if (offlineModeEnabled) { this.webResourceFetcher = null; } else { this.webResourceFetcher = new WebResourceFetcherImpl(); } }
/** * Sets the directory where dumpfiles are stored locally. If it does not * exist yet, this directory will be created. Dumpfiles will later be stored * in a subdirectory "dumpfiles", but this will only be created when needed. * * @param downloadDirectory * the download base directory * @throws IOException * if the existence of the directory could not be checked or if * it did not exists and could not be created either */ public void setDownloadDirectory(String downloadDirectory) throws IOException { this.downloadDirectoryManager = DirectoryManagerFactory .createDirectoryManager(downloadDirectory, false); }
/** * Constructor. * * @param iterableOfIterables * the nested iterable to iterate over */ public NestedIterator(Iterable<? extends Iterable<T>> iterableOfIterables) { this.outerIterator = iterableOfIterables.iterator(); advanceOuterIterator(); }
/** * Constructor * * @param baseDirectory * the directory where the file manager should point initially; * will be created if not existing * @param readOnly * if false, the directory manager will attempt to create * directories when changing to a location that does not exist * @throws IOException * if there was a problem creating the directory */ public DirectoryManagerImpl(Path baseDirectory, Boolean readOnly) throws IOException { this.directory = baseDirectory; this.readOnly = readOnly; createDirectory(this.directory); }
@Override public DirectoryManager getSubdirectoryManager(String subdirectoryName) throws IOException { return new DirectoryManagerImpl(directory.resolve(subdirectoryName), this.readOnly); }
/** * Returns an iterator that provides access to all statements, without * considering the statement groups. The order of statements is preserved. * * @return iterator over all statements */ default Iterator<Statement> getAllStatements() { return new NestedIterator<>(getStatementGroups()); }
@Override public InputStream getDumpFileStream() throws IOException { String dumpFileName = WmfDumpFile.getDumpFileName(this.dumpContentType, this.projectName, this.dateStamp); return this.localDumpfileDirectoryManager.getInputStreamForFile( dumpFileName, WmfDumpFile.getDumpFileCompressionType(dumpFileName)); }
/** * Start a timer of the given string name for all todos and the current * thread. If no such timer exists yet, then it will be newly created. * * @param timerName * the name of the timer */ public static void startNamedTimer(String timerName) { getNamedTimer(timerName).start(); }
/** * Reset a timer of the given string name for all todos and the current * thread. If no such timer exists yet, then it will be newly created. * * @param timerName * the name of the timer */ public static void resetNamedTimer(String timerName) { getNamedTimer(timerName).reset(); }
/** * Constructor. * * @param iterableOfIterables * the nested iterable to iterate over */ public NestedIterator(Iterable<? extends Iterable<T>> iterableOfIterables) { this.outerIterator = iterableOfIterables.iterator(); advanceOuterIterator(); }
/** * Start a timer of the given string name for the current thread. If no such * timer exists yet, then it will be newly created. * * @param timerName * the name of the timer * @param todoFlags */ public static void startNamedTimer(String timerName, int todoFlags) { getNamedTimer(timerName, todoFlags).start(); }
/** * Reset a timer of the given string name for the current thread. If no such * timer exists yet, then it will be newly created. * * @param timerName * the name of the timer * @param todoFlags */ public static void resetNamedTimer(String timerName, int todoFlags) { getNamedTimer(timerName, todoFlags).reset(); }
/** * Start a timer of the given string name for all todos and the current * thread. If no such timer exists yet, then it will be newly created. * * @param timerName * the name of the timer */ public static void startNamedTimer(String timerName) { getNamedTimer(timerName).start(); }
/** * Reset a timer of the given string name for the current thread. If no such * timer exists yet, then it will be newly created. * * @param timerName * the name of the timer * @param todoFlags */ public static void resetNamedTimer(String timerName, int todoFlags) { getNamedTimer(timerName, todoFlags).reset(); }
/** * Start a timer of the given string name for the current thread. If no such * timer exists yet, then it will be newly created. * * @param timerName * the name of the timer * @param todoFlags * @param threadId * of the thread to track, or 0 if only system clock should be * tracked */ public static void startNamedTimer(String timerName, int todoFlags, long threadId) { getNamedTimer(timerName, todoFlags, threadId).start(); }
/** * Reset a timer of the given string name for the given thread. If no such * timer exists yet, then it will be newly created. * * @param timerName * the name of the timer * @param todoFlags * @param threadId * of the thread to track, or 0 if only system clock should be * tracked */ public static void resetNamedTimer(String timerName, int todoFlags, long threadId) { getNamedTimer(timerName, todoFlags, threadId).reset(); }
/** * Start a timer of the given string name for the current thread. If no such * timer exists yet, then it will be newly created. * * @param timerName * the name of the timer * @param todoFlags * @param threadId * of the thread to track, or 0 if only system clock should be * tracked */ public static void startNamedTimer(String timerName, int todoFlags, long threadId) { getNamedTimer(timerName, todoFlags, threadId).start(); }
/** * Reset a timer of the given string name for the given thread. If no such * timer exists yet, then it will be newly created. * * @param timerName * the name of the timer * @param todoFlags * @param threadId * of the thread to track, or 0 if only system clock should be * tracked */ public static void resetNamedTimer(String timerName, int todoFlags, long threadId) { getNamedTimer(timerName, todoFlags, threadId).reset(); }