public class

GoogleBaseQuery

extends Query
java.lang.Object
   ↳ com.google.gdata.client.Query
     ↳ com.google.api.gbase.client.GoogleBaseQuery

Class Overview

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

Summary

Constants
String BQ_PARAMETER
String CONTENT
String CROWD_BY
String MAX_VALUES_PARAMETER
String ORDER_BY
String REFINE
String SORT_ORDER
[Expand]
Inherited Constants
From class com.google.gdata.client.Query
[Expand]
Inherited Fields
From class com.google.gdata.client.Query
Public Constructors
GoogleBaseQuery(URL feedUrl)
Creates a Google Base query.
Public Methods
String getContent()
Gets what will be returned, on the customer feed.
String getCrowdBy()
Gets the criteria that will be used to crowd the results.
String getGoogleBaseQuery()
Gets the Google Base query that will be executed.
Integer getMaxValues()
Gets the current value for the max-values parameter.
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(String content)
Selects what to return, on the customer feed.
void setCrowdingBy(String crowdBy)
Sets the criteria used for crowding the results in groups.
void setGoogleBaseQuery(String query)
Sets the Google Base query to execute.
void setMaxValues(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(String orderBy)
Sets the criteria used to sort the results.
void setRefine(boolean refine)
Enables query refinement.
[Expand]
Inherited Methods
From class com.google.gdata.client.Query
From class java.lang.Object

Constants

private static final String BQ_PARAMETER

Constant Value: "bq"

private static final String CONTENT

Constant Value: "content"

private static final String CROWD_BY

Constant Value: "crowdby"

private static final String MAX_VALUES_PARAMETER

Constant Value: "max-values"

private static final String ORDER_BY

Constant Value: "orderby"

private static final String REFINE

Constant Value: "refine"

private static final String SORT_ORDER

Constant Value: "sortorder"

Public Constructors

public GoogleBaseQuery (URL feedUrl)

Creates a Google Base query.

Parameters
feedUrl The URL to connect to

Public Methods

public String getContent ()

Gets what will be returned, on the customer feed.

Returns
  • what will be returned

public String getCrowdBy ()

Gets the criteria that will be used to crowd the results.

Returns
  • criteria or null if no crowding has been set

public String getGoogleBaseQuery ()

Gets the Google Base query that will be executed.

Returns
  • the query or null if none was set

public Integer getMaxValues ()

Gets the current value for the max-values parameter.

Returns
  • current value or null

public String getOrderBy ()

Gets the criteria that will be used to sort the results.

Returns
  • criteria or null if no order has been set

public boolean getRefine ()

Checks whether the query should be refined.

Returns
  • true if the query should be refined

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

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

public void setContent (String content)

Selects what to return, on the customer feed.

Parameters
content What should be returned (see documentation)

public void setCrowdingBy (String crowdBy)

Sets the criteria used for crowding the results in groups.

Parameters
crowdBy Crowding criteria (see documentation)

public void setGoogleBaseQuery (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 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
IllegalStateException if a fulltext query is already set.

public void setMaxValues (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

public void setOrderBy (String orderBy)

Sets the criteria used to sort the results. By default results are ordered by relevancy.

Parameters
orderBy Sorting criteria (see documentation)

public void setRefine (boolean refine)

Enables query refinement. By default results are not refined.

Parameters
refine True to enable query refinment