Project

General

Profile

« Previous | Next » 

Revision 49246

fix bug for fet-h2020 context

View differences:

modules/dnet-openaireplus-workflows/trunk/src/main/java/eu/dnetlib/msro/openaireplus/workflows/nodes/contexts/BuildH2020FETTaxonomy.java
15 15
import org.dom4j.Element;
16 16
import org.joda.time.DateTime;
17 17

  
18
import static eu.dnetlib.data.transform.xml.AbstractDNetXsltFunctions.md5;
19

  
18 20
public class BuildH2020FETTaxonomy {
19 21

  
20 22
	private static final Log log = LogFactory.getLog(BuildH2020FETTaxonomy.class);
......
61 63
			cat.addAttribute("id", catid);
62 64
			cat.addAttribute("label", "FET " + type);
63 65
			cat.addAttribute("claim", "false");
64
			int count = 0;
66
			//int count = 0;
65 67
			for (Map.Entry<String, Map<String, List<Info>>> entryst : dic.get(type).entrySet()) {
66 68
				String subtype = entryst.getKey();
67 69
				for (Map.Entry<String, List<Info>> entryp : dic.get(type).get(subtype).entrySet()) {
68 70
					String opt = entryp.getKey();
69
					count++;
71
			//		count++;
70 72
					Element subcat = cat.addElement("concept");
71
					String subcatid = catid + "::" + count;
73
					String proj_md5 = md5(opt).substring(0,12);
74
					//String subcatid = catid + "::" + count;
75
					String subcatid = catid + "::" + proj_md5;
72 76
					subcat.addAttribute("id", subcatid);
73 77
					Element pa = subcat.addElement("param");
74 78
					pa.addAttribute("name", "CALL_ID");

Also available in: Unified diff