public class

Categories

extends Element
java.lang.Object
   ↳ com.google.gdata.model.Element
     ↳ com.google.gdata.model.atompub.Categories

Class Overview

Value of the app:categories tag.

Summary

Nested Classes
enum Categories.Fixed Indicates whether the list of categories is a fixed or an open set. 
Fields
public static final AttributeKey<Categories.Fixed> FIXED Indicates whether the list of categories is a fixed or an open set.
public static final AttributeKey<String> HREF An IRI reference to a Category Document.
public static final ElementKey<Void, Categories> KEY The key for this element.
public static final AttributeKey<String> SCHEME Default scheme of the contained category elements.
[Expand]
Inherited Fields
From class com.google.gdata.model.Element
Public Constructors
Categories()
Constructs an instance using the default key.
Protected Constructors
Categories(ElementKey<?, ? extends Categories> key)
Subclass constructor, allows subclasses to supply their own element key.
Categories(ElementKey<?, ? extends Categories> key, Element source)
Constructs a new instance by doing a shallow copy of data from an existing Element instance.
Public Methods
Categories addCategory(Category category)
Adds a new category.
void clearCategories()
Removes all existing category instances.
List<Category> getCategories()
Returns the categories.
Categories.Fixed getFixed()
Returns the indicates whether the list of categories is a fixed or an open set.
String getHref()
Returns the an IRI reference to a Category Document.
String getScheme()
Returns the default scheme of the contained category elements.
boolean hasCategories()
Returns whether it has the categories.
boolean hasFixed()
Returns whether it has the indicates whether the list of categories is a fixed or an open set.
boolean hasHref()
Returns whether it has the an IRI reference to a Category Document.
boolean hasScheme()
Returns whether it has the default scheme of the contained category elements.
Categories lock()
Locks this element.
static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.
boolean removeCategory(Category category)
Removes an existing category.
Categories setFixed(Categories.Fixed fixed)
Sets the indicates whether the list of categories is a fixed or an open set.
Categories setHref(String href)
Sets the an IRI reference to a Category Document.
Categories setScheme(String scheme)
Sets the default scheme of the contained category elements.
[Expand]
Inherited Methods
From class com.google.gdata.model.Element
From class java.lang.Object

Fields

public static final AttributeKey<Categories.Fixed> FIXED

Indicates whether the list of categories is a fixed or an open set.

public static final AttributeKey<String> HREF

An IRI reference to a Category Document.

public static final ElementKey<Void, Categories> KEY

The key for this element.

public static final AttributeKey<String> SCHEME

Default scheme of the contained category elements.

Public Constructors

public Categories ()

Constructs an instance using the default key.

Protected Constructors

protected Categories (ElementKey<?, ? extends Categories> key)

Subclass constructor, allows subclasses to supply their own element key.

Parameters
key

protected Categories (ElementKey<?, ? extends Categories> key, Element source)

Constructs a new instance by doing a shallow copy of data from an existing Element instance. Will use the given ElementKey as the key for the element. This constructor is used when adapting from one element key to another. You cannot call this constructor directly, instead use createElement(ElementKey, Element).

Parameters
key The key to use for this element.
source Source element

Public Methods

public Categories addCategory (Category category)

Adds a new category.

Parameters
category Category

public void clearCategories ()

Removes all existing category instances.

public List<Category> getCategories ()

Returns the categories.

Returns
  • categories

public Categories.Fixed getFixed ()

Returns the indicates whether the list of categories is a fixed or an open set.

Returns
  • indicates whether the list of categories is a fixed or an open set

public String getHref ()

Returns the an IRI reference to a Category Document.

Returns
  • an IRI reference to a Category Document

public String getScheme ()

Returns the default scheme of the contained category elements.

Returns
  • default scheme of the contained category elements

public boolean hasCategories ()

Returns whether it has the categories.

Returns
  • whether it has the categories

public boolean hasFixed ()

Returns whether it has the indicates whether the list of categories is a fixed or an open set.

Returns
  • whether it has the indicates whether the list of categories is a fixed or an open set

public boolean hasHref ()

Returns whether it has the an IRI reference to a Category Document.

Returns
  • whether it has the an IRI reference to a Category Document

public boolean hasScheme ()

Returns whether it has the default scheme of the contained category elements.

Returns
  • whether it has the default scheme of the contained category elements

public Categories lock ()

Locks this element. A locked element cannot have any changes made to its content or its attributes or child elements. This will also lock all attributes and child elements as well. Once this method has been called, this element can be safely published to other threads.

public static void registerMetadata (MetadataRegistry registry)

Registers the metadata for this element.

Parameters
registry

public boolean removeCategory (Category category)

Removes an existing category.

Parameters
category Category
Returns
  • true if the category was removed

public Categories setFixed (Categories.Fixed fixed)

Sets the indicates whether the list of categories is a fixed or an open set.

Parameters
fixed Indicates whether the list of categories is a fixed or an open set or null to reset
Returns
  • this to enable chaining setters

public Categories setHref (String href)

Sets the an IRI reference to a Category Document.

Parameters
href An IRI reference to a Category Document or null to reset
Returns
  • this to enable chaining setters

public Categories setScheme (String scheme)

Sets the default scheme of the contained category elements.

Parameters
scheme Default scheme of the contained category elements or null to reset
Returns
  • this to enable chaining setters