Add SWH in the collectedFrom field

This commit is contained in:
Serafeim Chatzopoulos 2023-10-03 16:55:10 +03:00
parent b49a3ac9b2
commit cae75fc75d
2 changed files with 12 additions and 0 deletions

View File

@ -165,6 +165,14 @@ public class PrepareSWHActionsets {
row.getString(row.fieldIndex("swhid")),
qualifier,
dataInfo)));
// add SWH in the `collectedFrom` field
KeyValue kv = new KeyValue();
kv.setKey(SWHConstants.SWH_ID);
kv.setValue(SWHConstants.SWH_NAME);
s.setCollectedfrom(Arrays.asList(kv));
return s;
}, Encoders.bean(Software.class))
.toJavaRDD()

View File

@ -16,4 +16,8 @@ public class SWHConstants {
public static final String SWHID_CLASSNAME = "Software Heritage Identifier";
public static final String SWH_ID = "10|openaire____::dbfd07503aaa1ed31beed7dec942f3f4";
public static final String SWH_NAME = "Software Heritage";
}