1
|
package gr.uoa.di.driver.enabling;
|
2
|
|
3
|
import java.util.List;
|
4
|
|
5
|
import eu.dnetlib.domain.DriverResource;
|
6
|
import eu.dnetlib.domain.EPR;
|
7
|
import eu.dnetlib.domain.SearchCriteria;
|
8
|
|
9
|
/**
|
10
|
* A client of the ISLookUp service.
|
11
|
*
|
12
|
* @author <a href='mailto:antleb@di.uoa.gr'>Antonis Lempesis</a>
|
13
|
*
|
14
|
* @param <D>
|
15
|
* The type of the resource profiles that this client works with.
|
16
|
*/
|
17
|
public interface ISLookUp<D extends DriverResource> {
|
18
|
/**
|
19
|
* Returns the resource profile with the given search id.
|
20
|
*
|
21
|
* @param id the id
|
22
|
* @return the resource profile.
|
23
|
* @throws ISLookUpException
|
24
|
*/
|
25
|
D getById(String id) throws ISLookUpException;
|
26
|
|
27
|
/**
|
28
|
* Returns the resource profiles with the given ids.
|
29
|
*
|
30
|
* @param id the list of ids.
|
31
|
* @return the resource profiles.
|
32
|
* @throws ISLookUpException
|
33
|
*/
|
34
|
List<D> getByid(String id[]) throws ISLookUpException;
|
35
|
|
36
|
/**
|
37
|
* Performs a search by criteria.
|
38
|
*
|
39
|
* @param criteria the search criteria.
|
40
|
* @return a list with the results of the query.
|
41
|
* @throws ISLookUpException
|
42
|
*/
|
43
|
List<D> fetch(SearchCriteria criteria) throws ISLookUpException;
|
44
|
|
45
|
/**
|
46
|
* Performs a direct XQuery search and returns a list of xml profiles that
|
47
|
* match the criteria, without any processing.
|
48
|
*
|
49
|
* @param XQuery the xquery.
|
50
|
* @return a list of xml profiles.
|
51
|
* @throws ISLookUpException
|
52
|
*/
|
53
|
List<String> fetch(String XQuery) throws ISLookUpException;
|
54
|
|
55
|
/**
|
56
|
* Uses the appropriate method in ISLookUp and performs a query without
|
57
|
* using a result set. This method should be used only when a small number
|
58
|
* of results is expected. If there is a large number of results, there is a
|
59
|
* risk of a SOAP error (the respone will be too large, over the SOAP
|
60
|
* limit).
|
61
|
*
|
62
|
* @param criteria the search criteria.
|
63
|
* @return a list of results.
|
64
|
* @throws ISLookUpException
|
65
|
*/
|
66
|
List<D> performQuickSearch(SearchCriteria criteria)
|
67
|
throws ISLookUpException;
|
68
|
|
69
|
/**
|
70
|
* Performs a quick search and returns the unique result.
|
71
|
*
|
72
|
* @param criteria the search criteria.
|
73
|
* @return the unique search result
|
74
|
* @throws ISLookUpException if there is more than one result.
|
75
|
*/
|
76
|
D getUniqueResult(SearchCriteria criteria) throws ISLookUpException;
|
77
|
}
|