Project

General

Profile

1
package eu.dnetlib.enabling.datasources.common;
2

    
3
/**
4
 * Created by claudio on 12/09/16.
5
 */
6
public enum AggregationStage {
7
	COLLECT, TRANSFORM;
8

    
9
	public static AggregationStage parse(final String s) {
10
		switch (s) {
11
		case "collect":
12
		case "collection":
13
		case "COLLECT":
14
		case "COLLECTION":
15
			return AggregationStage.COLLECT;
16
		case "transform":
17
		case "transformation":
18
		case "TRANSFORM":
19
		case "TRANSFORMATION":
20
			return AggregationStage.TRANSFORM;
21

    
22
		}
23
		throw new IllegalArgumentException("invalid AggregationStage: " + s);
24
	}
25
}
(2-2/18)