forked from D-Net/dnet-hadoop
serialisation of APCs int he XML records
This commit is contained in:
parent
1f8302dc37
commit
600ede1798
|
@ -398,6 +398,16 @@ public class XmlRecordFactory implements Serializable {
|
|||
if (r.getResourcetype() != null) {
|
||||
metadata.add(XmlSerializationUtils.mapQualifier("resourcetype", r.getResourcetype()));
|
||||
}
|
||||
if (r.getProcessingchargeamount() != null) {
|
||||
metadata
|
||||
.add(
|
||||
XmlSerializationUtils
|
||||
.asXmlElement("processingchargeamount", r.getProcessingchargeamount().getValue()));
|
||||
metadata
|
||||
.add(
|
||||
XmlSerializationUtils
|
||||
.asXmlElement("processingchargecurrency", r.getProcessingchargecurrency().getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
|
|
|
@ -66,6 +66,9 @@ public class XmlRecordFactoryTest {
|
|||
assertEquals("10.5689/LIB.2018.2853550", doc.valueOf("//instance/alternateidentifier/text()"));
|
||||
|
||||
assertEquals(3, doc.selectNodes("//instance").size());
|
||||
|
||||
assertEquals("1721.47", doc.valueOf("//processingchargeamount/text()"));
|
||||
assertEquals("EUR", doc.valueOf("//processingchargecurrency/text()"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -1655,5 +1655,37 @@
|
|||
},
|
||||
"value": "Understanding Electromigration in Cu-CNT Composite Interconnects A Multiscale Electrothermal Simulation Study"
|
||||
}
|
||||
]
|
||||
],
|
||||
"processingchargeamount": {
|
||||
"value": "1721.47",
|
||||
"dataInfo": {
|
||||
"invisible": true,
|
||||
"inferred": false,
|
||||
"deletedbyinference": false,
|
||||
"trust": "0.9",
|
||||
"inferenceprovenance": "",
|
||||
"provenanceaction": {
|
||||
"classid": "sysimport:crosswalk:datasetarchive",
|
||||
"classname": "sysimport:crosswalk:datasetarchive",
|
||||
"schemeid": "dnet:provenanceActions",
|
||||
"schemename": "dnet:provenanceActions"
|
||||
}
|
||||
}
|
||||
},
|
||||
"processingchargecurrency": {
|
||||
"value": "EUR",
|
||||
"dataInfo": {
|
||||
"invisible": true,
|
||||
"inferred": false,
|
||||
"deletedbyinference": false,
|
||||
"trust": "0.9",
|
||||
"inferenceprovenance": "",
|
||||
"provenanceaction": {
|
||||
"classid": "sysimport:crosswalk:datasetarchive",
|
||||
"classname": "sysimport:crosswalk:datasetarchive",
|
||||
"schemeid": "dnet:provenanceActions",
|
||||
"schemename": "dnet:provenanceActions"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue