Logger logger = Logger.getLogger(com.steadystate.css.parser.SACParser.class.getName());
logger.setLevel(Level.OFF);
try
{
UserAgentContext uacontext = new MozillaUserAgent();
LocalHtmlRendererContext rcontext = new LocalHtmlRendererContext(uacontext);
conceptName = breakCapitalizedConcepts(conceptName.replace("_", " ")," ");
Logger.getLogger(Processor.class.getName()).info("Google number of results for " + conceptName);
FormInput submitInput1 = new FormInput("hl", "en");
FormInput submitInput2 = new FormInput("q", conceptName);
FormInput submitInput3 = new FormInput("aqi", "g7g-s1g2");
URL url = org.lobobrowser.util.Urls.guessURL(SEARCH_STRING);
rcontext.submitForm("GET", url, "_this", null, new FormInput[] {
submitInput1, submitInput2, submitInput3
});
HTMLDocumentImpl startingDoc = rcontext.getCurrentDocument();
if(startingDoc == null)
{
throw new IllegalStateException("No document available for startup location.");
}