Project

General

Profile

« Previous | Next » 

Revision 53737

fixed bug for uncompressed abstract in DOIBoostToAction

View differences:

modules/dnet-mapreduce-jobs/branches/master/src/main/java/eu/dnetlib/data/mapreduce/hbase/dataimport/DOIBoostToActions.java
50 50
            }
51 51
            byte[] unzippeddata = bos.toByteArray();
52 52
            decompresser.end();
53

  
54 53
            return new String(unzippeddata);
55 54
        } catch (Throwable e) {
55
            System.out.println("Wrong abstract:"+ abstractCompressed);
56 56
            throw  new RuntimeException(e);
57 57
        }
58 58
    }
......
258 258
        settingRelevantDate(rootElement, metadata, "published-print", "published-print", false);
259 259

  
260 260

  
261
        getArrayObjects(rootElement, "abstract").forEach(d -> metadata.addDescription(FieldTypeProtos.StringField.newBuilder().setValue(decompressAbstract(d.get("value").getAsString())).build()));
261
        getArrayObjects(rootElement, "abstract").forEach(d ->
262
                {
263
                    if ("MAG".equals(d.get("provenance")))
264
                        metadata.addDescription(FieldTypeProtos.StringField.newBuilder().setValue(decompressAbstract(d.get("value").getAsString())).build());
265
                    else
266
                        metadata.addDescription(FieldTypeProtos.StringField.newBuilder().setValue(d.get("value").getAsString()).build());
267
                }
268
                );
262 269

  
263 270

  
264 271

  

Also available in: Unified diff