forked from D-Net/dnet-hadoop
code formatting
This commit is contained in:
parent
5a8bc329c5
commit
5f7b75f5c5
|
@ -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;
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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()))
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue