use of uk.ac.ebi.spot.goci.model.EventType in project goci by EBISPOT.
the class EventTypeService method determineEventTypeFromCurator.
/**
* Determine event type based on curator
*
* @param curator curator to determine event type from
* @return eventType
*/
public String determineEventTypeFromCurator(Curator curator) {
String eventTypeString = "";
try {
String action = curator.getLastName().toString();
EventType eventTypeRow = eventTypeRepository.findByAction(action);
eventTypeString = eventTypeRow.getEventType();
} catch (Exception exception) {
EventType eventTypeDefaultRow = eventTypeRepository.findByAction("Curator Unknown");
eventTypeString = eventTypeDefaultRow.getEventType();
}
return eventTypeString;
}
use of uk.ac.ebi.spot.goci.model.EventType in project goci by EBISPOT.
the class EventTypeService method determineEventTypeFromStatus.
public String determineEventTypeFromStatus(CurationStatus status) {
String eventTypeString = "";
try {
String action = status.getStatus().toString();
EventType eventTypeRow = eventTypeRepository.findByAction(action);
eventTypeString = eventTypeRow.getEventType();
} catch (Exception exception) {
EventType eventTypeDefaultRow = eventTypeRepository.findByAction("Study Unknown");
eventTypeString = eventTypeDefaultRow.getEventType();
}
return eventTypeString;
}
Aggregations