/**
 * 
 */
package eu.dnetlib.data.textengine;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.ws.wsaddressing.W3CEndpointReference;


import eu.dnetlib.common.ws.dataprov.IDataProvider;
import eu.dnetlib.common.interfaces.ws.IDriverService;
import eu.dnetlib.common.interfaces.ws.ServiceException;

/**
 * @author Jochen Schirrwagen (jochen.schirrwagen@uni-bielefeld.de)
 *
 */
@WebService( targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/" )
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
public interface ITextEngineService extends IDriverService, IDataProvider {

	/**
	 * Recognize the language of text
	 * 
	 * @param text
	 * @param recognize_type
	 * @return the ISO-639-2 language code as a string
	 * @throws ServiceException
	 */
	@WebMethod(action="recognize", operationName="recognize")
	@WebResult(name="Return")
	public String recognize(
			@WebParam(name="text") String text,
			@WebParam(name="recognize_type") RecognizeType recognize_type) throws ServiceException;
	
	/**
	 * Recognize the language of resultset elements
	 * @param epr, the endpoint reference of a resultset service
	 * @param recognize_type
	 * @return the ISO-639-2 language code as a string
	 * @throws ServiceException
	 */
	@WebMethod(action="recognizeRS", operationName="recognizeRS")
	@WebResult(name="Return")
	public W3CEndpointReference recognizeRS(
			@WebParam(name="epr") W3CEndpointReference epr,
			@WebParam(name="recognizeRS_type") RecognizeType recognize_type
			) throws ServiceException;
	
	/**
	 * Recognize the language of a text in a file.
	 * 
	 * @param file
	 * @return the ISO-639-2 language code as a string
	 * @throws ServiceException
	 */
	@WebMethod(action="recognizeFile", operationName="recognizeFile")
	@WebResult(name="Return")
	public String recognizeFile(
			@WebParam(name="file") String file
 			) throws ServiceException;
	
}
