Search in sources :

Example 1 with StudyEventView

use of uk.ac.ebi.spot.goci.curation.model.StudyEventView in project goci by EBISPOT.

the class StudyEventsViewService method createViews.

@Override
public List<EventView> createViews(Long trackableId) {
    List<EventView> views = new ArrayList<>();
    Collection<Event> events = studyRepository.findOne(trackableId).getEvents();
    events.forEach(event -> {
        String eventName = eventTypeService.translateEventByEventType(event.getEventType());
        EventView eventView = new StudyEventView(eventName, event.getEventDate(), trackableId, event.getUser().getEmail(), event.getEventDescription());
        views.add(eventView);
    });
    return views;
}
Also used : StudyEventView(uk.ac.ebi.spot.goci.curation.model.StudyEventView) ArrayList(java.util.ArrayList) Event(uk.ac.ebi.spot.goci.model.Event) StudyEventView(uk.ac.ebi.spot.goci.curation.model.StudyEventView) EventView(uk.ac.ebi.spot.goci.curation.model.EventView)

Aggregations

ArrayList (java.util.ArrayList)1 EventView (uk.ac.ebi.spot.goci.curation.model.EventView)1 StudyEventView (uk.ac.ebi.spot.goci.curation.model.StudyEventView)1 Event (uk.ac.ebi.spot.goci.model.Event)1