use of ubic.gemma.model.common.description.CitationValueObject in project Gemma by PavlidisLab.
the class EvidenceImporterCLI method convertFileLine2ExperimentalValueObjects.
/**
* convert for ExperimentalEvidenceValueObject
*/
private ExperimentalEvidenceValueObject convertFileLine2ExperimentalValueObjects(String[] tokens) throws IOException {
ExperimentalEvidenceValueObject evidence = new ExperimentalEvidenceValueObject(-1L);
this.populateCommonFields(evidence, tokens);
String reviewReferencePubmed = tokens[this.mapColumns.get("OtherPubMed")].trim();
Set<String> relevantPublicationsPubmed = new HashSet<>();
if (!reviewReferencePubmed.equals("")) {
relevantPublicationsPubmed.add(reviewReferencePubmed);
}
for (String relevantPubMedID : relevantPublicationsPubmed) {
CitationValueObject relevantPublicationValueObject = new CitationValueObject();
relevantPublicationValueObject.setPubmedAccession(relevantPubMedID);
evidence.getPhenotypeAssPubVO().add(PhenotypeAssPubValueObject.createRelevantPublication(relevantPubMedID));
}
Set<String> developmentStage = this.trimArray(tokens[this.mapColumns.get("DevelopmentalStage")].split(";"));
Set<String> bioSource = this.trimArray(tokens[this.mapColumns.get("BioSource")].split(";"));
Set<String> organismPart = this.trimArray(tokens[this.mapColumns.get("OrganismPart")].split(";"));
Set<String> experimentDesign = this.trimArray(tokens[this.mapColumns.get("ExperimentDesign")].split(";"));
Set<String> treatment = this.trimArray(tokens[this.mapColumns.get("Treatment")].split(";"));
Set<String> experimentOBI = this.trimArray(tokens[this.mapColumns.get("Experiment")].split(";"));
Set<CharacteristicValueObject> experimentTags = new HashSet<>();
experimentTags.addAll(this.experiementTags2Ontology(developmentStage, this.DEVELOPMENTAL_STAGE, this.DEVELOPMENTAL_STAGE_ONTOLOGY, this.nifstdOntologyService));
experimentTags.addAll(this.experiementTags2Ontology(bioSource, this.BIOSOURCE_ONTOLOGY, this.BIOSOURCE_ONTOLOGY, null));
experimentTags.addAll(this.experiementTags2Ontology(organismPart, this.ORGANISM_PART, this.ORGANISM_PART_ONTOLOGY, this.fmaOntologyService));
experimentTags.addAll(this.experiementTags2Ontology(experimentDesign, this.EXPERIMENT_DESIGN, this.EXPERIMENT_DESIGN_ONTOLOGY, this.obiService));
experimentTags.addAll(this.experiementTags2Ontology(treatment, this.TREATMENT, this.TREATMENT_ONTOLOGY, null));
experimentTags.addAll(this.experiementTags2Ontology(experimentOBI, this.EXPERIMENT, this.EXPERIMENT_ONTOLOGY, this.obiService));
evidence.setExperimentCharacteristics(experimentTags);
return evidence;
}
use of ubic.gemma.model.common.description.CitationValueObject in project Gemma by PavlidisLab.
the class BibRefControllerTest method testShowAllForExperiments.
@Test
public void testShowAllForExperiments() {
ModelAndView mv = brc.showAllForExperiments(this.newGet("/bibRef/showAllEeBibRefs.html"), (HttpServletResponse) null);
@SuppressWarnings("unchecked") Map<CitationValueObject, Collection<ExpressionExperimentValueObject>> citationToEEs = (Map<CitationValueObject, Collection<ExpressionExperimentValueObject>>) mv.getModel().get("citationToEEs");
assertNotNull(citationToEEs);
}
Aggregations