Skip to content

Commit

Permalink
No need to extract URIs when downloading did not work in the first pl…
Browse files Browse the repository at this point in the history
…ace; also now reports what it is doing in the progress view
  • Loading branch information
egonw committed Dec 4, 2012
1 parent 4d3b823 commit 39d9ac4
Showing 1 changed file with 9 additions and 11 deletions.
Expand Up @@ -176,23 +176,21 @@ public List<Entry> getProperties(IRDFStore store) throws BioclipseException, Cor
private void findInfoForOneURI(IcebearWorkload workload, IReturner<IRDFStore> returner, IProgressMonitor monitor) {
IRDFStore store = rdf.createInMemoryStore();
URI nextURI = workload.getNextURI();
String nextURIString = nextURI.toString();
monitor.subTask("Downloading " + nextURIString);
try {
rdf.importURL(store, nextURI.toString(), extraHeaders, monitor);
} catch (Exception e) {
e.printStackTrace();
}
try {
rdf.importURL(store, nextURIString, extraHeaders, monitor);
rdf.addObjectProperty(store,
"http://www.bioclipse.org/PrimaryObject", "http://www.bioclipse.org/hasURI",
nextURI.toString()
);
} catch (BioclipseException e) {
e.printStackTrace();
}
for (INextURIExtractor spider : spiders) {
for (String uri : spider.extractURIs(store, nextURI.toString())) {
workload.addNewURI(uri);
for (INextURIExtractor spider : spiders) {
for (String uri : spider.extractURIs(store, nextURI.toString())) {
workload.addNewURI(uri);
}
}
} catch (Exception exception) {
exception.printStackTrace();
}
returner.partialReturn(store);
}
Expand Down

0 comments on commit 39d9ac4

Please sign in to comment.