package eu.dnetlib.data.harvesting;

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.interfaces.ws.IDriverService;
import eu.dnetlib.data.harvesting.ws.PropertyArray;

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

	

	/**
	 * returns an epr referring to a resultset containing records, which are fetched according to the OAI-PMH method call
	 */
	@WebMethod(action="getResult", operationName="getResult")
	@WebResult(name="Return")
	public W3CEndpointReference getResult(
			@WebParam(name="oaipmhMethod") String methodName,
			@WebParam(name="metadataPrefix") String metadataPrefix,
			@WebParam(name="fromDate") String fromDate,
			@WebParam(name="toDate") String toDate,
			@WebParam(name="setrestriction") String set,
			@WebParam(name="baseURL") String baseURL,
			@WebParam(name="recordIdentifier") String recordIdentifier,
			@WebParam(name="repositoryId") String repositorId,
			@WebParam(name="mdStoreId") String mdStoreId
			)throws HarvestingServiceException;

	/**
	 * returns status information of the harvesting operation job identified by rsId
	 * 
	 * @param rsId
	 * @return
	 * @throws HarvestingServiceException
	 */
	@WebMethod(action="getStatusInformation", operationName="getStatusInformation")
	@WebResult(name="Return")
	public PropertyArray getStatusInformation(
			@WebParam(name="rsId") String rsId) throws HarvestingServiceException;
			
}
