Revision 50639
Added by Michele Artini over 6 years ago
modules/dnet-isti/trunk/src/main/java/eu/dnetlib/data/mdstore/plugins/EnrichLabsPlugin.java | ||
---|---|---|
82 | 82 |
if (groups != null) { |
83 | 83 |
node.selectSingleNode("./*[local-name() = 'personName']").setText(p.getName()); |
84 | 84 |
for (final Group g : groups) { |
85 |
final Element affNode = node.addElement(new QName("affiliation", node.getNamespace())); |
|
86 |
affNode.setText("ISTI-CNR"); |
|
87 |
affNode.addAttribute("code", code); |
|
88 |
affNode.addAttribute("groupAcronym", g.getId()); |
|
89 |
affNode.addAttribute("group", g.getName()); |
|
90 |
affNode.addAttribute("type", g.getType()); |
|
85 |
if (!g.getId().equals(UNKNOWN_GROUP.getId())) { |
|
86 |
final Element affNode = node.addElement(new QName("affiliation", node.getNamespace())); |
|
87 |
affNode.addAttribute("code", code); |
|
88 |
affNode.addAttribute("groupAcronym", g.getId()); |
|
89 |
affNode.addAttribute("group", g.getName()); |
|
90 |
affNode.addAttribute("type", g.getType()); |
|
91 |
} |
|
91 | 92 |
} |
92 | 93 |
} else { |
93 | 94 |
log.info("Affiliation not found, infoId: " + infoId + ", year: " + year); |
... | ... | |
97 | 98 |
} else { |
98 | 99 |
log.info("Person not found, infoId: " + infoId + ", year: " + year); |
99 | 100 |
dao.registerPerson(code, fullname); |
100 |
affiliations.put(code, new Person(code, fullname)); |
|
101 |
dao.registerAffiliation(code, UNKNOWN_GROUP.getId(), year); |
|
102 |
|
|
103 |
final Person np = new Person(code, fullname); |
|
104 |
np.getAffiliations().put(year, Sets.newHashSet(UNKNOWN_GROUP)); |
|
105 |
|
|
106 |
affiliations.put(code, np); |
|
101 | 107 |
} |
102 | 108 |
} else { |
103 | 109 |
log.warn("Invalid infoId: " + infoId); |
Also available in: Unified diff