forked from D-Net/dnet-hadoop
[graph provision] avoid to parse again the XML records, apparently the escaped XML characters get unescaped invalidating the record
This commit is contained in:
parent
46d2df1c90
commit
41e00bcd07
|
@ -122,7 +122,8 @@ public class XmlRecordFactory implements Serializable {
|
|||
.buildBody(
|
||||
mainType, metadata, relations, listChildren(entity, je, templateFactory), listExtraInfo(entity));
|
||||
|
||||
return printXML(templateFactory.buildRecord(entity, schemaLocation, body), indent);
|
||||
return templateFactory.buildRecord(entity, schemaLocation, body);
|
||||
// return printXML(templateFactory.buildRecord(entity, schemaLocation, body), indent);
|
||||
} catch (final Throwable e) {
|
||||
throw new RuntimeException(String.format("error building record '%s'", entity.getId()), e);
|
||||
}
|
||||
|
|
|
@ -47,13 +47,16 @@ public class XmlRecordFactoryTest {
|
|||
|
||||
final String xml = xmlRecordFactory.build(new JoinedEntity<>(p));
|
||||
|
||||
System.out.println(xml);
|
||||
|
||||
assertNotNull(xml);
|
||||
|
||||
final Document doc = new SAXReader().read(new StringReader(xml));
|
||||
doc.normalize();
|
||||
|
||||
assertNotNull(doc);
|
||||
|
||||
System.out.println(doc.asXML());
|
||||
//System.out.println(doc.asXML());
|
||||
|
||||
assertEquals("0000-0001-9613-6638", doc.valueOf("//creator[@rank = '1']/@orcid"));
|
||||
assertEquals("0000-0001-9613-6639", doc.valueOf("//creator[@rank = '1']/@orcid_pending"));
|
||||
|
|
|
@ -621,7 +621,7 @@
|
|||
"trust": ""
|
||||
},
|
||||
"key": "10|CSC_________::a2b9ce8435390bcbfc05f3cae3948747",
|
||||
"value": "VIRTA"
|
||||
"value": "Bulletin of the National Technical University \"KhPI\" A series of \"Information and Modeling\""
|
||||
},
|
||||
"instancetype": {
|
||||
"classid": "0001",
|
||||
|
@ -1488,7 +1488,7 @@
|
|||
"issnLinking": "",
|
||||
"issnOnline": "",
|
||||
"issnPrinted": "0018-9383",
|
||||
"name": "IEEE Transactions on Electron Devices",
|
||||
"name": "IEEE Transactions on \"Electron Devices\"",
|
||||
"sp": "3884",
|
||||
"vol": "65"
|
||||
},
|
||||
|
@ -1557,7 +1557,7 @@
|
|||
"schemeid": "dnet:result_typologies",
|
||||
"schemename": "dnet:result_typologies"
|
||||
},
|
||||
"source": [],
|
||||
"source": [ { "value" : "Bulletin of the National Technical University \"KhPI\" A series of \"Information and Modeling\"; № 1 (3) (2020):" } ],
|
||||
"subject": [
|
||||
{
|
||||
"dataInfo": {
|
||||
|
|
Loading…
Reference in New Issue