public static class

Query.CategoryFilter

extends Object
java.lang.Object
   ↳ com.google.gdata.client.Query.CategoryFilter

Class Overview

The CategoryFilter class is used to define sets of category conditions that must be met in order for an entry to match.

The CategoryFilter can contain multiple category criteria (inclusive or exclusive). If it does contain multiple categories, then the query matches if any one of the category filter criteria is met, i.e. it is a logical 'OR' of the contained category criteria. To match, an entry must contain at least one included category or must not contain at least one excluded category.

It is also possible to add multiple CategoryFilters to a Query. In this case, each individual CategoryFilter must be true for an entry to match, i.e. it is a logical 'AND' of all CategoryFilters.

Summary

Fields
private final List<ICategory> categories List of categories that returned entries must match.
private final List<ICategory> excludeCategories List of categories that returned entries must match.
Public Constructors
Query.CategoryFilter()
Creates an empty category filter.
Query.CategoryFilter(List<ICategory> included, List<ICategory> excluded)
Creates a new category filter using the supplied inclusion and exclusion lists.
Query.CategoryFilter(ICategory category)
Creates a simple category filter containing only a single ICategory.
Public Methods
void addCategory(ICategory category)
Adds a new ICategory to the query, indicating that entries containing the category should be considered to match.
void addExcludeCategory(ICategory category)
Adds a new ICategory to the query, indicating that entries that do not contain the category should be considered to match.
List<ICategory> getCategories()
List<ICategory> getExcludeCategories()
String toString()
Returns a string representation for the category conditions in the CategoryFilter, in the format used by a Query URI.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private final List<ICategory> categories

List of categories that returned entries must match.

private final List<ICategory> excludeCategories

List of categories that returned entries must match.

Public Constructors

public Query.CategoryFilter ()

Creates an empty category filter.

public Query.CategoryFilter (List<ICategory> included, List<ICategory> excluded)

Creates a new category filter using the supplied inclusion and exclusion lists. A null value for either is equivalent to an empty list.

Parameters
included
excluded

public Query.CategoryFilter (ICategory category)

Creates a simple category filter containing only a single ICategory.

Parameters
category An initial category to add to the filter.

Public Methods

public void addCategory (ICategory category)

Adds a new ICategory to the query, indicating that entries containing the category should be considered to match.

Parameters
category The category to add to query parameters.

public void addExcludeCategory (ICategory category)

Adds a new ICategory to the query, indicating that entries that do not contain the category should be considered to match.

Parameters
category The category to add to query parameters.

public List<ICategory> getCategories ()

public List<ICategory> getExcludeCategories ()

public String toString ()

Returns a string representation for the category conditions in the CategoryFilter, in the format used by a Query URI.