net.sf.gsaapi.util
Class GSACacheQueryUtil

java.lang.Object
  extended bynet.sf.gsaapi.util.GSACacheQueryUtil

public class GSACacheQueryUtil
extends java.lang.Object

This is a utility class for constructing the urls for retrieving the "cached" version of the document crawled by the GSA.
Typical usage:
GSAClient client = new GSAClient("http", "www.mygsa.net", 7777, "/search"); GSAQuery query = new GSAQuery(); query.setQueryTerm(...); // call other setters on the query GSACacheQueryUtil gcu = new GSACacheQueryUtil(client, query); gcu.setProxystylesheet("default_frontend"); GSAResponse response = client.getGSAResponse(query);

Author:
Amol S Deshmukh adeshmuk .at inxight .dot com

Constructor Summary
GSACacheQueryUtil(GSAClient client, GSAQuery query)
          Construct a GSACacheQueryUtil instance from the GSAClient and GSAQuery instances
 
Method Summary
 java.lang.String getCacheDocUrl(GSAResult result, boolean hilited)
          returns a url pointing to the cached document if the cached document exists.
 void setProxystylesheet(java.lang.String name)
          If set, the returned url link contains the following substring: "proxystylesheet=<value>" where <value> is the value passed to this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GSACacheQueryUtil

public GSACacheQueryUtil(GSAClient client,
                         GSAQuery query)
Construct a GSACacheQueryUtil instance from the GSAClient and GSAQuery instances

Parameters:
client -
query -
Method Detail

setProxystylesheet

public void setProxystylesheet(java.lang.String name)
If set, the returned url link contains the following substring: "proxystylesheet=<value>" where <value> is the value passed to this method.

Parameters:
name -

getCacheDocUrl

public java.lang.String getCacheDocUrl(GSAResult result,
                                       boolean hilited)
returns a url pointing to the cached document if the cached document exists. Otherwise returns null

Parameters:
result -
hilited - Whether to include the "query term" as a part of the cache url. Setting this to true will return a link to the cached document in which the query terms will be highlighted.
Returns:
returns the Url of the cached doc as a string.


© Copyright 2006 Inxight Software, Inc.