[Pellet-users] Interrupting a classification process with a ProgressMonitor

Robert Davey robert.davey at bbsrc.ac.uk
Fri Jun 6 09:28:34 UTC 2008


Hi all,

I'm trying to cancel a realisation or classification process by
implementing Evren's suggestion to me (off list) that I should use the
ProgressMonitor interface.

I make a new implementation (ReasonerProgressMonitor) by extending a
pre-existing concrete ProgressMonitor (like the ConsoleProgress monitor
for example) and registering it with the taxonomy builder:

reasoner.getKB().getTaxonomyBuilder().setProgressMonitor(new
ReasonerProgressMonitor());

I've also tried by writing a full implementation directly from the
ProgressMonitor interface and neither work.

By "not working" I mean that I can add a system message to my
ReasonerProgressMonitor constructor to tell me that the correct monitor
has been added to the TaxonomyBuilder implementation (which works fine)
but any further system messages in the isCanceled or other overriden
methods (taskStarted, taskFinished) do not get outputted.

Furthermore, if I try and set the monitor to the ConsoleProgressMonitor,
I also get no output, e.g. 

System.out.println( progressTitle + " " + progressLength + "
elements" );

does not show up in my Tomcat logs, but the normal Log INFOs do.

Are there any examples of the progress monitors anywhere, and
particularly for stopping classification/realisation?

Cheers

Rob

-- 
---------------------------------------
Dr. Rob Davey
NCYC / Institute of Food Research
Computational Biology / John Innes Centre
Norwich Research Park
Norwich, Norfolk, NR4 7HU

http://www.comparagrid.org/
http://cbr.jic.ac.uk/dicks/
---------------------------------------



More information about the Pellet-users mailing list