Search in sources :

Example 1 with DiseaseTraitDocument

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)));
}
Also used : DiseaseTraitDocument(uk.ac.ebi.spot.goci.model.DiseaseTraitDocument) EfoDocument(uk.ac.ebi.spot.goci.model.EfoDocument) StudyDocument(uk.ac.ebi.spot.goci.model.StudyDocument)

Aggregations

DiseaseTraitDocument (uk.ac.ebi.spot.goci.model.DiseaseTraitDocument)1 EfoDocument (uk.ac.ebi.spot.goci.model.EfoDocument)1 StudyDocument (uk.ac.ebi.spot.goci.model.StudyDocument)1