FileDocCategorySizeDatePackage
XmlGroupEntryGDataSerializer.javaAPI DocAndroid 1.5 API1854Wed May 06 22:41:16 BST 2009com.google.wireless.gdata.contacts.serializer.xml

XmlGroupEntryGDataSerializer

public class XmlGroupEntryGDataSerializer extends com.google.wireless.gdata.serializer.xml.XmlEntryGDataSerializer
Serializes Google Contact Group entries into the Atom XML format.

Fields Summary
Constructors Summary
public XmlGroupEntryGDataSerializer(com.google.wireless.gdata.parser.xml.XmlParserFactory factory, com.google.wireless.gdata.contacts.data.GroupEntry entry)

    super(factory, entry);
  
Methods Summary
protected voiddeclareExtraEntryNamespaces(org.xmlpull.v1.XmlSerializer serializer)

    super.declareExtraEntryNamespaces(serializer);
    serializer.setPrefix(XmlContactsGDataParser.NAMESPACE_CONTACTS,
        XmlContactsGDataParser.NAMESPACE_CONTACTS_URI);
  
protected com.google.wireless.gdata.contacts.data.GroupEntrygetGroupEntry()

    return (GroupEntry) getEntry();
  
protected voidserializeExtraEntryContents(org.xmlpull.v1.XmlSerializer serializer, int format)

    GroupEntry entry = getGroupEntry();
    entry.validate();

    serializeSystemGroup(entry, serializer);
  
private voidserializeSystemGroup(com.google.wireless.gdata.contacts.data.GroupEntry entry, org.xmlpull.v1.XmlSerializer serializer)

    final String systemGroup = entry.getSystemGroup();
    if (!StringUtils.isEmpty(systemGroup)) {
      serializer.startTag(null /* ns */, "systemGroup");
      serializer.attribute(null /* ns */, "id", systemGroup);
      serializer.endTag(null /* ns */, "systemGroup");
    }