1
|
/*
|
2
|
*
|
3
|
*/
|
4
|
package eu.dnetlib.index;
|
5
|
|
6
|
import java.util.Map;
|
7
|
|
8
|
import eu.dnetlib.clients.index.model.Any.ValueType;
|
9
|
import eu.dnetlib.clients.index.query.IndexQueryFactory;
|
10
|
import eu.dnetlib.utils.MetadataReference;
|
11
|
import eu.dnetlib.cql.CqlValueTransformerMap;
|
12
|
import eu.dnetlib.index.feed.DocumentMapperFactory;
|
13
|
import eu.dnetlib.rmi.provision.IndexServiceException;
|
14
|
import org.dom4j.Document;
|
15
|
|
16
|
/**
|
17
|
* The Interface IndexServerDAO.
|
18
|
*/
|
19
|
public interface IndexServerDAO extends IndexBackendDescriptor {
|
20
|
|
21
|
/**
|
22
|
* Creates the index collection.
|
23
|
*
|
24
|
* @param mdref the mdref
|
25
|
* @param fields the fields
|
26
|
* @return the index collection
|
27
|
* @throws IndexServiceException the index service exception
|
28
|
*/
|
29
|
void createIndexCollection(final MetadataReference mdref, final String fields) throws IndexServiceException;
|
30
|
|
31
|
/**
|
32
|
* Update index collection.
|
33
|
*
|
34
|
* @param mdRef the md ref
|
35
|
* @param fields the fields
|
36
|
* @throws IndexServiceException the index service exception
|
37
|
*/
|
38
|
void updateIndexCollection(final MetadataReference mdRef, final Document fields) throws IndexServiceException;
|
39
|
|
40
|
/**
|
41
|
* Gets the index collection.
|
42
|
*
|
43
|
* @param mdRef the md ref
|
44
|
* @return the index collection
|
45
|
* @throws IndexServiceException the index service exception
|
46
|
*/
|
47
|
IndexCollection getIndexCollection(final MetadataReference mdRef) throws IndexServiceException;
|
48
|
|
49
|
/**
|
50
|
* Gets the schema.
|
51
|
*
|
52
|
* @param mdRef the md ref
|
53
|
* @return the schema
|
54
|
* @throws IndexServiceException the index service exception
|
55
|
*/
|
56
|
Map<String, ValueType> getSchema(final MetadataReference mdRef) throws IndexServiceException;
|
57
|
|
58
|
/**
|
59
|
* Gets the cql value transformer map.
|
60
|
*
|
61
|
* @param mdRef the md ref
|
62
|
* @return the cql value transformer map
|
63
|
* @throws IndexServiceException the index service exception
|
64
|
*/
|
65
|
CqlValueTransformerMap getCqlValueTransformerMap(final MetadataReference mdRef) throws IndexServiceException;
|
66
|
|
67
|
/**
|
68
|
* Gets the document mapper factory.
|
69
|
*
|
70
|
* @return the document mapper factory
|
71
|
* @throws IndexServiceException the index service exception
|
72
|
*/
|
73
|
DocumentMapperFactory getDocumentMapperFactory() throws IndexServiceException;
|
74
|
|
75
|
/**
|
76
|
* Gets the index query factory.
|
77
|
*
|
78
|
* @return the index query factory
|
79
|
*/
|
80
|
IndexQueryFactory getIndexQueryFactory();
|
81
|
|
82
|
/**
|
83
|
* Shutdown the index server.
|
84
|
*
|
85
|
* @param mdRef the md ref
|
86
|
* @throws IndexServiceException the index service exception
|
87
|
*/
|
88
|
void shutdown(final MetadataReference mdRef) throws IndexServiceException;
|
89
|
|
90
|
}
|