Revision 58249
Added by Alessia Bardi about 3 years ago
modules/dnet-mapreduce-jobs/trunk/src/main/java/eu/dnetlib/data/mapreduce/hbase/dataimport/OrcidToActions.java | ||
---|---|---|
202 | 202 |
if (StringUtils.isNotBlank(url)) { |
203 | 203 |
instance.addUrl(url); |
204 | 204 |
} |
205 |
else{ |
|
206 |
setAsInvisible(oaf); |
|
207 |
context.incrementCounter("total", "invisible", 1); |
|
208 |
} |
|
205 | 209 |
|
206 | 210 |
final String pubDate = getPublicationDate(rootElement, "publication_date"); |
207 | 211 |
if (StringUtils.isNotBlank(pubDate)) { |
... | ... | |
250 | 254 |
|
251 | 255 |
actionList.add(factory.createAtomicAction(setName, agent, oaf.getEntity().getId(), "result", "body", oaf.build().toByteArray())); |
252 | 256 |
|
253 |
// System.out.println(JsonFormat.printToString(oaf.build())); |
|
254 | 257 |
return actionList; |
255 | 258 |
|
256 | 259 |
} |
257 | 260 |
|
261 |
public static void setAsInvisible(final OafProtos.Oaf.Builder oaf){ |
|
262 |
oaf.setDataInfo( |
|
263 |
DataInfo.newBuilder() |
|
264 |
.setInvisible(true) |
|
265 |
.setDeletedbyinference(false) |
|
266 |
.setInferred(false) |
|
267 |
.setTrust("0.9") |
|
268 |
.setProvenanceaction(getQualifier("sysimport:actionset:orcidworks-no-doi", "dnet:provenanceActions")) |
|
269 |
.build()); |
|
270 |
} |
|
271 |
|
|
258 | 272 |
public static List<Author> createAuthors(final JsonObject root) { |
259 | 273 |
|
260 | 274 |
final String authorsJSONFieldName = "authors"; |
Also available in: Unified diff
Set to invisible if there is no URL