code formatting

This commit is contained in:
Claudio Atzori 2020-10-07 13:22:54 +02:00
parent 5a8bc329c5
commit 5f7b75f5c5
4 changed files with 8 additions and 11 deletions

View File

@ -10,7 +10,6 @@ import java.util.Objects;
* - private String description to store the description of the programme * - private String description to store the description of the programme
*/ */
public class H2020Programme implements Serializable { public class H2020Programme implements Serializable {
private String code; private String code;
private String description; private String description;

View File

@ -1,14 +1,14 @@
package eu.dnetlib.dhp.schema.oaf; package eu.dnetlib.dhp.schema.oaf;
import eu.dnetlib.dhp.schema.common.LicenseComparator;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import eu.dnetlib.dhp.schema.common.LicenseComparator;
public class Result extends OafEntity implements Serializable { public class Result extends OafEntity implements Serializable {
private List<Measure> measures; private List<Measure> measures;
@ -247,7 +247,8 @@ public class Result extends OafEntity implements Serializable {
instance = mergeLists(instance, r.getInstance()); instance = mergeLists(instance, r.getInstance());
if (r.getBestaccessright() != null && new LicenseComparator().compare(r.getBestaccessright(), bestaccessright) < 0) if (r.getBestaccessright() != null
&& new LicenseComparator().compare(r.getBestaccessright(), bestaccessright) < 0)
bestaccessright = r.getBestaccessright(); bestaccessright = r.getBestaccessright();
if (r.getResulttype() != null && compareTrust(this, r) < 0) if (r.getResulttype() != null && compareTrust(this, r) < 0)

View File

@ -177,14 +177,12 @@ public class PrepareProgramme {
prepareClassification(h2020Programmes); prepareClassification(h2020Programmes);
h2020Programmes.map(csvProgramme -> OBJECT_MAPPER.writeValueAsString(csvProgramme)) h2020Programmes
.map(csvProgramme -> OBJECT_MAPPER.writeValueAsString(csvProgramme))
.saveAsTextFile(outputPath); .saveAsTextFile(outputPath);
} }
private static void prepareClassification(JavaRDD<CSVProgramme> h2020Programmes) { private static void prepareClassification(JavaRDD<CSVProgramme> h2020Programmes) {
Object[] codedescription = h2020Programmes Object[] codedescription = h2020Programmes
.map(value -> new Tuple2<>(value.getCode(), value.getTitle())) .map(value -> new Tuple2<>(value.getCode(), value.getTitle()))

View File

@ -10,7 +10,6 @@ public class ProjectSubset implements Serializable {
private String code; private String code;
public String getCode() { public String getCode() {
return code; return code;
} }