public synchronized void ensureLoading() throws ElkException {

		if (!isLoadingFinished()) {
			if (isIncrementalMode()) {
				if (!stageManager.incrementalAdditionStage.isCompleted()) {
					complete(stageManager.incrementalAdditionStage);
				}
			} else {
				if (!stageManager.contextInitializationStage.isCompleted()) {
					complete(stageManager.contextInitializationStage);
				}
			}
			LOGGER_.trace("Reset axiom loading");
			stageManager.inputLoadingStage.invalidateRecursive();
			// Invalidate stages at the beginnings of the dependency chains.
			stageManager.contextInitializationStage.invalidateRecursive();
			stageManager.incrementalCompletionStage.invalidateRecursive();
		}

		complete(stageManager.inputLoadingStage);

	}
public synchronized void ensureLoading ( ) throws ElkException { if ( ! isLoadingFinished ( ) ) { if ( isIncrementalMode ( ) ) { if ( ! stageManager . incrementalAdditionStage . isCompleted ( ) ) { complete ( stageManager . incrementalAdditionStage ) ; } } else { if ( ! stageManager . contextInitializationStage . isCompleted ( ) ) { complete ( stageManager . contextInitializationStage ) ; } } LOGGER_ . trace ( "Reset axiom loading" ) ; stageManager . inputLoadingStage . invalidateRecursive ( ) ; stageManager . contextInitializationStage . invalidateRecursive ( ) ; stageManager . incrementalCompletionStage . invalidateRecursive ( ) ; } complete ( stageManager . inputLoadingStage ) ; }
Flushes index, if needed, and completes loading if there is new input.
Incremental mode should be changed only during completing loading.

@throws ElkException