Google Data APIs Client Library (1.41.1)



com.google.api.gbase.client
Class GoogleBaseQuery

java.lang.Object
  extended by com.google.gdata.client.Query
      extended by com.google.api.gbase.client.GoogleBaseQuery

public class GoogleBaseQuery
extends Query

Adds support for the "bq" and "max-values" parameters to a gdata query. Query.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gdata.client.Query
Query.CategoryFilter, Query.CustomParameter, Query.ResultFormat
 
Field Summary
 
Fields inherited from class com.google.gdata.client.Query
UNDEFINED
 
Constructor Summary
GoogleBaseQuery(java.net.URL feedUrl)
          Creates a Google Base query.
 
Method Summary
 java.lang.String getContent()
          Gets what will be returned, on the customer feed.
 java.lang.String getCrowdBy()
          Gets the criteria that will be used to crowd the results.
 java.lang.String getGoogleBaseQuery()
          Gets the Google Base query that will be executed.
 java.lang.Integer getMaxValues()
          Gets the current value for the max-values parameter.
 java.lang.String getOrderBy()
          Gets the criteria that will be used to sort the results.
 boolean getRefine()
          Checks whether the query should be refined.
 boolean isAscendingOrder()
          Checks whether the results will be returned in ascending order.
 void setAscendingOrder(boolean ascending)
          Changes the order in which results are returned (ascending or descending).
 void setContent(java.lang.String content)
          Selects what to return, on the customer feed.
 void setCrowdingBy(java.lang.String crowdBy)
          Sets the criteria used for crowding the results in groups.
 void setGoogleBaseQuery(java.lang.String query)
          Sets the Google Base query to execute.
 void setMaxValues(java.lang.Integer maxValues)
          Sets the max-values parameter used by histogram feeds to limit the number of unique values to return for one attribute.
 void setOrderBy(java.lang.String orderBy)
          Sets the criteria used to sort the results.
 void setRefine(boolean refine)
          Enables query refinement.
 
Methods inherited from class com.google.gdata.client.Query
addCategoryFilter, addCustomParameter, appendQueryParameter, getAuthor, getCategoryFilters, getCustomParameters, getCustomParameters, getFeedUrl, getFields, getFullTextQuery, getIntegerCustomParameter, getMaxResults, getPublishedMax, getPublishedMin, getQueryUri, getResultFormat, getStartIndex, getStringCustomParameter, getUpdatedMax, getUpdatedMin, getUrl, isStrict, isValidState, setAuthor, setFields, setFullTextQuery, setIntegerCustomParameter, setMaxResults, setPublishedMax, setPublishedMin, setResultFormat, setStartIndex, setStrict, setStringCustomParameter, setUpdatedMax, setUpdatedMin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GoogleBaseQuery

public GoogleBaseQuery(java.net.URL feedUrl)
Creates a Google Base query.

Parameters:
feedUrl - the URL to connect to
Method Detail

setGoogleBaseQuery

public void setGoogleBaseQuery(java.lang.String query)
Sets the Google Base query to execute. When running queries on Google Base, you have a choice between a Google Base query, which will be interpreted and executed strictly following the Google Base query language, and a Fulltext query (see Query.setFullTextQuery(String)) which will be interpreted just like a query typed in the search box on the Google Base website - including some user-friendly preprocessing that might be useful or confusing depending on what you're trying to do. You cannot specify both a Google Base query and a Fulltext query.

Parameters:
query - google base query
Throws:
java.lang.IllegalStateException - if a fulltext query is already set.

getGoogleBaseQuery

public java.lang.String getGoogleBaseQuery()
Gets the Google Base query that will be executed.

Returns:
the query or null if none was set

setMaxValues

public void setMaxValues(java.lang.Integer maxValues)
Sets the max-values parameter used by histogram feeds to limit the number of unique values to return for one attribute.

Parameters:
maxValues -

getMaxValues

public java.lang.Integer getMaxValues()
Gets the current value for the max-values parameter.

Returns:
current value or null

setRefine

public void setRefine(boolean refine)
Enables query refinement. By default results are not refined.

Parameters:
refine - true to enable query refinment

getRefine

public boolean getRefine()
Checks whether the query should be refined.

Returns:
true if the query should be refined

setContent

public void setContent(java.lang.String content)
Selects what to return, on the customer feed.

Parameters:
content - what should be returned (see documentation)

getContent

public java.lang.String getContent()
Gets what will be returned, on the customer feed.

Returns:
what will be returned

setOrderBy

public void setOrderBy(java.lang.String orderBy)
Sets the criteria used to sort the results. By default results are ordered by relevancy.

Parameters:
orderBy - sorting criteria (see documentation)

setCrowdingBy

public void setCrowdingBy(java.lang.String crowdBy)
Sets the criteria used for crowding the results in groups.

Parameters:
crowdBy - crowding criteria (see documentation)

getOrderBy

public java.lang.String getOrderBy()
Gets the criteria that will be used to sort the results.

Returns:
criteria or null if no order has been set

getCrowdBy

public java.lang.String getCrowdBy()
Gets the criteria that will be used to crowd the results.

Returns:
criteria or null if no crowding has been set

setAscendingOrder

public void setAscendingOrder(boolean ascending)
Changes the order in which results are returned (ascending or descending). Descending order (from the largest value to the smallest value) is the default.

Parameters:
ascending - if true, return the result in ascending order

isAscendingOrder

public boolean isAscendingOrder()
Checks whether the results will be returned in ascending order.

Returns:
if true, the results will be returned in ascending order, otherwise they will be returned in descending order