package org.wamblee.crawler;
import java.io.IOException;
-import java.io.PrintStream;
import javax.xml.transform.TransformerException;
import org.apache.commons.httpclient.NameValuePair;
import org.apache.commons.httpclient.methods.GetMethod;
import org.w3c.dom.Document;
+import org.wamblee.xml.XslTransformer;
/**
* Gets a page by issueing a get request.
* @param aParams Request parameters to use.
* @param aXslt XSLT to use.
*/
- public GetPageRequest(int aMaxTries, int aMaxDelay, NameValuePair[] aParams, String aXslt) {
- super(aMaxTries, aMaxDelay, aParams, aXslt, null);
+ public GetPageRequest(int aMaxTries, int aMaxDelay, NameValuePair[] aParams, String aXslt, XslTransformer aTransformer) {
+ super(aMaxTries, aMaxDelay, aParams, aXslt, aTransformer);
}
-
- /**
- * Constructs the request.
- * @param aMaxTries Maximum number of retries.
- * @param aMaxDelay Maximum delay before executing the request.
- * @param aParams Request parameters to use.
- * @param aXslt XSLT to use.
- * @param aOs Logging output stream to use.
- */
- public GetPageRequest(int aMaxTries, int aMaxDelay, NameValuePair[] aParams, String aXslt, PrintStream aOs) {
- super(aMaxTries, aMaxDelay, aParams, aXslt, aOs);
- }
-
+
/*
* (non-Javadoc)
*
try {
return executeMethod(aClient, method);
} catch (TransformerException e) {
- throw new PageException(e.getMessage(), e);
+ throw new PageException("Transformation problem for url " + aUrl, e);
} catch (IOException e) {
- throw new PageException(e.getMessage(), e);
+ throw new PageException("Problem getting " + aUrl, e);
}
}