Project

General

Profile

1
package eu.dnetlib.rmi.soap;
2

    
3
import java.util.List;
4

    
5
import javax.jws.WebMethod;
6
import javax.jws.WebParam;
7
import javax.jws.WebService;
8

    
9
import eu.dnetlib.rmi.objects.resultSet.ResultSet;
10
import eu.dnetlib.rmi.soap.exceptions.DocumentNotFoundException;
11
import eu.dnetlib.rmi.soap.exceptions.MDStoreServiceException;
12

    
13
@WebService(targetNamespace = "http://services.dnetlib.eu/")
14
public interface MDStoreService extends BaseService {
15

    
16
	/**
17
	 * Returns ResultSet EPR for delivered mdstore records.
18
	 * 
19
	 * @param mdId
20
	 * @param from
21
	 * @param until
22
	 * @param recordFilter
23
	 *            REGEX on the metadata record
24
	 * @return ResultSet EPR
25
	 * @throws MDStoreServiceException
26
	 */
27
	public ResultSet<String> deliverMDRecords(@WebParam(name = "mdId") final String mdId,
28
			@WebParam(name = "from") final String from,
29
			@WebParam(name = "until") final String until,
30
			@WebParam(name = "recordsFilter") final String recordFilter) throws MDStoreServiceException;
31

    
32
	/**
33
	 * Deliver single record from selected mdstore.
34
	 * 
35
	 * @param mdId
36
	 * @param recordId
37
	 * @return record
38
	 * @throws MDStoreServiceException
39
	 */
40
	public String deliverRecord(@WebParam(name = "mdId") final String mdId, @WebParam(name = "recordId") final String recordId) throws MDStoreServiceException,
41
			DocumentNotFoundException;
42

    
43
	/**
44
	 * Returns list of all stored indices.
45
	 * 
46
	 * @return list of all stored indices
47
	 */
48
	public List<String> getListOfMDStores() throws MDStoreServiceException;
49

    
50
	public List<String> listMDStores(@WebParam(name = "format") final String format,
51
			@WebParam(name = "layout") final String layout,
52
			@WebParam(name = "interpretation") final String interpretation) throws MDStoreServiceException;
53

    
54
	public ResultSet<String> bulkDeliverMDRecords(@WebParam(name = "format") final String format,
55
			@WebParam(name = "layout") final String layout,
56
			@WebParam(name = "interpretation") final String interpretation) throws MDStoreServiceException;
57

    
58
	/**
59
	 * Gets the size of the mdstore with the given identifier.
60
	 * 
61
	 * @param mdId
62
	 *            identifier of an mdstore
63
	 * @return the number of records in the store
64
	 */
65
	@WebMethod(operationName = "size")
66
	public int size(@WebParam(name = "mdId") final String mdId) throws MDStoreServiceException;
67

    
68
	/**
69
	 * Gets the sum of records stored in all mdstore with the given format, layout , interpretation
70
	 * 
71
	 * @param format
72
	 *            format
73
	 * @param layout
74
	 *            layout
75
	 * @param interpretation
76
	 *            interpretation
77
	 * @return the total number of records in the mdstores of the given type
78
	 */
79
	@WebMethod(operationName = "sizeByFormat")
80
	public int size(@WebParam(name = "format") final String format,
81
			@WebParam(name = "layout") final String layout,
82
			@WebParam(name = "interpretation") final String interpretation) throws MDStoreServiceException;
83
}
(8-8/14)