|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.data.AbstractExtension
com.google.gdata.data.ExtensionPoint
com.google.gdata.data.extensions.Rating
public class Rating
GData schema extension describing an object's rating.
Nested Class Summary | |
---|---|
static class |
Rating.Rel
Rating type. |
Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint |
---|
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler |
Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension |
---|
AbstractExtension.AttributesHandler |
Field Summary | |
---|---|
protected java.lang.Float |
average
Average ratings, output with a fixed a 2 digit precision. |
protected java.lang.Integer |
max
Maximum rating value on rating scale (optional). |
protected java.lang.Integer |
min
Minimum rating value on rating scale (optional). |
protected java.lang.Integer |
numRaters
Number of ratings that was taken into account (for average ratings). |
protected java.lang.Integer |
rating
Rating value (required). |
protected java.lang.String |
rel
Rating type. |
Fields inherited from class com.google.gdata.data.ExtensionPoint |
---|
xmlBlob |
Fields inherited from class com.google.gdata.data.AbstractExtension |
---|
localName, namespace |
Constructor Summary | |
---|---|
Rating()
Constructs an empty Rating . |
|
Rating(java.lang.Integer rating)
Constructs a Rating class with a specified rating. |
Method Summary | |
---|---|
void |
generate(com.google.gdata.util.common.xml.XmlWriter w,
ExtensionProfile extProfile)
Generates an XML representation for the extension. |
java.lang.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,
java.lang.String namespace,
java.lang.String localName,
org.xml.sax.Attributes attrs)
The default implementation uses the AbstractExtension.AttributesHandler to handle
parsing the extension. |
java.lang.Integer |
getMax()
|
java.lang.Integer |
getMin()
|
java.lang.Integer |
getNumRaters()
|
java.lang.String |
getRel()
|
java.lang.Integer |
getValue()
|
void |
setAverage(java.lang.Float r)
|
void |
setMax(java.lang.Integer r)
|
void |
setMin(java.lang.Integer r)
|
void |
setNumRaters(java.lang.Integer r)
|
void |
setRel(java.lang.String v)
|
void |
setValue(java.lang.Integer r)
|
Methods inherited from class com.google.gdata.data.AbstractExtension |
---|
consumeAttributes, disableStrictValidation, enableStrictValidation, eq, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String rel
protected java.lang.Integer rating
protected java.lang.Integer min
protected java.lang.Integer max
protected java.lang.Integer numRaters
protected java.lang.Float average
Constructor Detail |
---|
public Rating()
Rating
.
public Rating(java.lang.Integer rating)
Rating
class with a specified rating.
rating
- the value of the ratingMethod Detail |
---|
public java.lang.String getRel()
public void setRel(java.lang.String v)
public java.lang.Integer getValue()
public void setValue(java.lang.Integer r)
public java.lang.Integer getMin()
public void setMin(java.lang.Integer r)
public java.lang.Integer getMax()
public void setMax(java.lang.Integer r)
public java.lang.Integer getNumRaters()
public void setNumRaters(java.lang.Integer r)
public java.lang.Float getAverage()
public void setAverage(java.lang.Float r)
public static ExtensionDescription getDefaultDescription(boolean repeatable)
public static ExtensionDescription getDefaultDescription()
public void generate(com.google.gdata.util.common.xml.XmlWriter w, ExtensionProfile extProfile) throws java.io.IOException
Extension
generate
in interface Extension
generate
in class AbstractExtension
w
- XML writerextProfile
- extension profile
java.io.IOException
public XmlParser.ElementHandler getHandler(ExtensionProfile extProfile, java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs)
AbstractExtension
AbstractExtension.AttributesHandler
to handle
parsing the extension.
getHandler
in interface Extension
getHandler
in class ExtensionPoint
extProfile
- extension profilenamespace
- extension namespacelocalName
- tag name, without the namespace prefixattrs
- tag attributes
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |