public class

Rating

extends ExtensionPoint
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.extensions.Rating

Class Overview

GData schema extension describing an object's rating.

Summary

Nested Classes
class Rating.Rel Rating type. 
Fields
protected Float average Average ratings, output with a fixed a 2 digit precision.
protected Integer max Maximum rating value on rating scale (optional).
protected Integer min Minimum rating value on rating scale (optional).
protected Integer numRaters Number of ratings that was taken into account (for average ratings).
protected Integer rating Rating value (required).
protected String rel Rating type.
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
Rating()
Constructs an empty Rating.
Rating(Integer rating)
Constructs a Rating class with a specified rating.
Public Methods
void generate(XmlWriter w, ExtensionProfile extProfile)
Generates an XML representation for the extension.
Float getAverage()
static ExtensionDescription getDefaultDescription()
Returns the suggested extension description and is repeatable.
static ExtensionDescription getDefaultDescription(boolean repeatable)
Returns the suggested extension description with configurable repeatability.
XmlParser.ElementHandler getHandler(ExtensionProfile extProfile, String namespace, String localName, Attributes attrs)
The default implementation uses the AbstractExtension.AttributesHandler to handle parsing the extension.
Integer getMax()
Integer getMin()
Integer getNumRaters()
String getRel()
Integer getValue()
void setAverage(Float r)
void setMax(Integer r)
void setMin(Integer r)
void setNumRaters(Integer r)
void setRel(String v)
void setValue(Integer r)
[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

Fields

protected Float average

Average ratings, output with a fixed a 2 digit precision.

protected Integer max

Maximum rating value on rating scale (optional).

protected Integer min

Minimum rating value on rating scale (optional).

protected Integer numRaters

Number of ratings that was taken into account (for average ratings).

protected Integer rating

Rating value (required).

protected String rel

Rating type.

Public Constructors

public Rating ()

Constructs an empty Rating.

public Rating (Integer rating)

Constructs a Rating class with a specified rating.

Parameters
rating The value of the rating

Public Methods

public void generate (XmlWriter w, ExtensionProfile extProfile)

Generates an XML representation for the extension.

Parameters
w XML writer
extProfile Extension profile
Throws
IOException

public Float getAverage ()

public static ExtensionDescription getDefaultDescription ()

Returns the suggested extension description and is repeatable.

public static ExtensionDescription getDefaultDescription (boolean repeatable)

Returns the suggested extension description with configurable repeatability.

Parameters
repeatable

public XmlParser.ElementHandler getHandler (ExtensionProfile extProfile, String namespace, String localName, Attributes attrs)

The default implementation uses the AbstractExtension.AttributesHandler to handle parsing the extension.

Parameters
extProfile Extension profile
namespace Extension namespace
localName Tag name, without the namespace prefix
attrs Tag attributes
Returns
  • an element handler

public Integer getMax ()

public Integer getMin ()

public Integer getNumRaters ()

public String getRel ()

public Integer getValue ()

public void setAverage (Float r)

Parameters
r

public void setMax (Integer r)

Parameters
r

public void setMin (Integer r)

Parameters
r

public void setNumRaters (Integer r)

Parameters
r

public void setRel (String v)

Parameters
v

public void setValue (Integer r)

Parameters
r