code formatted

This commit is contained in:
Sandro La Bruzzo 2024-04-11 17:43:48 +02:00
parent 843dc95340
commit 41a42dde64
2 changed files with 3 additions and 3 deletions

View File

@ -97,9 +97,9 @@ public class PrepareAffiliationRelations implements Serializable {
spark, openapcInputPath, collectedFromOpenAPC);
List<KeyValue> collectedFromDatacite = OafMapperUtils
.listKeyValues(ModelConstants.DATACITE_ID, "Datacite");
.listKeyValues(ModelConstants.DATACITE_ID, "Datacite");
JavaPairRDD<Text, Text> dataciteRelations = prepareAffiliationRelations(
spark, dataciteInputPath, collectedFromDatacite);
spark, dataciteInputPath, collectedFromDatacite);
crossrefRelations
.union(pubmedRelations)

View File

@ -112,7 +112,7 @@ public class SparkAtomicActionUsageJob implements Serializable {
.joinWith(datasource, resultModel.col("datasourceId").equalTo(datasource.col("id")), "left")
.map((MapFunction<Tuple2<UsageStatsResultModel, Datasource>, UsageStatsResultModel>) t2 -> {
UsageStatsResultModel usrm = t2._1();
if(Optional.ofNullable(t2._2()).isPresent())
if (Optional.ofNullable(t2._2()).isPresent())
usrm.setDatasourceId(usrm.getDatasourceId() + "||" + t2._2().getOfficialname().getValue());
else
usrm.setDatasourceId(usrm.getDatasourceId() + "||NO_MATCH_FOUND");