Project

General

Profile

1
package eu.dnetlib.msro.worker.nodes.sel;
2

    
3
import com.googlecode.sarasvati.Arc;
4
import com.googlecode.sarasvati.NodeToken;
5

    
6
import eu.dnetlib.msro.worker.nodes.SimpleJobNode;
7

    
8
/**
9
 * The Class SelectiveNode allows to decide which path a workflow must take.
10
 */
11
public class SelectiveNode extends SimpleJobNode {
12

    
13
	/** The selection. */
14
	private String selection = Arc.DEFAULT_ARC;
15

    
16
	/*
17
	 * (non-Javadoc)
18
	 * 
19
	 * @see eu.dnetlib.msro.worker.nodes.SimpleJobNode#execute(com.googlecode.sarasvati.NodeToken)
20
	 */
21
	@Override
22
	protected String execute(final NodeToken token) throws Exception {
23
		return selection;
24
	}
25

    
26
	/**
27
	 * Gets the selection.
28
	 *
29
	 * @return the selection
30
	 */
31
	public String getSelection() {
32
		return selection;
33
	}
34

    
35
	/**
36
	 * Sets the selection.
37
	 *
38
	 * @param selection
39
	 *            the new selection
40
	 */
41
	public void setSelection(final String selection) {
42
		this.selection = selection;
43
	}
44

    
45
}
    (1-1/1)