forked from D-Net/dnet-hadoop
code formatting
This commit is contained in:
parent
7180911ded
commit
0bc74e2000
|
@ -226,19 +226,19 @@ public class GraphCleaningFunctions extends CleaningFunctions {
|
||||||
|
|
||||||
public static <T extends Oaf> boolean filter(T value) {
|
public static <T extends Oaf> boolean filter(T value) {
|
||||||
if (!(value instanceof Relation) && (Boolean.TRUE
|
if (!(value instanceof Relation) && (Boolean.TRUE
|
||||||
.equals(
|
.equals(
|
||||||
Optional
|
Optional
|
||||||
.ofNullable(value)
|
.ofNullable(value)
|
||||||
.map(
|
.map(
|
||||||
o -> Optional
|
o -> Optional
|
||||||
.ofNullable(o.getDataInfo())
|
.ofNullable(o.getDataInfo())
|
||||||
.map(
|
.map(
|
||||||
d -> Optional
|
d -> Optional
|
||||||
.ofNullable(d.getInvisible())
|
.ofNullable(d.getInvisible())
|
||||||
.orElse(true))
|
.orElse(true))
|
||||||
.orElse(false))
|
.orElse(false))
|
||||||
.orElse(true)))) {
|
.orElse(true)))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value instanceof Datasource) {
|
if (value instanceof Datasource) {
|
||||||
|
|
|
@ -371,7 +371,7 @@ public class GraphCleaningFunctionsTest {
|
||||||
@Test
|
@Test
|
||||||
public void testFilterProject() throws IOException {
|
public void testFilterProject() throws IOException {
|
||||||
String json = IOUtils
|
String json = IOUtils
|
||||||
.toString(getClass().getResourceAsStream("/eu/dnetlib/dhp/oa/graph/clean/project.json"));
|
.toString(getClass().getResourceAsStream("/eu/dnetlib/dhp/oa/graph/clean/project.json"));
|
||||||
Project p_in = MAPPER.readValue(json, Project.class);
|
Project p_in = MAPPER.readValue(json, Project.class);
|
||||||
|
|
||||||
Assertions.assertEquals(false, GraphCleaningFunctions.filter(p_in));
|
Assertions.assertEquals(false, GraphCleaningFunctions.filter(p_in));
|
||||||
|
|
Loading…
Reference in New Issue