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) {
|
||||
if (!(value instanceof Relation) && (Boolean.TRUE
|
||||
.equals(
|
||||
Optional
|
||||
.ofNullable(value)
|
||||
.map(
|
||||
o -> Optional
|
||||
.ofNullable(o.getDataInfo())
|
||||
.map(
|
||||
d -> Optional
|
||||
.ofNullable(d.getInvisible())
|
||||
.orElse(true))
|
||||
.orElse(false))
|
||||
.orElse(true)))) {
|
||||
return true;
|
||||
.equals(
|
||||
Optional
|
||||
.ofNullable(value)
|
||||
.map(
|
||||
o -> Optional
|
||||
.ofNullable(o.getDataInfo())
|
||||
.map(
|
||||
d -> Optional
|
||||
.ofNullable(d.getInvisible())
|
||||
.orElse(true))
|
||||
.orElse(false))
|
||||
.orElse(true)))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (value instanceof Datasource) {
|
||||
|
|
|
@ -371,7 +371,7 @@ public class GraphCleaningFunctionsTest {
|
|||
@Test
|
||||
public void testFilterProject() throws IOException {
|
||||
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);
|
||||
|
||||
Assertions.assertEquals(false, GraphCleaningFunctions.filter(p_in));
|
||||
|
|
Loading…
Reference in New Issue