Revision 58087
Added by Claudio Atzori about 4 years ago
modules/dnet-openaireplus-mapping-utils/trunk/src/main/java/eu/dnetlib/data/transform/xml/OafToHbaseXsltFunctions.java | ||
---|---|---|
204 | 204 |
addField(instance, Instance.getDescriptor().findFieldByName("refereed"), values.get("refereed").listValues()); |
205 | 205 |
} |
206 | 206 |
|
207 |
final ElementList pcs = values.get("processingchargeamount"); |
|
208 |
if (pcs != null && !pcs.isEmpty()) { |
|
209 |
addField(instance, Instance.getDescriptor().findFieldByName("processingchargeamount"), pcs.listValues()); |
|
210 |
final String currency = pcs.get(0).getAttributeValue("currency"); |
|
211 |
if (StringUtils.isNotBlank(currency)) { |
|
212 |
addField(instance, Instance.getDescriptor().findFieldByName("processingchargecurrency"), currency); |
|
213 |
} |
|
214 |
} |
|
215 |
|
|
207 | 216 |
// #4468: processingchargeamount - implementatio to clarify: result vs instance. Single value vs repeatable |
208 | 217 |
// if (values.get("processingchargeamount") != null) { |
209 | 218 |
// ElementList processingchargeamount = values.get("processingchargeamount"); |
modules/dnet-openaireplus-mapping-utils/trunk/src/main/java/eu/dnetlib/data/transform/xml/OdfToHbaseXsltFunctions.java | ||
---|---|---|
356 | 356 |
addField(instance, Instance.getDescriptor().findFieldByName("refereed"), values.get("refereed").listValues()); |
357 | 357 |
} |
358 | 358 |
|
359 |
final ElementList pcs = values.get("processingchargeamount"); |
|
360 |
if (pcs != null && !pcs.isEmpty()) { |
|
361 |
addField(instance, Instance.getDescriptor().findFieldByName("processingchargeamount"), pcs.listValues()); |
|
362 |
final String currency = pcs.get(0).getAttributeValue("currency"); |
|
363 |
if (StringUtils.isNotBlank(currency)) { |
|
364 |
addField(instance, Instance.getDescriptor().findFieldByName("processingchargecurrency"), currency); |
|
365 |
} |
|
366 |
} |
|
367 |
|
|
359 | 368 |
result.addInstance(instance); |
360 | 369 |
|
361 | 370 |
List<StructuredProperty> pids = parsePids(pidList); |
Also available in: Unified diff
mapping for OAF and ODF to consider processingchargeamount and currency fields