1
|
package eu.dnetlib.data.objectstore.rmi;
|
2
|
|
3
|
import java.util.List;
|
4
|
|
5
|
import javax.jws.WebMethod;
|
6
|
import javax.jws.WebParam;
|
7
|
import javax.jws.WebService;
|
8
|
import javax.xml.ws.wsaddressing.W3CEndpointReference;
|
9
|
|
10
|
import eu.dnetlib.common.rmi.BaseService;
|
11
|
|
12
|
/**
|
13
|
* Main ObjectStore Service interface.
|
14
|
*
|
15
|
* @author <a href="mailto:sandro.labruzzo at isti.cnr.it">Sandro La Bruzzo</a>
|
16
|
* @version 0.0.1
|
17
|
*/
|
18
|
@WebService(targetNamespace = "http://services.dnetlib.eu/")
|
19
|
public interface ObjectStoreService extends BaseService {
|
20
|
|
21
|
/**
|
22
|
* Returns ResultSet EPR for delivered ObjectStore records in a particular range date.
|
23
|
* <p>
|
24
|
* Please check service implementations for details on the expected format of the records in the result set epr.
|
25
|
* </p>
|
26
|
* <p>
|
27
|
* This method could be used for a bulk deliver of all objects in the store
|
28
|
* </p>
|
29
|
*
|
30
|
* @param obsId
|
31
|
* identifier of the ObjectStore
|
32
|
* @param from
|
33
|
* the minimum date of the object
|
34
|
* @param until
|
35
|
* the maximum date of the object
|
36
|
* @return a ResultSet EPR. Each element of the result set contains the objIdentifier of a record and its URL for retrieve the
|
37
|
* inputstream of the file.
|
38
|
* @throws ObjectStoreServiceException
|
39
|
* the object store service exception
|
40
|
*/
|
41
|
@WebMethod(operationName = "deliverObjects", action = "deliverObjects")
|
42
|
public W3CEndpointReference deliverObjects(@WebParam(name = "obsId") String obsId, @WebParam(name = "from") Long from, @WebParam(name = "until") Long until)
|
43
|
throws ObjectStoreServiceException;
|
44
|
|
45
|
/**
|
46
|
* Returns ResultSet EPR for delivered ObjectStore records.
|
47
|
* <p>
|
48
|
* Please check service implementations for details on the expected format of the records in the result set epr.
|
49
|
* </p>
|
50
|
*
|
51
|
* @param obsId
|
52
|
* identifier of the ObjectStore
|
53
|
* @param eprId
|
54
|
* id of a ResultSet EPR with the identifiers of the interesting objects. Each element of the result set contains the
|
55
|
* objIdentifier of a record
|
56
|
* @return a ResultSet EPR. Each element of the result set contains the objIdentifier of a record and its URL for retrieve the
|
57
|
* inputstream of the file.
|
58
|
* @throws ObjectStoreServiceException
|
59
|
* the object store service exception
|
60
|
*/
|
61
|
@WebMethod(operationName = "deliverObjectsByIds", action = "deliverObjectsByIds")
|
62
|
public W3CEndpointReference deliverObjectsByIds(@WebParam(name = "obsId") String obsId, @WebParam(name = "eprId") W3CEndpointReference eprId)
|
63
|
throws ObjectStoreServiceException;
|
64
|
|
65
|
/**
|
66
|
* Returns an URL to retrieve the ObjectStore record.
|
67
|
*
|
68
|
* @param obsId
|
69
|
* identifier of the ObjectStore
|
70
|
* @param objectId
|
71
|
* the id of the object
|
72
|
* @return the URL for retrieve the record
|
73
|
* @throws ObjectStoreServiceException
|
74
|
* the object store service exception
|
75
|
*/
|
76
|
@WebMethod(operationName = "deliverObject", action = "deliverObject")
|
77
|
public String deliverRecord(@WebParam(name = "obsId") String obsId, @WebParam(name = "objectId") String objectId) throws ObjectStoreServiceException;
|
78
|
|
79
|
/**
|
80
|
* Feed the object in the objectStore
|
81
|
*
|
82
|
* @param obsId
|
83
|
* identifier of the ObjectStore
|
84
|
* @param objectMetadata
|
85
|
* the String serialized of the JSON object ObjectStoreFile
|
86
|
* @throws ObjectStoreServiceException
|
87
|
*/
|
88
|
|
89
|
@WebMethod(operationName = "feedObject", action = "feedObject")
|
90
|
public void feedObject(@WebParam(name = "obsId") String obsId, @WebParam(name = "objectMetadata") String objectMetadata) throws ObjectStoreServiceException;
|
91
|
|
92
|
/**
|
93
|
* Returns list of all stored indices.
|
94
|
*
|
95
|
* @return list of all stored indices
|
96
|
*/
|
97
|
@WebMethod(operationName = "getListOfObjectStores", action = "getListOfObjectStores")
|
98
|
public List<String> getListOfObjectStores();
|
99
|
|
100
|
/**
|
101
|
* Gets the size of the objectStore ID.
|
102
|
*
|
103
|
* @param obsId
|
104
|
* the obs id
|
105
|
* @return the size
|
106
|
*/
|
107
|
@WebMethod(operationName = "getSize", action = "getSize")
|
108
|
public int getSize(@WebParam(name = "obsId") String obsId) throws ObjectStoreServiceException;
|
109
|
}
|