Modifier and Type | Class and Description |
---|---|
static class |
GmAttributes.GmAttribute
The information defining an attribute, as contained by the gm:attribute
element in the itemtypes feed.
|
Constructor and Description |
---|
GmAttributes() |
Modifier and Type | Method and Description |
---|---|
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(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.
|
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 releasename
- attribute nametype
- attribute type, may be nulljava.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
definedjava.lang.NullPointerException
- if name is nulljava.lang.IllegalArgumentException
- if an attribute with the same name and
type has already been addedpublic void generate(XmlWriter w, ExtensionProfile extProfile) throws 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 attributesParseException
- when an unexpected tag or badly-formatted
XML is detectedjava.io.IOException