Project

General

Profile

1
package eu.dnetlib.msro.workflows.nodes.functions;
2

    
3
import java.util.HashMap;
4
import java.util.Map;
5
import java.util.function.Function;
6

    
7
import org.springframework.context.annotation.Scope;
8
import org.springframework.core.io.ClassPathResource;
9
import org.springframework.stereotype.Component;
10

    
11
import eu.dnetlib.miscutils.functional.xml.ApplyXslt;
12
import eu.dnetlib.msro.annotations.ProcessNode;
13
import eu.dnetlib.msro.exceptions.MSROException;
14

    
15
@Component
16
@Scope("prototype")
17
@ProcessNode("ApplyXslt")
18
public class ApplyXsltJobNode extends AbstractApplyFunctionJobNode<String, String> {
19

    
20
	private String xsltClasspath;
21
	private Map<String, String> xsltParams = new HashMap<>();
22

    
23
	@Override
24
	protected Function<String, String> getFunction() throws MSROException {
25
		return new ApplyXslt(new ClassPathResource(xsltClasspath), xsltParams);
26
	}
27

    
28
	public String getXsltClasspath() {
29
		return xsltClasspath;
30
	}
31

    
32
	public void setXsltClasspath(final String xsltClasspath) {
33
		this.xsltClasspath = xsltClasspath;
34
	}
35

    
36
	public Map<String, String> getXsltParams() {
37
		return xsltParams;
38
	}
39

    
40
	public void setXsltParams(final Map<String, String> xsltParams) {
41
		this.xsltParams = xsltParams;
42
	}
43

    
44
}
(2-2/5)