Revision 52945
Added by Claudio Atzori over 5 years ago
modules/dnet-openaireplus-mapping-utils/trunk/src/main/java/eu/dnetlib/data/transform/xml/OafToHbaseXsltFunctions.java | ||
---|---|---|
149 | 149 |
if (values.get("concept") != null) { |
150 | 150 |
for (final Element e : values.get("concept")) { |
151 | 151 |
final String id = e.getAttributes().get("id"); |
152 |
if (StringUtils.isBlank(id)) throw new IllegalArgumentException("Context id cannot be blank"); |
|
153 |
metadata.addContext(Context.newBuilder().setId(id)); |
|
152 |
if (StringUtils.isNotBlank(id)) { |
|
153 |
metadata.addContext(Context.newBuilder().setId(id)); |
|
154 |
} |
|
154 | 155 |
} |
155 | 156 |
} |
156 | 157 |
if (values.get("journal") != null) { |
Also available in: Unified diff
avoid to fail in case of empty concept/@id