use of ubic.gemma.core.tasks.maintenance.IndexerTaskCommand in project Gemma by PavlidisLab.
the class SearchServiceTest method testSearchByBibRefIdProblems.
@Test
public void testSearchByBibRefIdProblems() {
try {
this.setup();
} catch (Exception e) {
e.printStackTrace();
}
PubMedXMLFetcher fetcher = new PubMedXMLFetcher();
BibliographicReference bibref = fetcher.retrieveByHTTP(9600966);
bibref = (BibliographicReference) persisterHelper.persist(bibref);
assertTrue(bibref.getAbstractText().contains("ase proved to be a de novo mutation. In the third kindred, affected brothers both have a"));
IndexerTaskCommand c = new IndexerTaskCommand();
c.setIndexBibRef(true);
indexerTask.setTaskCommand(c);
indexerTask.execute();
SearchSettings settings = SearchSettings.Factory.newInstance();
settings.noSearches();
settings.setQuery("de novo mutation");
settings.setSearchBibrefs(true);
Map<Class<?>, List<SearchResult>> found = this.searchService.search(settings);
assertTrue(!found.isEmpty());
for (SearchResult sr : found.get(BibliographicReference.class)) {
if (sr.getResultObject().equals(bibref)) {
this.tearDown();
return;
}
}
this.tearDown();
fail("Didn't get expected result from search");
}
use of ubic.gemma.core.tasks.maintenance.IndexerTaskCommand in project Gemma by PavlidisLab.
the class IndexServiceImpl method indexBibliographicReferences.
@Override
public String indexBibliographicReferences() {
IndexerTaskCommand command = new IndexerTaskCommand();
command.setIndexBibRef(true);
return taskRunningService.submitLocalTask(new IndexerJob(command));
}
use of ubic.gemma.core.tasks.maintenance.IndexerTaskCommand in project Gemma by PavlidisLab.
the class IndexServiceImpl method indexProbes.
@Override
public String indexProbes() {
IndexerTaskCommand command = new IndexerTaskCommand();
command.setIndexProbe(true);
return taskRunningService.submitLocalTask(new IndexerJob(command));
}
use of ubic.gemma.core.tasks.maintenance.IndexerTaskCommand in project Gemma by PavlidisLab.
the class IndexServiceImpl method indexArrayDesigns.
@Override
public String indexArrayDesigns() {
IndexerTaskCommand command = new IndexerTaskCommand();
command.setIndexAD(true);
return taskRunningService.submitLocalTask(new IndexerJob(command));
}
use of ubic.gemma.core.tasks.maintenance.IndexerTaskCommand in project Gemma by PavlidisLab.
the class IndexServiceImpl method indexBioSequences.
@Override
public String indexBioSequences() {
IndexerTaskCommand command = new IndexerTaskCommand();
command.setIndexBioSequence(true);
return taskRunningService.submitLocalTask(new IndexerJob(command));
}
Aggregations