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