public class

Review

extends AbstractExtension
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.books.Review

Class Overview

User-provided review.

Summary

Constants
String LANG XML "xml:lang" attribute name
String TYPE XML "type" attribute name
String XML_NAME XML element name
Fields
private String lang Language of link title
private String type Type of text construct (typically 'text', 'html' or 'xhtml')
private String value Text content of the review
[Expand]
Inherited Fields
From class com.google.gdata.data.AbstractExtension
Public Constructors
Review()
Default mutable constructor.
Review(String lang, String type, String value)
Immutable constructor.
Public Methods
boolean equals(Object obj)
static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable)
Returns the extension description, specifying whether it is required, and whether it is repeatable.
String getLang()
Returns the language of link title.
String getType()
Returns the type of text construct (typically 'text', 'html' or 'xhtml').
String getValue()
Returns the text content of the review.
boolean hasLang()
Returns whether it has the language of link title.
boolean hasType()
Returns whether it has the type of text construct (typically 'text', 'html' or 'xhtml').
boolean hasValue()
Returns whether it has the text content of the review.
int hashCode()
void setLang(String lang)
Sets the language of link title.
void setType(String type)
Sets the type of text construct (typically 'text', 'html' or 'xhtml').
void setValue(String value)
Sets the text content of the review.
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.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension

Constants

private static final String LANG

XML "xml:lang" attribute name

Constant Value: "xml:lang"

private static final String TYPE

XML "type" attribute name

Constant Value: "type"

static final String XML_NAME

XML element name

Constant Value: "review"

Fields

private String lang

Language of link title

private String type

Type of text construct (typically 'text', 'html' or 'xhtml')

private String value

Text content of the review

Public Constructors

public Review ()

Default mutable constructor.

public Review (String lang, String type, String value)

Immutable constructor.

Parameters
lang Language of link title.
type Type of text construct (typically 'text', 'html' or 'xhtml').
value Text content of the review.

Public Methods

public boolean equals (Object obj)

Parameters
obj

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 getLang ()

Returns the language of link title.

Returns
  • language of link title

public String getType ()

Returns the type of text construct (typically 'text', 'html' or 'xhtml').

Returns
  • type of text construct (typically 'text', 'html' or 'xhtml')

public String getValue ()

Returns the text content of the review.

Returns
  • text content of the review

public boolean hasLang ()

Returns whether it has the language of link title.

Returns
  • whether it has the language of link title

public boolean hasType ()

Returns whether it has the type of text construct (typically 'text', 'html' or 'xhtml').

Returns
  • whether it has the type of text construct (typically 'text', 'html' or 'xhtml')

public boolean hasValue ()

Returns whether it has the text content of the review.

Returns
  • whether it has the text content of the review

public int hashCode ()

public void setLang (String lang)

Sets the language of link title.

Parameters
lang Language of link title or null to reset

public void setType (String type)

Sets the type of text construct (typically 'text', 'html' or 'xhtml').

Parameters
type Type of text construct (typically 'text', 'html' or 'xhtml') or null to reset

public void setValue (String value)

Sets the text content of the review.

Parameters
value Text content of the review 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.