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
/**
12
 * Main ObjectStore Service interface.
13
 *
14
 * @author <a href="mailto:sandro.labruzzo at isti.cnr.it">Sandro La Bruzzo</a>
15
 * @version 0.0.1
16
 */
17
@WebService(targetNamespace = "http://services.dnetlib.eu/")
18
public interface ObjectStoreService extends BaseService {
19

    
20
	/**
21
	 * Returns ResultSet EPR for delivered ObjectStore records in a particular range date.
22
	 * <p>
23
	 * Please check service implementations for details on the expected format of the records in the result set epr.
24
	 * </p>
25
	 * <p>
26
	 * This method could be used for a bulk deliver of all objects in the store
27
	 * </p>
28
	 *
29
	 * @param obsId identifier of the ObjectStore
30
	 * @param from  the minimum date of the object
31
	 * @param until the maximum date of the object
32
	 * @return a ResultSet EPR. Each element of the result set contains the objIdentifier of a record and its URL for retrieve the
33
	 * inputstream of the file.
34
	 * @throws ObjectStoreServiceException the object store service exception
35
	 */
36
	@WebMethod(operationName = "deliverObjects", action = "deliverObjects")
37
	ResultSet<ObjectStoreFile> deliverObjects(@WebParam(name = "obsId") String obsId, @WebParam(name = "from") Long from, @WebParam(name = "until") Long until)
38
			throws ObjectStoreServiceException;
39

    
40
	/**
41
	 * Returns ResultSet EPR for delivered ObjectStore records.
42
	 * <p>
43
	 * Please check service implementations for details on the expected format of the records in the result set epr.
44
	 * </p>
45
	 *
46
	 * @param obsId identifier of the ObjectStore
47
	 * @param eprId id of a ResultSet EPR with the identifiers of the interesting objects. Each element of the result set contains the
48
	 *              objIdentifier of a record
49
	 * @return a ResultSet.  Each element of the result set contains the objIdentifier of a record and its URL for retrieve the
50
	 * inputstream of the file.
51
	 * @throws ObjectStoreServiceException the object store service exception
52
	 */
53
	@WebMethod(operationName = "deliverObjectsByIds", action = "deliverObjectsByIds")
54
	ResultSet<ObjectStoreFile> deliverObjectsByIds(@WebParam(name = "obsId") String obsId, @WebParam(name = "eprId") ResultSet<String> eprId)
55
			throws ObjectStoreServiceException;
56

    
57
	/**
58
	 * Returns an URL to retrieve the ObjectStore record.
59
	 *
60
	 * @param obsId    identifier of the ObjectStore
61
	 * @param objectId the id of the object
62
	 * @return the URL for retrieve the record
63
	 * @throws ObjectStoreServiceException the object store service exception
64
	 */
65
	@WebMethod(operationName = "deliverObject", action = "deliverObject")
66
	ObjectStoreFile deliverRecord(@WebParam(name = "obsId") String obsId, @WebParam(name = "objectId") String objectId) throws ObjectStoreServiceException;
67

    
68
	/**
69
	 * Feed the object in the objectStore
70
	 *
71
	 * @param obsId          identifier of the ObjectStore
72
	 * @param objectMetadata the String serialized of the JSON object ObjectStoreFile
73
	 * @throws ObjectStoreServiceException
74
	 */
75

    
76
	@WebMethod(operationName = "feedObject", action = "feedObject")
77
	void feedObject(@WebParam(name = "obsId") String obsId, @WebParam(name = "objectMetadata") String objectMetadata) throws ObjectStoreServiceException;
78

    
79
	/**
80
	 * Returns list of all stored indices.
81
	 *
82
	 * @return list of all stored indices
83
	 */
84
	@WebMethod(operationName = "getListOfObjectStores", action = "getListOfObjectStores")
85
	List<String> getListOfObjectStores();
86

    
87
	/**
88
	 * Gets the size of the objectStore ID.
89
	 *
90
	 * @param obsId the obs id
91
	 * @return the size
92
	 */
93
	@WebMethod(operationName = "getSize", action = "getSize")
94
	int getSize(@WebParam(name = "obsId") String obsId) throws ObjectStoreServiceException;
95

    
96
	/**
97
	 * Gets the list of the available download plugin names.
98
	 *
99
	 * @return the list
100
	 */
101
	@WebMethod(operationName = "listDownloadPlugins", action = "listDownloadPlugins")
102
	List<String> listDownloadPlugins() throws ObjectStoreServiceException;
103
}
(26-26/35)