use of uk.ac.ebi.spot.goci.model.AssociationDocument in project goci by EBISPOT.
the class TraitEnrichmentService method doEnrichment.
@Override
public void doEnrichment(DiseaseTraitDocument document) {
long id = Long.valueOf(document.getId().split(":")[1]);
studyService.findByDiseaseTraitId(id).forEach(study -> {
document.embed(new StudyDocument(study));
Set<EfoTrait> efoTraits = new HashSet<>();
traitService.findMappedTraitByStudyId(study.getId()).forEach(efoTraits::add);
efoTraits.forEach(trait -> {
document.embed(new EfoDocument(trait));
associationService.findPublishedAssociationsByEfoTraitId(trait.getId()).forEach(association -> document.embed(new AssociationDocument(association)));
});
});
}
Aggregations