Merge branch 'beta' into ticket_8369
This commit is contained in:
commit
c3dff7e199
|
@ -9,6 +9,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
|||
import org.apache.commons.lang3.SerializationUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import eu.dnetlib.dhp.common.Constants;
|
||||
import eu.dnetlib.dhp.common.FunctionalInterfaceSupport.SerializableConsumer;
|
||||
import eu.dnetlib.dhp.common.vocabulary.VocabularyGroup;
|
||||
import eu.dnetlib.dhp.common.vocabulary.VocabularyTerm;
|
||||
|
@ -48,7 +49,9 @@ public class CleaningRuleMap extends HashMap<Class<?>, SerializableConsumer<Obje
|
|||
subject.getQualifier().setClassid(vocabularyId);
|
||||
subject.getQualifier().setClassname(vocabulary.getName());
|
||||
}
|
||||
} else if (vocabularyId.equals(subject.getQualifier().getClassid())) {
|
||||
} else if (vocabularyId.equals(subject.getQualifier().getClassid()) &&
|
||||
Objects.nonNull(subject.getDataInfo()) &&
|
||||
!"subject:fos".equals(subject.getDataInfo().getProvenanceaction())) {
|
||||
Qualifier syn = vocabulary.getSynonymAsQualifier(subject.getValue());
|
||||
VocabularyTerm term = vocabulary.getTerm(subject.getValue());
|
||||
if (Objects.isNull(syn) && Objects.isNull(term)) {
|
||||
|
|
|
@ -123,7 +123,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