forked from D-Net/dnet-hadoop
Add SWH in the collectedFrom field
This commit is contained in:
parent
b49a3ac9b2
commit
cae75fc75d
|
@ -165,6 +165,14 @@ public class PrepareSWHActionsets {
|
||||||
row.getString(row.fieldIndex("swhid")),
|
row.getString(row.fieldIndex("swhid")),
|
||||||
qualifier,
|
qualifier,
|
||||||
dataInfo)));
|
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;
|
return s;
|
||||||
}, Encoders.bean(Software.class))
|
}, Encoders.bean(Software.class))
|
||||||
.toJavaRDD()
|
.toJavaRDD()
|
||||||
|
|
|
@ -16,4 +16,8 @@ public class SWHConstants {
|
||||||
|
|
||||||
public static final String SWHID_CLASSNAME = "Software Heritage Identifier";
|
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";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue