/*-
 *******************************************************************************
 * Copyright (c) 2011, 2014 Diamond Light Source Ltd.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Peter Chang - initial API and implementation and/or initial documentation
 *******************************************************************************/

package org.eclipse.dawnsci.analysis.api.io;

import org.eclipse.dawnsci.analysis.api.monitor.IMonitor;

/**
 * This interface specifies the methods required to allow the ScanFileHolder to load in data from a file of some
 * description
 */
public interface IFileLoader {

	/**
	 * This function is called when the ScanFileHolder needs to load data from a particular source.
	 * It can also be called on by itself
	 * 
	 * @return This returned object is all the data which has been loaded returned in a small object package.
	 * @throws ScanFileHolderException
	 */
	IDataHolder loadFile() throws ScanFileHolderException;

	/**
	 * This function is called when the ScanFileHolder needs to load data from a particular source
	 * It can also be called on by itself
	 * 
	 * @param mon - may be null
	 * @return This returned object is all the data which has been loaded returned in a small object package.
	 * @throws ScanFileHolderException
	 */
	IDataHolder loadFile(IMonitor mon) throws ScanFileHolderException;

	/**
	 * Set the loader to load metadata as well as data (all loaders default to this behaviour)
	 * 
	 * @param willLoadMetadata
	 */
	void setLoadMetadata(boolean willLoadMetadata);

	/**
	 * Set the loader to load all datasets lazily
	 * 
	 * @param willLoadLazily
	 */
	void setLoadAllLazily(boolean willLoadLazily);

	/**
	 * If a loader supports asynchronous load
	 * Throws RuntimeException is asynch not supported.
	 * @param treeOnTop
	 */
	void setAsyncLoad(boolean treeOnTop);

	/**
	 * If this loader supports asynchronous loading
	 * @return if loading or throws RuntimeException if asynchronous loading is not supported.
	 */
	boolean isLoading();
}

@@ -1911,20 +1911,31 @@
 %09 * 
-If a
+Set whether the
  loader 
 supp
@@ -1922,39 +1922,36 @@
 ther the loader 
-support
+load
 s asynchronous l
@@ -1948,21 +1948,25 @@
 chronous
- load
+ly or not
 %0A%09 * Thr
@@ -1987,24 +1987,41 @@
 eption i
-s
+f
  asynch
+ronous loading is
  not sup
@@ -2039,25 +2039,22 @@
  @param 
-treeOnTop
+enable
 %0A%09 */%0A%09v
@@ -2082,17 +2082,14 @@
 ean 
-treeOnTop
+enable
 );%0A%0A
@@ -2158,18 +2158,48 @@
 urn 
-if loading
+true if still loading, false if finished
  or 

Clean up javadoc