Project

General

Profile

1
package eu.dnetlib.rmi.data;
2

    
3
import java.util.List;
4
import javax.jws.WebMethod;
5
import javax.jws.WebParam;
6
import javax.jws.WebService;
7

    
8
import eu.dnetlib.rmi.common.BaseService;
9
import eu.dnetlib.rmi.common.ResultSet;
10

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

    
14
	/**
15
	 * Identifies service and version.
16
	 * 
17
	 * @return
18
	 */
19
	@Override
20
    String identify();
21

    
22
	/**
23
	 * Returns ResultSet EPR for delivered mdstore records.
24
	 * 
25
	 * @param mdId
26
	 * @param from
27
	 * @param until
28
	 * @param recordFilter
29
	 *            REGEX on the metadata record
30
	 * @return ResultSet EPR
31
	 * @throws MDStoreServiceException
32
	 */
33
    ResultSet<String> deliverMDRecords(@WebParam(name = "mdId") final String mdId,
34
                                       @WebParam(name = "from") final String from,
35
                                       @WebParam(name = "until") final String until,
36
                                       @WebParam(name = "recordsFilter") final String recordFilter) throws MDStoreServiceException;
37

    
38
	/**
39
	 * Deliver single record from selected mdstore.
40
	 * 
41
	 * @param mdId
42
	 * @param recordId
43
	 * @return record
44
	 * @throws MDStoreServiceException
45
	 */
46
    String deliverRecord(@WebParam(name = "mdId") final String mdId, @WebParam(name = "recordId") final String recordId) throws MDStoreServiceException;
47

    
48
	/**
49
	 * Returns list of all stored indices.
50
	 * 
51
	 * @return list of all stored indices
52
	 */
53
    List<String> getListOfMDStores() throws MDStoreServiceException;
54

    
55
    List<String> listMDStores(@WebParam(name = "format") final String format,
56
                              @WebParam(name = "layout") final String layout,
57
			@WebParam(name = "interpretation") final String interpretation) throws MDStoreServiceException;
58

    
59
    ResultSet<String> bulkDeliverMDRecords(@WebParam(name = "format") final String format,
60
                                           @WebParam(name = "layout") final String layout,
61
                                           @WebParam(name = "interpretation") final String interpretation) throws MDStoreServiceException;
62

    
63
	/**
64
	 * Store md records from a result set
65
	 * 
66
	 * @param mdId
67
	 * @param rsId
68
	 * @param storingType
69
	 * @return returns true immediately.
70
	 * @throws MDStoreServiceException
71
	 */
72
	@Deprecated
73
    boolean storeMDRecordsFromRS(@WebParam(name = "mdId") final String mdId,
74
                                 @WebParam(name = "rsId") final String rsId,
75
                                 @WebParam(name = "storingType") final String storingType) throws MDStoreServiceException;
76

    
77
	/**
78
	 * Gets the size of the mdstore with the given identifier.
79
	 * 
80
	 * @param mdId
81
	 *            identifier of an mdstore
82
	 * @return the number of records in the store
83
	 */
84
	@WebMethod(operationName = "size")
85
    int size(@WebParam(name = "mdId") final String mdId) throws MDStoreServiceException;
86

    
87
	/**
88
	 * Gets the sum of records stored in all mdstore with the given format, layout , interpretation
89
	 * 
90
	 * @param format
91
	 *            format
92
	 * @param layout
93
	 *            layout
94
	 * @param interpretation
95
	 *            interpretation
96
	 * @return the total number of records in the mdstores of the given type
97
	 */
98
	@WebMethod(operationName = "sizeByFormat")
99
    int size(@WebParam(name = "format") final String format,
100
             @WebParam(name = "layout") final String layout,
101
             @WebParam(name = "interpretation") final String interpretation) throws MDStoreServiceException;
102

    
103
}
(19-19/35)