1
|
package eu.dnetlib.msro.oai.workflows.nodes;
|
2
|
|
3
|
import com.googlecode.sarasvati.NodeToken;
|
4
|
import eu.dnetlib.data.information.oai.utils.OAIParameterNames;
|
5
|
import eu.dnetlib.enabling.tools.blackboard.BlackboardJob;
|
6
|
|
7
|
/**
|
8
|
* Create indexes on the oaistore on the fields specified in the parameter.
|
9
|
*/
|
10
|
public class OAICreateIndexJobNode extends AbstractOAIJobNode {
|
11
|
|
12
|
/**
|
13
|
* Name of the fields (comma separated) to be included in the same index. For several indexes separate the fieldNames with ;
|
14
|
* <p>
|
15
|
* Examples: field1,field2 -- one compound index on the given two fields field1,field2;field3,field4 -- two compound indices: one on
|
16
|
* field1 and field2, the other on field3 and field4
|
17
|
* </p>
|
18
|
* **/
|
19
|
private String fieldNames;
|
20
|
|
21
|
@Override
|
22
|
public void completePrepareJob(final BlackboardJob job, final NodeToken token) {
|
23
|
job.setAction("CREATE_OAI_INDEX");
|
24
|
job.getParameters().put(OAIParameterNames.OAI_INDEXES, getFieldNames());
|
25
|
}
|
26
|
|
27
|
public String getFieldNames() {
|
28
|
return fieldNames;
|
29
|
}
|
30
|
|
31
|
public void setFieldNames(final String fieldNames) {
|
32
|
this.fieldNames = fieldNames;
|
33
|
}
|
34
|
}
|