|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.api.gbase.client.GmAttributes
public class GmAttributes
Java representation for the gm:attributes tag for in the itemtypes feed.
Nested Class Summary | |
---|---|
static class |
GmAttributes.GmAttribute
The information defining an attribute, as contained by the gm:attribute element in the itemtypes feed. |
Constructor Summary | |
---|---|
GmAttributes()
|
Method Summary | |
---|---|
void |
addAttribute(GoogleBaseAttributeId attributeId,
GmAttributes.GmAttribute.Importance importance)
Adds a new attribute to the list. |
void |
addAttribute(java.lang.String name,
GoogleBaseAttributeType type)
Deprecated. use addAttribute(GoogleBaseAttributeId, GmAttribute.Importance)
instead. This method will be removed in a future release |
void |
generate(com.google.gdata.util.common.xml.XmlWriter w,
ExtensionProfile extProfile)
Generate the XML representation for this tag. |
java.util.List<GoogleBaseAttributeId> |
getAttributeIds()
Deprecated. use getAttributes() instead. |
java.util.Collection<GmAttributes.GmAttribute> |
getAttributes()
Gets an unmodifiable collection of GmAttribute objects. |
XmlParser.ElementHandler |
getHandler(ExtensionProfile extProfile,
java.lang.String namespace,
java.lang.String localName,
org.xml.sax.Attributes attrs)
Creates a parser for this tag. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GmAttributes()
Method Detail |
---|
public java.util.List<GoogleBaseAttributeId> getAttributeIds()
getAttributes()
instead.
public java.util.Collection<GmAttributes.GmAttribute> getAttributes()
public void addAttribute(java.lang.String name, GoogleBaseAttributeType type)
addAttribute(GoogleBaseAttributeId, GmAttribute.Importance)
instead. This method will be removed in a future release
name
- attribute nametype
- attribute type, may be null
java.lang.NullPointerException
- if name is nullpublic void addAttribute(GoogleBaseAttributeId attributeId, GmAttributes.GmAttribute.Importance importance)
Note: The importance parameter should not be null. The current implementation allows null values for loadind old attributes persisted on client side. The null check will be enabled in a future release.
attributeId
- the id for this attributeimportance
- attribute importance, may be null if no importance is
defined
java.lang.NullPointerException
- if name is null
java.lang.IllegalArgumentException
- if an attribute with the same name and
type has already been addedpublic void generate(com.google.gdata.util.common.xml.XmlWriter w, ExtensionProfile extProfile) throws java.io.IOException
generate
in interface Extension
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) throws ParseException, java.io.IOException
getHandler
in interface Extension
extProfile
- extension profilenamespace
- extension namespacelocalName
- tag name, without the namespace prefixattrs
- tag attributes
ParseException
- when an unexpected tag or badly-formatted
XML is detected
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |