|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jgd.comapi.QueryCOM
public class QueryCOM
Class for performing GD queries This class - as well as the ComponentRegistrator class - uses the Jacob Java-COM -bridge See http://desktop.google.com/queryapi.html#queryobjects and http://desktop.google.com/queryapi.html#queryex
Field Summary | |
---|---|
private boolean |
async
|
private java.lang.String |
category
|
private java.lang.String |
cookie
|
private com.jacob.com.Variant |
cookieVariant
|
private boolean |
filterDuplicates
|
protected static org.apache.commons.logging.Log |
log
|
private boolean |
matchAllTerms
|
private static java.lang.String[] |
MIN_GD_PROPERTIES
|
static boolean |
QUERY
|
static boolean |
QUERY_EX
|
private java.lang.String |
queryString
|
private int |
ranking
|
(package private) JGDRegister |
register
|
private boolean |
useQueryEx
|
Constructor Summary | |
---|---|
QueryCOM(java.lang.String queryString)
|
|
QueryCOM(java.lang.String cookie,
java.lang.String queryString)
Uses QueryEx as the query-type |
|
QueryCOM(java.lang.String cookie,
java.lang.String queryString,
boolean useQueryEx)
See http://desktop.google.com/queryapi.html#queryobjects and http://desktop.google.com/queryapi.html#queryex |
Method Summary | |
---|---|
IJGDResultsIterator |
execute()
|
QueryResultSet |
execute(int start,
int length)
See http://desktop.google.com/queryapi.html#querynative Executes the query defined by the current cookie, queryString and useQueryEx |
private QueryResultItem |
generateResultItem(int i,
com.jacob.com.Variant searchResultEntryVariant)
|
java.lang.String |
getCategory()
See http://desktop.google.com/queryapi.html#queryobjects |
protected static com.jacob.com.Variant |
getProperty(com.jacob.activeX.ActiveXComponent searchResultEntry,
java.lang.String propertyName)
See http://desktop.google.com/queryapi.html#individualresult |
java.lang.String |
getQueryString()
|
int |
getRanking()
|
boolean |
isAsync()
See http://desktop.google.com/queryapi.html#queryex |
boolean |
isFilterDuplicates()
See http://desktop.google.com/queryapi.html#queryex |
boolean |
isMatchAllTerms()
See http://desktop.google.com/queryapi.html#queryex |
void |
setAsync(boolean async)
See http://desktop.google.com/queryapi.html#queryex |
void |
setCategory(java.lang.String category)
See http://desktop.google.com/queryapi.html#queryobjects |
void |
setFilterByJournal()
|
void |
setFilterDuplicates(boolean filterDuplicates)
See http://desktop.google.com/queryapi.html#queryex |
void |
setMatchAllTerms(boolean matchAllTerms)
See http://desktop.google.com/queryapi.html#queryex |
protected void |
setProperty(com.jacob.activeX.ActiveXComponent queryEx,
java.lang.String propertyName,
boolean propertyValue)
See http://desktop.google.com/queryapi.html#queryex |
void |
setQueryString(java.lang.String queryString)
|
void |
setRanking(int ranking)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
public static final boolean QUERY
public static final boolean QUERY_EX
private static final java.lang.String[] MIN_GD_PROPERTIES
private boolean async
private boolean filterDuplicates
private boolean matchAllTerms
private java.lang.String category
private int ranking
private java.lang.String cookie
private com.jacob.com.Variant cookieVariant
private java.lang.String queryString
private boolean useQueryEx
JGDRegister register
Constructor Detail |
---|
public QueryCOM(java.lang.String queryString) throws JGDError
JGDError
public QueryCOM(java.lang.String cookie, java.lang.String queryString) throws JGDError
JGDError
protector.test.arne.gd.Query(String,String,boolean)
public QueryCOM(java.lang.String cookie, java.lang.String queryString, boolean useQueryEx) throws JGDError
cookie
- The cookie returned when registering the query-component in GDqueryString
- the query to be executed within GDuseQueryEx
- if true use QueryEx query-type. If false use Query query-type
JGDError
Method Detail |
---|
public IJGDResultsIterator execute()
public QueryResultSet execute(int start, int length)
Important: Note that if you are using q Query -object, or a QueryEx
-object with async=true then you can't get the correct value of the count
-attribute until the query is done executing. You can probably know when
you can read the count -attribute using the ready_state -attribute, but
that is an exercise left for the reader ;-)
private QueryResultItem generateResultItem(int i, com.jacob.com.Variant searchResultEntryVariant)
protected void setProperty(com.jacob.activeX.ActiveXComponent queryEx, java.lang.String propertyName, boolean propertyValue)
protected static com.jacob.com.Variant getProperty(com.jacob.activeX.ActiveXComponent searchResultEntry, java.lang.String propertyName)
public boolean isAsync()
public void setAsync(boolean async)
public boolean isFilterDuplicates()
public void setFilterDuplicates(boolean filterDuplicates)
public boolean isMatchAllTerms()
public void setMatchAllTerms(boolean matchAllTerms)
public void setFilterByJournal()
setCategory(String)
public java.lang.String getCategory()
public void setCategory(java.lang.String category)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getQueryString()
public void setQueryString(java.lang.String queryString)
queryString
- the queryString to setpublic int getRanking()
public void setRanking(int ranking)
ranking
- the ranking to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |