1
|
package eu.dnetlib.msro.openaireplus.workflows.nodes;
|
2
|
|
3
|
import java.util.List;
|
4
|
import java.util.Map;
|
5
|
|
6
|
import com.google.gson.Gson;
|
7
|
import com.googlecode.sarasvati.Arc;
|
8
|
import com.googlecode.sarasvati.NodeToken;
|
9
|
import org.springframework.beans.factory.annotation.Required;
|
10
|
|
11
|
@Deprecated
|
12
|
public class PrepareIISMainParamsJobNode extends PrepareIISParams {
|
13
|
|
14
|
private String xqueryObjectStores;
|
15
|
|
16
|
private String objectStoreParam = "import_content_objectstores_csv";
|
17
|
|
18
|
// Enable/Disable inference modules
|
19
|
|
20
|
@Override
|
21
|
protected String execute(final NodeToken token) throws Exception {
|
22
|
|
23
|
super.prepare(token);
|
24
|
|
25
|
token.getEnv().setAttribute(getObjectStoreParam(), getFilteredObjectStoreCSV(getXqueryObjectStores()));
|
26
|
|
27
|
@SuppressWarnings("unchecked") final List<Map<String, String>> sets = new Gson().fromJson(token.getEnv().getAttribute("sets"), List.class);
|
28
|
for (Map<String, String> set : sets) {
|
29
|
token.getEnv().setAttribute(set.get("enablingProperty"), set.get("enabled"));
|
30
|
}
|
31
|
|
32
|
return Arc.DEFAULT_ARC;
|
33
|
}
|
34
|
|
35
|
public String getXqueryObjectStores() {
|
36
|
return xqueryObjectStores;
|
37
|
}
|
38
|
|
39
|
@Required
|
40
|
public void setXqueryObjectStores(final String xqueryObjectStores) {
|
41
|
this.xqueryObjectStores = xqueryObjectStores;
|
42
|
}
|
43
|
|
44
|
public String getObjectStoreParam() {
|
45
|
return objectStoreParam;
|
46
|
}
|
47
|
|
48
|
public void setObjectStoreParam(final String objectStoreParam) {
|
49
|
this.objectStoreParam = objectStoreParam;
|
50
|
}
|
51
|
|
52
|
}
|