Revision 38558
Added by Michele Artini about 9 years ago
modules/dnet-openaireplus-workflows/trunk/src/main/java/eu/dnetlib/msro/openaireplus/workflows/nodes/contexts/ProcessContextsJobNode.java | ||
---|---|---|
59 | 59 |
if (!context.getDbEntries().containsKey(openaireId)) { |
60 | 60 |
log.info("Found funding: " + openaireId); |
61 | 61 |
context.getDbEntries().put(openaireId, treeNode.asXML()); |
62 |
|
|
63 |
final ContextPart part = calculatePart(treeNode.selectSingleNode(".//funding_level_0")); |
|
64 |
if (context.getCategories().containsKey(part.getId())) { |
|
65 |
for (ContextPart p : part.getParts().values()) { |
|
66 |
context.getCategories().get(part.getId()).addPart(p);; |
|
62 |
final Node node0 = treeNode.selectSingleNode(".//funding_level_0"); |
|
63 |
if (node0 != null) { |
|
64 |
final ContextPart part = calculatePart(node0); |
|
65 |
if (context.getCategories().containsKey(part.getId())) { |
|
66 |
for (ContextPart p : part.getParts().values()) { |
|
67 |
context.getCategories().get(part.getId()).addPart(p);; |
|
68 |
} |
|
69 |
} else { |
|
70 |
context.getCategories().put(part.getId(), part); |
|
67 | 71 |
} |
68 |
} else { |
|
69 |
context.getCategories().put(part.getId(), part); |
|
70 | 72 |
} |
71 | 73 |
} |
72 | 74 |
} |
... | ... | |
91 | 93 |
|
92 | 94 |
final Element parent = node.getParent() != null ? node.getParent().getParent() : null; |
93 | 95 |
|
94 |
if ((parent != null) && parent.getName().startsWith("funding_level_")) {
|
|
96 |
if (parent != null && parent.getName().startsWith("funding_level_")) {
|
|
95 | 97 |
final ContextPart p = calculatePart(parent); |
96 | 98 |
part.getParts().put(p.getId(), p); |
97 | 99 |
} |
Also available in: Unified diff
fixed a nullPointer