Project

General

Profile

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