2020-01-10 11:48:24 +01:00
|
|
|
package eu.dnetlib.uoamonitorservice.entities;
|
|
|
|
|
2024-03-08 19:55:51 +01:00
|
|
|
import eu.dnetlib.uoamonitorservice.dto.SectionFull;
|
|
|
|
import eu.dnetlib.uoamonitorservice.generics.SectionGeneric;
|
|
|
|
import org.springframework.data.mongodb.core.mapping.Document;
|
2020-01-10 11:48:24 +01:00
|
|
|
|
|
|
|
import java.util.List;
|
2024-03-08 19:55:51 +01:00
|
|
|
import java.util.Objects;
|
|
|
|
import java.util.stream.Collectors;
|
2020-01-10 11:48:24 +01:00
|
|
|
|
2024-03-08 19:55:51 +01:00
|
|
|
@Document
|
|
|
|
public class Section extends SectionGeneric<String> {
|
2020-01-10 11:48:24 +01:00
|
|
|
public Section() {}
|
|
|
|
|
2024-03-08 19:55:51 +01:00
|
|
|
public Section(SectionFull section) {
|
|
|
|
super(section);
|
2024-03-12 23:20:55 +01:00
|
|
|
this.indicators = section.getIndicators().stream().map(Indicator::getId).collect(Collectors.toList());
|
|
|
|
this.indicators.removeIf(Objects::isNull);
|
2020-01-10 11:48:24 +01:00
|
|
|
}
|
|
|
|
}
|