public void setOutputWindow(SimplePrinter ow) {
m_ow = ow;
}
public void run() {
HtmlTourDownloader dloader = null;
if (m_dloaders.length == 1) {
dloader = m_dloaders[0];
dloader.setOutputWindow(m_ow);
if (!dloader.verify(m_sLink, false)) {
return;
}
}
else {
for (HtmlTourDownloader dr: m_dloaders) {
if (f.isDebugMode())
m_ow.addLine("Trying reader: " + dr.getClass().getName());
dr.setOutputWindow(m_ow);
if (dr.verify(m_sLink, !f.isDebugMode())) {
m_ow.addLine(
getStr("msg.readerFound", dr.getClass().getName()));
dloader = dr;
break;
}
}
}
if (dloader == null) {
m_ow.addLine(getStr("msg.noDealReader"));
return;
}
try {
dloader.fullDownload(true);
}
catch (DownloadFailedException e) {
m_ow.addLine(e.getMessage());
if (f.isDebugMode())
e.printStackTrace();