use of org.nextprot.api.core.service.DbXrefService in project nextprot-api by calipho-sib.
the class DbXrefAnalyserTask method analyseNextprotEntriesDbXrefs.
private void analyseNextprotEntriesDbXrefs() throws IOException {
LOGGER.info("**** Analysing dbxrefs from entry accession...");
ConsoleProgressBar pb;
try (DbXrefUrlVisitor visitor = new DbXrefUrlVisitor(outputDirectory + "/allentries-xrefs-url.tsv", outputDirectory + "/allentries-xrefs-url.log")) {
DbXrefService xrefService = getBean(DbXrefService.class);
Set<String> allEntryAcs = getNextprotEntries();
pb = ConsoleProgressBar.determinated("analysing dbxrefs (from neXtProt entries)", allEntryAcs.size());
pb.start();
for (String entryAc : allEntryAcs) {
try {
visitor.visit(entryAc, xrefService.findDbXrefsByMaster(entryAc));
visitor.flush();
pb.incrementValue();
} catch (EntryNotFoundException e) {
LOGGER.error(e.getMessage() + ": skipping entry " + entryAc);
}
}
visitor.flush();
visitor.close();
}
pb.stop();
}
Aggregations