Revision 48139
Added by Alessia Bardi almost 7 years ago
ProcessContextsJobNode.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.msro.openaireplus.workflows.nodes.contexts; |
2 | 2 |
|
3 |
import java.io.StringReader; |
|
4 |
|
|
5 | 3 |
import javax.annotation.Resource; |
6 | 4 |
|
7 |
import eu.dnetlib.enabling.resultset.client.IterableResultSetClient; |
|
8 |
import org.apache.commons.lang.StringUtils; |
|
9 |
import org.apache.commons.logging.Log; |
|
10 |
import org.apache.commons.logging.LogFactory; |
|
11 |
import org.dom4j.Document; |
|
12 |
import org.dom4j.DocumentException; |
|
13 |
import org.dom4j.Element; |
|
14 |
import org.dom4j.Node; |
|
15 |
import org.dom4j.io.SAXReader; |
|
16 |
|
|
17 | 5 |
import com.googlecode.sarasvati.Arc; |
18 | 6 |
import com.googlecode.sarasvati.NodeToken; |
19 |
|
|
20 | 7 |
import eu.dnetlib.enabling.resultset.client.ResultSetClientFactory; |
21 | 8 |
import eu.dnetlib.msro.workflows.nodes.ProgressJobNode; |
22 | 9 |
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode; |
23 | 10 |
import eu.dnetlib.msro.workflows.resultset.ProcessCountingResultSetFactory; |
24 | 11 |
import eu.dnetlib.msro.workflows.util.ProgressProvider; |
25 | 12 |
import eu.dnetlib.msro.workflows.util.ResultsetProgressProvider; |
13 |
import org.apache.commons.logging.Log; |
|
14 |
import org.apache.commons.logging.LogFactory; |
|
26 | 15 |
|
27 | 16 |
public class ProcessContextsJobNode extends SimpleJobNode implements ProgressJobNode { |
28 | 17 |
|
... | ... | |
35 | 24 |
private String contextLabel; |
36 | 25 |
private String contextType; |
37 | 26 |
|
27 |
private String contextParams; |
|
28 |
|
|
38 | 29 |
@Resource |
39 | 30 |
private ResultSetClientFactory resultSetClientFactory; |
40 | 31 |
|
... | ... | |
50 | 41 |
|
51 | 42 |
final Iterable<String> iter = resultSetClientFactory.getClient(progressProvider.getEpr()); |
52 | 43 |
|
53 |
final ContextDesc context = ContextUtils.getContext(iter, getContextId(), getContextLabel(), getContextType()); |
|
44 |
final ContextDesc context = ContextUtils.getContext(iter, getContextId(), getContextLabel(), getContextType(), getContextParams());
|
|
54 | 45 |
|
55 | 46 |
token.getEnv().setTransientAttribute(contextObj, context); |
56 | 47 |
|
... | ... | |
101 | 92 |
public void setContextType(final String contextType) { |
102 | 93 |
this.contextType = contextType; |
103 | 94 |
} |
95 |
|
|
96 |
public String getContextParams() { |
|
97 |
return contextParams; |
|
98 |
} |
|
99 |
|
|
100 |
public void setContextParams(final String contextParams) { |
|
101 |
this.contextParams = contextParams; |
|
102 |
} |
|
104 | 103 |
} |
Also available in: Unified diff
integrated (hopefully) all required changes from dnet40