| 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(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.
|
List<GoogleBaseAttributeId> |
getAttributeIds()
Deprecated.
use
getAttributes() instead. |
Collection<GmAttributes.GmAttribute> |
getAttributes()
Gets an unmodifiable collection of GmAttribute objects.
|
XmlParser.ElementHandler |
getHandler(ExtensionProfile extProfile,
String namespace,
String localName,
Attributes attrs)
Creates a parser for this tag.
|
public List<GoogleBaseAttributeId> getAttributeIds()
getAttributes() instead.public Collection<GmAttributes.GmAttribute> getAttributes()
public void addAttribute(String name, GoogleBaseAttributeType type)
addAttribute(GoogleBaseAttributeId, GmAttribute.Importance)
instead. This method will be removed in a future releasename - attribute nametype - attribute type, may be nullNullPointerException - 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
definedNullPointerException - if name is nullIllegalArgumentException - if an attribute with the same name and
type has already been addedpublic void generate(XmlWriter w, ExtensionProfile extProfile) throws IOException
generate in interface Extensionw - XML writerextProfile - extension profileIOExceptionpublic XmlParser.ElementHandler getHandler(ExtensionProfile extProfile, String namespace, String localName, Attributes attrs) throws ParseException, IOException
getHandler in interface ExtensionextProfile - extension profilenamespace - extension namespacelocalName - tag name, without the namespace prefixattrs - tag attributesParseException - when an unexpected tag or badly-formatted
XML is detectedIOExceptionCopyright © 2012. All Rights Reserved.