public class

AdditionalRoleSet

extends ExtensionPoint
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.docs.AdditionalRoleSet

Class Overview

A set of valid additional roles for a primary role within a document type.

Summary

Constants
String PRIMARYROLE XML "primaryRole" attribute name
String XML_NAME XML element name
Fields
private String primaryRole PrimaryRole
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
AdditionalRoleSet()
Default mutable constructor.
AdditionalRoleSet(String primaryRole)
Immutable constructor.
Public Methods
void addAdditionalRole(AdditionalRole additionalRole)
Adds a new additional role.
void declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
List<AdditionalRole> getAdditionalRoles()
Returns the additional roles.
static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable)
Returns the extension description, specifying whether it is required, and whether it is repeatable.
String getPrimaryRole()
Returns the primaryRole.
boolean hasAdditionalRoles()
Returns whether it has the additional roles.
boolean hasPrimaryRole()
Returns whether it has the primaryRole.
void setPrimaryRole(String primaryRole)
Sets the primaryRole.
String toString()
Protected Methods
void consumeAttributes(AttributeHelper helper)
Consumes attributes from the attribute helper.
void putAttributes(AttributeGenerator generator)
Puts attributes into the attribute generator.
void validate()
Checks the attributes to see if there are any problems.
[Expand]
Inherited Methods
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension

Constants

private static final String PRIMARYROLE

XML "primaryRole" attribute name

Constant Value: "primaryRole"

static final String XML_NAME

XML element name

Constant Value: "additionalRoleSet"

Fields

private String primaryRole

PrimaryRole

Public Constructors

public AdditionalRoleSet ()

Default mutable constructor.

public AdditionalRoleSet (String primaryRole)

Immutable constructor.

Parameters
primaryRole PrimaryRole.

Public Methods

public void addAdditionalRole (AdditionalRole additionalRole)

Adds a new additional role.

Parameters
additionalRole Additional role

public void declareExtensions (ExtensionProfile extProfile)

Declares the set of expected Extension types for an ExtensionPoint within the target extension profile. The base implementation does not declare any extensions, but can be overridden by specific types of ExtensionPoints that always contain a well-defined set of extensions.

Parameters
extProfile The ExtensionProfile to initialize.

public List<AdditionalRole> getAdditionalRoles ()

Returns the additional roles.

Returns
  • additional roles

public static ExtensionDescription getDefaultDescription (boolean required, boolean repeatable)

Returns the extension description, specifying whether it is required, and whether it is repeatable.

Parameters
required Whether it is required
repeatable Whether it is repeatable
Returns
  • extension description

public String getPrimaryRole ()

Returns the primaryRole.

Returns
  • primaryRole

public boolean hasAdditionalRoles ()

Returns whether it has the additional roles.

Returns
  • whether it has the additional roles

public boolean hasPrimaryRole ()

Returns whether it has the primaryRole.

Returns
  • whether it has the primaryRole

public void setPrimaryRole (String primaryRole)

Sets the primaryRole.

Parameters
primaryRole PrimaryRole or null to reset

public String toString ()

Protected Methods

protected void consumeAttributes (AttributeHelper helper)

Consumes attributes from the attribute helper. May also use consumeContent(boolean) to consume the element's text content. Called from getHandler(ExtensionProfile, String, String, Attributes). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
helper Attribute helper

protected void putAttributes (AttributeGenerator generator)

Puts attributes into the attribute generator. Called from generate(XmlWriter, ExtensionProfile). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
generator Attribute generator

protected void validate ()

Checks the attributes to see if there are any problems. Default implementation does nothing, though generally this is discouraged unless there really are no restrictions.