Project

General

Profile

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
// TODO: Auto-generated Javadoc
18
/**
19
 * The Interface IndexServerDAO.
20
 */
21
public interface IndexServerDAO extends IndexBackendDescriptor {
22

    
23
	/**
24
	 * Creates the index collection.
25
	 * 
26
	 * @param mdref
27
	 *            the mdref
28
	 * @param fields
29
	 *            the fields
30
	 * @return the index collection
31
	 * @throws IndexServiceException
32
	 *             the index service exception
33
	 */
34
	public void createIndexCollection(final MetadataReference mdref, final String fields) throws IndexServiceException;
35

    
36
	/**
37
	 * Update index collection.
38
	 * 
39
	 * @param mdRef
40
	 *            the md ref
41
	 * @param fields
42
	 *            the fields
43
	 * @throws IndexServiceException
44
	 *             the index service exception
45
	 */
46
	public void updateIndexCollection(final MetadataReference mdRef, final Document fields) throws IndexServiceException;
47

    
48
	/**
49
	 * Gets the index collection.
50
	 * 
51
	 * @param mdRef
52
	 *            the md ref
53
	 * @return the index collection
54
	 * @throws IndexServiceException
55
	 *             the index service exception
56
	 */
57
	public IndexCollection getIndexCollection(final MetadataReference mdRef) throws IndexServiceException;
58

    
59
	/**
60
	 * Gets the schema.
61
	 * 
62
	 * @param mdRef
63
	 *            the md ref
64
	 * @return the schema
65
	 * @throws IndexServiceException
66
	 *             the index service exception
67
	 */
68
	public Map<String, ValueType> getSchema(final MetadataReference mdRef) throws IndexServiceException;;
69

    
70
	/**
71
	 * Gets the cql value transformer map.
72
	 * 
73
	 * @param mdRef
74
	 *            the md ref
75
	 * @return the cql value transformer map
76
	 * @throws IndexServiceException
77
	 *             the index service exception
78
	 */
79
	public CqlValueTransformerMap getCqlValueTransformerMap(final MetadataReference mdRef) throws IndexServiceException;
80

    
81
	/**
82
	 * Gets the document mapper factory.
83
	 * 
84
	 * @return the document mapper factory
85
	 * @throws IndexServiceException
86
	 *             the index service exception
87
	 */
88
	public DocumentMapperFactory getDocumentMapperFactory() throws IndexServiceException;
89

    
90
	/**
91
	 * Gets the index query factory.
92
	 * 
93
	 * @return the index query factory
94
	 */
95
	public IndexQueryFactory getIndexQueryFactory();
96

    
97
	/**
98
	 * Shutdown the index server.
99
	 * 
100
	 * @param mdRef
101
	 *            the md ref
102
	 * @throws IndexServiceException
103
	 *             the index service exception
104
	 */
105
	public void shutdown(final MetadataReference mdRef) throws IndexServiceException;
106

    
107
}
(6-6/9)