package eu.dnetlib.functionality.webInterface.app;

import java.util.List;

import eu.dnetlib.domain.functionality.LayoutField;

public interface IndexLayoutManager {

	/**
	 * Initialize the index layout manager. The lists returned by
	 * {@link #getIndexableFields()}, {@link #getResultFields()},
	 * {@link #getStatFields()}, and {@link #getTokenizableFields()}
	 * are also updated.
	 * 
	 * @param name	The name of the index layout to use.
	 * @return	The current index layout.
	 */
	public void init();
	
	/**
	 * Return all the {@link LayoutField} in the current layout where
	 * {@link LayoutField#isIndexable()} returns <code>true</code>. The
	 * current layout is specified by calling {@link #initialize(String)}. 
	 * 
	 * @return The fileds with no specific order.
	 */
	public List<LayoutField> getIndexableFields();
	
	/**
	 * Return all the {@link LayoutField} in the current layout where
	 * {@link LayoutField#isResult()} returns <code>true</code>. The
	 * current layout is specified by calling {@link #initialize(String)}. 
	 * 
	 * @return The fileds with no specific order.
	 */
	public List<LayoutField> getResultFields();
	
	/**
	 * Return all the {@link LayoutField} in the current layout where
	 * {@link LayoutField#isStat()} returns <code>true</code>. The
	 * current layout is specified by calling {@link #initialize(String)}. 
	 * 
	 * @return The fileds with no specific order.
	 */
	public List<LayoutField> getStatFields();
	
	/**
	 * Return all the {@link LayoutField} in the current layout where
	 * {@link LayoutField#isTokenizable()} returns <code>true</code>. The
	 * current layout is specified by calling {@link #initialize(String)}. 
	 * 
	 * @return The fileds with no specific order.
	 */
	public List<LayoutField> getTokenizableFields();
}



