use of uk.ac.ebi.spot.goci.model.DiseaseTraitDocument in project goci by EBISPOT.
the class AssociationEnrichmentService method doEnrichment.
@Override
public void doEnrichment(AssociationDocument document) {
long id = Long.valueOf(document.getId().split(":")[1]);
studyService.findByAssociationId(id).forEach(study -> {
document.addStudyId(String.valueOf(study.getId()));
document.embed(new StudyDocument(study));
});
traitService.findReportedTraitByAssociationId(id).forEach(trait -> document.embed(new DiseaseTraitDocument(trait)));
traitService.findMappedTraitByAssociationId(id).forEach(trait -> document.embed(new EfoDocument(trait)));
}
Aggregations