<commit_before>/*-
 *******************************************************************************
 * 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:
 *    <NAME> - 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();
}
<commit_msg>Clean up javadoc<commit_after>/*-
 *******************************************************************************
 * 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:
 *    <NAME> - 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);

	/**
	 * Set whether the loader loads asynchronously or not
	 * Throws RuntimeException if asynchronous loading is not supported.
	 * @param enable
	 */
	void setAsyncLoad(boolean enable);

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

{'fraction_non_alphanumeric': 0.1321288637353069, 'fraction_numerical': 0.00522420548541576, 'mean_word_length': 4.128348214285714, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7664801', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1092, 'n_words': 503}