use of ubic.gemma.core.ontology.OntologyService in project Gemma by PavlidisLab.
the class EvidenceImporterAbstractCLI method loadServices.
/**
* Loads all services that will be needed
*
* @param experimentalEvidenceServicesNeeded if the type is an experimental evidence (we need then to load more)
*/
private synchronized void loadServices(boolean experimentalEvidenceServicesNeeded) throws Exception {
this.phenotypeAssociationService = this.getBean(PhenotypeAssociationManagerService.class);
this.geneService = this.getBean(GeneService.class);
this.taxonService = this.getBean(TaxonService.class);
OntologyService ontologyService = this.getBean(OntologyService.class);
this.diseaseOntologyService = ontologyService.getDiseaseOntologyService();
this.mammalianPhenotypeOntologyService = ontologyService.getMammalianPhenotypeOntologyService();
this.humanPhenotypeOntologyService = ontologyService.getHumanPhenotypeOntologyService();
while (!this.diseaseOntologyService.isOntologyLoaded()) {
this.wait(3000);
AbstractCLI.log.info("waiting for the Disease Ontology to load");
}
while (!this.humanPhenotypeOntologyService.isOntologyLoaded()) {
this.wait(3000);
AbstractCLI.log.info("waiting for the HP Ontology to load");
}
// only need those services for experimental evidences
if (experimentalEvidenceServicesNeeded) {
this.nifstdOntologyService = ontologyService.getNifstfOntologyService();
this.obiService = ontologyService.getObiService();
this.fmaOntologyService = ontologyService.getFmaOntologyService();
while (!this.mammalianPhenotypeOntologyService.isOntologyLoaded()) {
this.wait(3000);
AbstractCLI.log.info("waiting for the MP Ontology to load");
}
while (!this.obiService.isOntologyLoaded()) {
this.wait(3000);
AbstractCLI.log.info("waiting for the OBI Ontology to load");
}
while (!this.nifstdOntologyService.isOntologyLoaded()) {
this.wait(3000);
AbstractCLI.log.info("waiting for the NIF Ontology to load");
}
while (!this.fmaOntologyService.isOntologyLoaded()) {
this.wait(3000);
AbstractCLI.log.info("waiting for the FMA Ontology to load");
}
}
}
use of ubic.gemma.core.ontology.OntologyService in project Gemma by PavlidisLab.
the class ExternalDatabaseEvidenceImporterAbstractCLI method loadServices.
// load all needed services
private synchronized void loadServices(String[] args) throws Exception {
// this gets the context, so we can access beans
Exception err = this.processCommandLine(args);
if (err != null)
throw err;
OntologyService ontologyService = this.getBean(OntologyService.class);
this.diseaseOntologyService = ontologyService.getDiseaseOntologyService();
this.humanPhenotypeOntologyService = ontologyService.getHumanPhenotypeOntologyService();
this.geneService = this.getBean(GeneService.class);
while (!this.diseaseOntologyService.isOntologyLoaded()) {
this.wait(3000);
AbstractCLI.log.info("waiting for the Disease Ontology to load");
}
while (!this.humanPhenotypeOntologyService.isOntologyLoaded()) {
this.wait(3000);
AbstractCLI.log.info("waiting for the HP Ontology to load");
}
this.medicOntologyService = new MedicOntologyService();
}
Aggregations