My current project has the requirement to return custom search results from a Google Search Appliance formatted just so sweetly. Lots of fine work was done with the standard GSA XSLT,the one on the appliance and configured through the appliance Administration. When it came time for development, I found an open source library that really helps with this task. You can get it from Source Forge. One class and three methods later, voila - Custom solution...
GSA-JAPI: Java API for interacting with the Google Search Appliance™

Sample Method from GsaSearchObj Class... Used to retrieve results..
Must of the values are set as members of the class.
public String queryGsaResponse(String searchTerm){
GSAClient client = new GSAClient(getScheme(),
m_gsaServerUrl ,
this.getM_gsaServerPort() ,
"/search");
GSAQuery query = new GSAQuery();
GSAQueryTerm term = new GSAQuery.GSAQueryTerm(searchTerm);
query.setQueryTerm(term);
query.setSiteCollections(new String[]{m_gsaEnv});
query.setFrontend(m_gsaEnv);
GSAResponse gsaResp = null;
String gsaXml = null;
try {
gsaResp = client.getGSAResponse(query);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
java.util.List myList = gsaResp.getResults();
StringBuffer sb = new StringBuffer();
sb.append("<table border='1' width='100%'>");
Iterator it = myList.iterator();
while ( it.hasNext() ){
GSAResult myitem = ((GSAResult)it.next());
sb.append("<tr>");
sb.append("<td>" + myitem.getTitle() + "</td>");
sb.append("<td>" + myitem.getSummary() + "</td>");
sb.append("<td>" + myitem.getUrl() + "</td>");
sb.append("</tr>");
}
sb.append("</table>");
return sb.toString();
}






