Revision 27568
Added by Claudio Atzori about 10 years ago
PrepareIISPreprocessingParamsJobNode.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.msro.openaireplus.workflows.nodes; |
2 | 2 |
|
3 |
import java.util.List; |
|
4 |
|
|
5 | 3 |
import org.springframework.beans.factory.annotation.Required; |
6 | 4 |
|
7 |
import com.google.common.collect.Iterables; |
|
8 | 5 |
import com.googlecode.sarasvati.Arc; |
9 | 6 |
import com.googlecode.sarasvati.NodeToken; |
10 | 7 |
|
11 | 8 |
public class PrepareIISPreprocessingParamsJobNode extends PrepareIISParams { |
12 | 9 |
|
13 |
private String xqueryWosStore; |
|
10 |
private String xqueryWosMDStore;
|
|
14 | 11 |
|
15 |
private String wosStoreParam = "import_wos_mdstore_id";
|
|
12 |
private String mdStoreWosParam = "import_wos_mdstore_id";
|
|
16 | 13 |
|
14 |
private String xqueryDatabaseService; |
|
15 |
|
|
16 |
private String databaseServiceLocationParam = "import_database_service_location"; |
|
17 |
|
|
18 |
private String xqueryDataciteObjectStore; |
|
19 |
|
|
20 |
private String dataciteObjectStoreParam = "import_content_datacite_objectstores_csv"; |
|
21 |
|
|
22 |
private String xqueryWosObjectStore; |
|
23 |
|
|
24 |
private String wosObjectStorePlaintextParam = "import_content_wos_plaintext_objectstores_csv"; |
|
25 |
|
|
17 | 26 |
@Override |
18 | 27 |
protected String execute(NodeToken token) throws Exception { |
19 | 28 |
super.prepare(token); |
20 | 29 |
|
21 |
List<String> quickSearchProfile = lookupLocator.getService().quickSearchProfile(getXqueryWosStore()); |
|
22 |
final String wosStore = Iterables.getOnlyElement(quickSearchProfile); |
|
23 |
token.getEnv().setAttribute(getWosStoreParam(), wosStore); |
|
30 |
token.getEnv().setAttribute(getMdStoreWosParam(), getProfileId(getXqueryWosMDStore())); |
|
31 |
token.getEnv().setAttribute(getDatabaseServiceLocationParam(), getServiceEndpoint(getXqueryDatabaseService())); |
|
24 | 32 |
|
33 |
token.getEnv().setAttribute(getDataciteObjectStoreParam(), getProfileIdsCSV(getXqueryDataciteObjectStore())); |
|
34 |
token.getEnv().setAttribute(getWosObjectStorePlaintextParam(), getProfileId(getXqueryWosObjectStore())); |
|
35 |
|
|
25 | 36 |
return Arc.DEFAULT_ARC; |
26 | 37 |
} |
27 | 38 |
|
28 |
public String getXqueryWosStore() { |
|
29 |
return xqueryWosStore; |
|
39 |
public String getXqueryWosMDStore() {
|
|
40 |
return xqueryWosMDStore;
|
|
30 | 41 |
} |
31 | 42 |
|
32 | 43 |
@Required |
33 |
public void setXqueryWosStore(String xqueryWosStore) {
|
|
34 |
this.xqueryWosStore = xqueryWosStore;
|
|
44 |
public void setXqueryWosMDStore(String xqueryWosMDStore) {
|
|
45 |
this.xqueryWosMDStore = xqueryWosMDStore;
|
|
35 | 46 |
} |
36 | 47 |
|
37 |
public String getWosStoreParam() {
|
|
38 |
return wosStoreParam;
|
|
48 |
public String getMdStoreWosParam() {
|
|
49 |
return mdStoreWosParam;
|
|
39 | 50 |
} |
40 | 51 |
|
41 |
public void setWosStoreParam(String wosStoreParam) {
|
|
42 |
this.wosStoreParam = wosStoreParam;
|
|
52 |
public void setMdStoreWosParam(String mdStoreWosParam) {
|
|
53 |
this.mdStoreWosParam = mdStoreWosParam;
|
|
43 | 54 |
} |
44 | 55 |
|
56 |
public String getXqueryDatabaseService() { |
|
57 |
return xqueryDatabaseService; |
|
58 |
} |
|
59 |
|
|
60 |
@Required |
|
61 |
public void setXqueryDatabaseService(String xqueryDatabaseService) { |
|
62 |
this.xqueryDatabaseService = xqueryDatabaseService; |
|
63 |
} |
|
64 |
|
|
65 |
public String getDatabaseServiceLocationParam() { |
|
66 |
return databaseServiceLocationParam; |
|
67 |
} |
|
68 |
|
|
69 |
public void setDatabaseServiceLocationParam(String databaseServiceLocationParam) { |
|
70 |
this.databaseServiceLocationParam = databaseServiceLocationParam; |
|
71 |
} |
|
72 |
|
|
73 |
public String getWosObjectStorePlaintextParam() { |
|
74 |
return wosObjectStorePlaintextParam; |
|
75 |
} |
|
76 |
|
|
77 |
public void setWosObjectStorePlaintextParam(String wosObjectStorePlaintextParam) { |
|
78 |
this.wosObjectStorePlaintextParam = wosObjectStorePlaintextParam; |
|
79 |
} |
|
80 |
|
|
81 |
public String getXqueryWosObjectStore() { |
|
82 |
return xqueryWosObjectStore; |
|
83 |
} |
|
84 |
|
|
85 |
@Required |
|
86 |
public void setXqueryWosObjectStore(String xqueryWosObjectStore) { |
|
87 |
this.xqueryWosObjectStore = xqueryWosObjectStore; |
|
88 |
} |
|
89 |
|
|
90 |
public String getXqueryDataciteObjectStore() { |
|
91 |
return xqueryDataciteObjectStore; |
|
92 |
} |
|
93 |
|
|
94 |
@Required |
|
95 |
public void setXqueryDataciteObjectStore(String xqueryDataciteObjectStore) { |
|
96 |
this.xqueryDataciteObjectStore = xqueryDataciteObjectStore; |
|
97 |
} |
|
98 |
|
|
99 |
public String getDataciteObjectStoreParam() { |
|
100 |
return dataciteObjectStoreParam; |
|
101 |
} |
|
102 |
|
|
103 |
public void setDataciteObjectStoreParam(String dataciteObjectStoreParam) { |
|
104 |
this.dataciteObjectStoreParam = dataciteObjectStoreParam; |
|
105 |
} |
|
106 |
|
|
45 | 107 |
} |
Also available in: Unified diff
updated IIS job interfaces