1
|
package eu.dnetlib.msro.workflows.nodes;
|
2
|
|
3
|
import eu.dnetlib.data.transform.Ontologies;
|
4
|
import eu.dnetlib.data.transform.OntologyLoader;
|
5
|
import eu.dnetlib.msro.workflows.graph.Arc;
|
6
|
import eu.dnetlib.msro.workflows.procs.Env;
|
7
|
|
8
|
/**
|
9
|
* Created by claudio on 31/01/2017.
|
10
|
*/
|
11
|
public class FetchOntologiesJobNode extends AsyncJobNode {
|
12
|
|
13
|
private String ontologiesParamName;
|
14
|
|
15
|
@Override
|
16
|
protected String execute(final Env env) throws Exception {
|
17
|
|
18
|
final Ontologies o = OntologyLoader.loadOntologiesFromIS();
|
19
|
|
20
|
env.setAttribute(getOntologiesParamName(), o.toJson());
|
21
|
|
22
|
return Arc.DEFAULT_ARC;
|
23
|
}
|
24
|
|
25
|
public String getOntologiesParamName() {
|
26
|
return ontologiesParamName;
|
27
|
}
|
28
|
|
29
|
public void setOntologiesParamName(final String ontologiesParamName) {
|
30
|
this.ontologiesParamName = ontologiesParamName;
|
31
|
}
|
32
|
}
|