com.google.gdata.model.atompub
Class Categories

java.lang.Object
  extended by com.google.gdata.model.Element
      extended by com.google.gdata.model.atompub.Categories

public class Categories
extends Element

Value of the app:categories tag.


Nested Class Summary
static class Categories.Fixed
          Indicates whether the list of categories is a fixed or an open set.
 
Field Summary
static AttributeKey<Categories.Fixed> FIXED
          Indicates whether the list of categories is a fixed or an open set.
static AttributeKey<java.lang.String> HREF
          An IRI reference to a Category Document.
static ElementKey<java.lang.Void,Categories> KEY
          The key for this element.
static AttributeKey<java.lang.String> SCHEME
          Default scheme of the contained category elements.
 
Constructor Summary
Categories()
          Constructs an instance using the default key.
 
Method Summary
 Categories addCategory(Category category)
          Adds a new category.
 void clearCategories()
          Removes all existing category instances.
 java.util.List<Category> getCategories()
          Returns the categories.
 Categories.Fixed getFixed()
          Returns the indicates whether the list of categories is a fixed or an open set.
 java.lang.String getHref()
          Returns the an IRI reference to a Category Document.
 java.lang.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(java.lang.String href)
          Sets the an IRI reference to a Category Document.
 Categories setScheme(java.lang.String scheme)
          Sets the default scheme of the contained category elements.
 
Methods inherited from class com.google.gdata.model.Element
addElement, addElement, addElement, clear, createElement, createElement, equals, getAttributeCount, getAttributeIterator, getAttributeIterator, getAttributeValue, getAttributeValue, getDefaultKey, getElement, getElement, getElementCount, getElementId, getElementIterator, getElementIterator, getElementKey, getElements, getElements, getElementSet, getElementSet, getElementValue, getElementValue, getTextValue, getTextValue, hasAttribute, hasAttribute, hasElement, hasElement, hashCode, hasTextValue, isLocked, removeAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeElement, removeElement, removeElement, removeElement, replaceElement, resolve, resolve, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, toString, visit
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY

public static final ElementKey<java.lang.Void,Categories> KEY
The key for this element.


FIXED

public static final AttributeKey<Categories.Fixed> FIXED
Indicates whether the list of categories is a fixed or an open set.


HREF

public static final AttributeKey<java.lang.String> HREF
An IRI reference to a Category Document.


SCHEME

public static final AttributeKey<java.lang.String> SCHEME
Default scheme of the contained category elements.

Constructor Detail

Categories

public Categories()
Constructs an instance using the default key.

Method Detail

registerMetadata

public static void registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.


lock

public Categories lock()
Description copied from class: Element
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.

Overrides:
lock in class Element

getCategories

public java.util.List<Category> getCategories()
Returns the categories.

Returns:
categories

addCategory

public Categories addCategory(Category category)
Adds a new category.

Parameters:
category - category

removeCategory

public boolean removeCategory(Category category)
Removes an existing category.

Parameters:
category - category
Returns:
true if the category was removed

clearCategories

public void clearCategories()
Removes all existing category instances.


hasCategories

public boolean hasCategories()
Returns whether it has the categories.

Returns:
whether it has the categories

getFixed

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

setFixed

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

hasFixed

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

getHref

public java.lang.String getHref()
Returns the an IRI reference to a Category Document.

Returns:
an IRI reference to a Category Document

setHref

public Categories setHref(java.lang.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

hasHref

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

getScheme

public java.lang.String getScheme()
Returns the default scheme of the contained category elements.

Returns:
default scheme of the contained category elements

setScheme

public Categories setScheme(java.lang.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

hasScheme

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