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
|
public 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
|
public 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
|
* Returns ResultSet EPR for delivered mdstore records.
|
40
|
*
|
41
|
* @param mdId
|
42
|
* @param from
|
43
|
* @param until
|
44
|
* @param recordFilter
|
45
|
* REGEX on the metadata record
|
46
|
* @param noCursorTimeout set to true to disable cursor timeout on the mdstore to be read.
|
47
|
* @return ResultSet EPR
|
48
|
* @throws MDStoreServiceException
|
49
|
*/
|
50
|
public ResultSet<String> deliverMDRecords(@WebParam(name = "mdId") final String mdId,
|
51
|
@WebParam(name = "from") final String from,
|
52
|
@WebParam(name = "until") final String until,
|
53
|
@WebParam(name = "recordsFilter") final String recordFilter,
|
54
|
@WebParam(name="noCursorTimeout") final boolean noCursorTimeout) throws MDStoreServiceException;
|
55
|
|
56
|
/**
|
57
|
* Deliver single record from selected mdstore.
|
58
|
*
|
59
|
* @param mdId
|
60
|
* @param recordId
|
61
|
* @return record
|
62
|
* @throws MDStoreServiceException
|
63
|
*/
|
64
|
public String deliverRecord(@WebParam(name = "mdId") final String mdId, @WebParam(name = "recordId") final String recordId) throws MDStoreServiceException,
|
65
|
DocumentNotFoundException;
|
66
|
|
67
|
/**
|
68
|
* Returns list of all stored indices.
|
69
|
*
|
70
|
* @return list of all stored indices
|
71
|
*/
|
72
|
public List<String> getListOfMDStores() throws MDStoreServiceException;
|
73
|
|
74
|
public List<String> listMDStores(@WebParam(name = "format") final String format,
|
75
|
@WebParam(name = "layout") final String layout,
|
76
|
@WebParam(name = "interpretation") final String interpretation) throws MDStoreServiceException;
|
77
|
|
78
|
public ResultSet<String> bulkDeliverMDRecords(@WebParam(name = "format") final String format,
|
79
|
@WebParam(name = "layout") final String layout,
|
80
|
@WebParam(name = "interpretation") final String interpretation) throws MDStoreServiceException;
|
81
|
|
82
|
/**
|
83
|
* Store md records from a result set
|
84
|
*
|
85
|
* @param mdId
|
86
|
* @param rsId
|
87
|
* @param storingType
|
88
|
* @return returns true immediately.
|
89
|
* @throws MDStoreServiceException
|
90
|
*/
|
91
|
@Deprecated
|
92
|
public boolean storeMDRecordsFromRS(@WebParam(name = "mdId") final String mdId,
|
93
|
@WebParam(name = "rsId") final String rsId,
|
94
|
@WebParam(name = "storingType") final String storingType) throws MDStoreServiceException;
|
95
|
|
96
|
/**
|
97
|
* Gets the size of the mdstore with the given identifier.
|
98
|
*
|
99
|
* @param mdId
|
100
|
* identifier of an mdstore
|
101
|
* @return the number of records in the store
|
102
|
*/
|
103
|
@WebMethod(operationName = "size")
|
104
|
public int size(@WebParam(name = "mdId") final String mdId) throws MDStoreServiceException;
|
105
|
|
106
|
/**
|
107
|
* Gets the sum of records stored in all mdstore with the given format, layout , interpretation
|
108
|
*
|
109
|
* @param format
|
110
|
* format
|
111
|
* @param layout
|
112
|
* layout
|
113
|
* @param interpretation
|
114
|
* interpretation
|
115
|
* @return the total number of records in the mdstores of the given type
|
116
|
*/
|
117
|
@WebMethod(operationName = "sizeByFormat")
|
118
|
public int size(@WebParam(name = "format") final String format,
|
119
|
@WebParam(name = "layout") final String layout,
|
120
|
@WebParam(name = "interpretation") final String interpretation) throws MDStoreServiceException;
|
121
|
|
122
|
}
|