redid changes
diff --git a/src/com/google/wireless/gdata2/calendar/client/CalendarClient.java b/src/com/google/wireless/gdata2/calendar/client/CalendarClient.java
index 8bac2fa..3a25762 100644
--- a/src/com/google/wireless/gdata2/calendar/client/CalendarClient.java
+++ b/src/com/google/wireless/gdata2/calendar/client/CalendarClient.java
@@ -90,7 +90,7 @@
public GDataParser getParserForUserCalendars(String feedUrl, String authToken)
throws ParseException, IOException, HttpException {
GDataClient gDataClient = getGDataClient();
- InputStream is = gDataClient.getFeedAsStream(feedUrl, authToken);
+ InputStream is = gDataClient.getFeedAsStream(feedUrl, authToken, null /* etag */);
return getGDataParserFactory().createParser(CalendarEntry.class, is);
}
}
diff --git a/src/com/google/wireless/gdata2/client/GDataClient.java b/src/com/google/wireless/gdata2/client/GDataClient.java
index 0568f71..ef3d108 100644
--- a/src/com/google/wireless/gdata2/client/GDataClient.java
+++ b/src/com/google/wireless/gdata2/client/GDataClient.java
@@ -45,13 +45,17 @@
* @param feedUrl The feed that should be fetched.
* @param authToken The authentication token that should be used when
* fetching the feed.
+ * @param eTag The eTag associated with this request, this will
+ * cause the GET to return a 304 if the content was
+ * not modified. The parameter can be null
* @return An InputStream for the feed.
* @throws IOException Thrown if an io error occurs while communicating with
* the service.
* @throws HttpException if the service returns an error response.
*/
InputStream getFeedAsStream(String feedUrl,
- String authToken)
+ String authToken,
+ String eTag)
throws HttpException, IOException;
/**
@@ -62,12 +66,15 @@
* @param mediaEntryUrl The media entry that should be fetched.
* @param authToken The authentication token that should be used when
* fetching the media entry.
+ * @param eTag The eTag associated with this request, this will
+ * cause the GET to return a 304 if the content was
+ * not modified.
* @return An InputStream for the media entry.
* @throws IOException Thrown if an io error occurs while communicating with
* the service.
* @throws HttpException if the service returns an error response.
*/
- InputStream getMediaEntryAsStream(String mediaEntryUrl, String authToken)
+ InputStream getMediaEntryAsStream(String mediaEntryUrl, String authToken, String eTag)
throws HttpException, IOException;
// TODO: support batch update
@@ -100,6 +107,9 @@
* @param editUri The edit uri that should be used for updating the entry.
* @param authToken The authentication token that should be used when
* updating the entry.
+ * @param eTag The eTag associated with this request, this will
+ * cause the PUT to return a conflict if the
+ * resource was already modified
* @param entry The entry that should be updated.
* @throws IOException Thrown if an io error occurs while communicating with
* the service.
@@ -107,6 +117,7 @@
*/
InputStream updateEntry(String editUri,
String authToken,
+ String eTag,
GDataSerializer entry)
throws HttpException, IOException;
@@ -117,12 +128,16 @@
* @param editUri The edit uri that should be used for deleting the entry.
* @param authToken The authentication token that should be used when
* deleting the entry.
+ * @param eTag The eTag associated with this request, this will
+ * cause a failure if the resource was modified
+ * since retrieval.
* @throws IOException Thrown if an io error occurs while communicating with
* the service.
* @throws HttpException if the service returns an error response.
*/
void deleteEntry(String editUri,
- String authToken)
+ String authToken,
+ String eTag)
throws HttpException, IOException;
/**
@@ -133,7 +148,10 @@
*
* @param editUri The edit uri that should be used for updating the entry.
* @param authToken The authentication token that should be used when
- * updating the entry.
+ * updating the entry
+ * @param eTag The eTag associated with this request, this will
+ * cause the PUT to return a conflict if the
+ * resource was already modified
* @param mediaEntryInputStream The {@link InputStream} that contains the new
* value of the resource
* @param contentType The contentType of the new media entry
@@ -143,7 +161,7 @@
* @return The {@link InputStream} that contains the metadata associated with the
* new version of the media entry.
*/
- public InputStream updateMediaEntry(String editUri, String authToken,
+ public InputStream updateMediaEntry(String editUri, String authToken, String eTag,
InputStream mediaEntryInputStream, String contentType)
throws HttpException, IOException;
}
diff --git a/src/com/google/wireless/gdata2/client/GDataServiceClient.java b/src/com/google/wireless/gdata2/client/GDataServiceClient.java
index 738879e..ca12df3 100644
--- a/src/com/google/wireless/gdata2/client/GDataServiceClient.java
+++ b/src/com/google/wireless/gdata2/client/GDataServiceClient.java
@@ -65,15 +65,17 @@
* @param feedEntryClass the class of Entry that is contained in the feed
* @param feedUrl ThAe URL of the feed that should be fetched.
* @param authToken The authentication token for this user.
+ * @param eTag The etag used for this query. Passing null will
+ * result in an unconditional query
* @return A {@link GDataParser} for the requested feed.
* @throws ParseException Thrown if the server response cannot be parsed.
* @throws IOException Thrown if an error occurs while communicating with
* the GData service.
* @throws HttpException Thrown if the http response contains a result other than 2xx
*/
- public GDataParser getParserForFeed(Class feedEntryClass, String feedUrl, String authToken)
+ public GDataParser getParserForFeed(Class feedEntryClass, String feedUrl, String authToken, String eTag)
throws ParseException, IOException, HttpException {
- InputStream is = gDataClient.getFeedAsStream(feedUrl, authToken);
+ InputStream is = gDataClient.getFeedAsStream(feedUrl, authToken, eTag);
return gDataParserFactory.createParser(feedEntryClass, is);
}
@@ -83,13 +85,16 @@
*
* @param mediaEntryUrl The URL of the media entry that should be fetched.
* @param authToken The authentication token for this user.
- * @return A {@link InputStream} for the requested media entry.
+ * @param eTag The eTag associated with this request, this will
+ * cause the GET to return a 304 if the content was
+ * not modified.
+ * @return A {@link InputStream} for the requested media entry.
* @throws IOException Thrown if an error occurs while communicating with
* the GData service.
*/
- public InputStream getMediaEntryAsStream(String mediaEntryUrl, String authToken)
+ public InputStream getMediaEntryAsStream(String mediaEntryUrl, String authToken, String eTag)
throws IOException, HttpException {
- return gDataClient.getMediaEntryAsStream(mediaEntryUrl, authToken);
+ return gDataClient.getMediaEntryAsStream(mediaEntryUrl, authToken, eTag);
}
/**
@@ -117,16 +122,18 @@
* Fetches an existing entry.
* @param entryClass the type of entry to expect
* @param id of the entry to fetch.
- * @param authToken The authentication token for this user. @return The entry returned by the server.
+ * @param authToken The authentication token for this user
+ * @param eTag The etag used for this query. Passing null
+ * will result in an unconditional query
* @throws ParseException Thrown if the server response cannot be parsed.
* @throws HttpException if the service returns an error response
* @throws IOException Thrown if an error occurs while communicating with
* the GData service.
* @return The entry returned by the server
*/
- public Entry getEntry(Class entryClass, String id, String authToken)
+ public Entry getEntry(Class entryClass, String id, String authToken, String eTag)
throws ParseException, IOException, HttpException {
- InputStream is = getGDataClient().getFeedAsStream(id, authToken);
+ InputStream is = getGDataClient().getFeedAsStream(id, authToken, eTag);
return parseEntry(entryClass, is);
}
@@ -151,7 +158,7 @@
}
GDataSerializer serializer = gDataParserFactory.createSerializer(entry);
- InputStream is = gDataClient.updateEntry(editUri, authToken, serializer);
+ InputStream is = gDataClient.updateEntry(editUri, authToken, entry.getETag(), serializer);
return parseEntry(entry.getClass(), is);
}
@@ -165,19 +172,21 @@
* @param contentType The content type of the new media entry
* @param authToken The authentication token for this user.
* @return The entry returned by the server as a result of updating the
- * provided entry.
+ * provided entry
+ * @param eTag The etag used for this query. Passing null will
+ * result in an unconditional query
* @throws HttpException if the service returns an error response
* @throws ParseException Thrown if the server response cannot be parsed.
* @throws IOException Thrown if an error occurs while communicating with
* the GData service.
*/
public MediaEntry updateMediaEntry(String editUri, InputStream inputStream, String contentType,
- String authToken) throws IOException, HttpException, ParseException {
+ String authToken, String eTag) throws IOException, HttpException, ParseException {
if (StringUtils.isEmpty(editUri)) {
throw new IllegalArgumentException("No edit URI -- cannot update.");
}
- InputStream is = gDataClient.updateMediaEntry(editUri, authToken, inputStream, contentType);
+ InputStream is = gDataClient.updateMediaEntry(editUri, authToken, eTag, inputStream, contentType);
return (MediaEntry)parseEntry(MediaEntry.class, is);
}
@@ -186,13 +195,15 @@
*
* @param editUri The editUri for the entry that should be deleted.
* @param authToken The authentication token for this user.
+ * @param eTag The etag used for this query. Passing null will
+ * result in an unconditional query
* @throws IOException Thrown if an error occurs while communicating with
* the GData service.
* @throws HttpException if the service returns an error response
*/
- public void deleteEntry(String editUri, String authToken)
+ public void deleteEntry(String editUri, String authToken, String eTag)
throws IOException, HttpException {
- gDataClient.deleteEntry(editUri, authToken);
+ gDataClient.deleteEntry(editUri, authToken, eTag);
}
private Entry parseEntry(Class entryClass, InputStream is) throws ParseException, IOException {
diff --git a/src/com/google/wireless/gdata2/contacts/data/ContactEntry.java b/src/com/google/wireless/gdata2/contacts/data/ContactEntry.java
index f21e60f..f22eaf0 100644
--- a/src/com/google/wireless/gdata2/contacts/data/ContactEntry.java
+++ b/src/com/google/wireless/gdata2/contacts/data/ContactEntry.java
@@ -15,9 +15,8 @@
*/
public class ContactEntry extends Entry {
private String linkPhotoHref;
- private String linkEditPhotoHref;
private String linkPhotoType;
- private String linkEditPhotoType;
+ private String linkPhotoEtag;
private final Vector emailAddresses = new Vector();
private final Vector imAddresses = new Vector();
private final Vector phoneNumbers = new Vector();
@@ -31,22 +30,15 @@
super();
}
- public void setLinkEditPhoto(String href, String type) {
- this.linkEditPhotoHref = href;
- this.linkEditPhotoType = type;
- }
- public String getLinkEditPhotoHref() {
- return linkEditPhotoHref;
- }
-
- public String getLinkEditPhotoType() {
- return linkEditPhotoType;
- }
-
- public void setLinkPhoto(String href, String type) {
+ public void setLinkPhoto(String href, String type, String photoEtag) {
this.linkPhotoHref = href;
this.linkPhotoType = type;
+ this.linkPhotoEtag = photoEtag;
+ }
+
+ public String getLinkPhotoETag() {
+ return linkPhotoEtag;
}
public String getLinkPhotoHref() {
@@ -127,10 +119,9 @@
*/
public void clear() {
super.clear();
- linkEditPhotoHref = null;
- linkEditPhotoType = null;
linkPhotoHref = null;
linkPhotoType = null;
+ linkPhotoEtag = null;
emailAddresses.removeAllElements();
imAddresses.removeAllElements();
phoneNumbers.removeAllElements();
@@ -151,11 +142,8 @@
if (!StringUtils.isEmpty(linkPhotoType)) {
sb.append(" linkPhotoType:").append(linkPhotoType).append("\n");
}
- if (!StringUtils.isEmpty(linkEditPhotoHref)) {
- sb.append(" linkEditPhotoHref:").append(linkEditPhotoHref).append("\n");
- }
- if (!StringUtils.isEmpty(linkEditPhotoType)) {
- sb.append(" linkEditPhotoType:").append(linkEditPhotoType).append("\n");
+ if (!StringUtils.isEmpty(linkPhotoEtag)) {
+ sb.append(" linkPhotoEtag:").append(linkPhotoEtag).append("\n");
}
for (Enumeration iter = emailAddresses.elements();
iter.hasMoreElements(); ) {
diff --git a/src/com/google/wireless/gdata2/contacts/parser/xml/XmlContactsGDataParser.java b/src/com/google/wireless/gdata2/contacts/parser/xml/XmlContactsGDataParser.java
index eed6c54..d37cc7a 100644
--- a/src/com/google/wireless/gdata2/contacts/parser/xml/XmlContactsGDataParser.java
+++ b/src/com/google/wireless/gdata2/contacts/parser/xml/XmlContactsGDataParser.java
@@ -247,11 +247,10 @@
throws XmlPullParserException, IOException {
if (LINK_REL_PHOTO.equals(rel)) {
ContactEntry contactEntry = (ContactEntry) entry;
- contactEntry.setLinkPhoto(href, type);
- } else if (LINK_REL_EDIT_PHOTO.equals(rel)) {
- ContactEntry contactEntry = (ContactEntry) entry;
- contactEntry.setLinkEditPhoto(href, type);
- }
+ XmlPullParser parser = getParser();
+ String etag = parser.getAttributeValue(null /* ns */, "etag");
+ contactEntry.setLinkPhoto(href, type, etag);
+ }
}
private static void parseContactsElement(ContactsElement element, XmlPullParser parser,
diff --git a/src/com/google/wireless/gdata2/contacts/serializer/xml/XmlContactEntryGDataSerializer.java b/src/com/google/wireless/gdata2/contacts/serializer/xml/XmlContactEntryGDataSerializer.java
index 1b5c5fb..d27c16f 100644
--- a/src/com/google/wireless/gdata2/contacts/serializer/xml/XmlContactEntryGDataSerializer.java
+++ b/src/com/google/wireless/gdata2/contacts/serializer/xml/XmlContactEntryGDataSerializer.java
@@ -33,6 +33,7 @@
super(factory, entry);
}
+ @Override
protected void declareExtraEntryNamespaces(XmlSerializer serializer) throws IOException {
super.declareExtraEntryNamespaces(serializer);
serializer.setPrefix(XmlContactsGDataParser.NAMESPACE_CONTACTS,
@@ -51,10 +52,8 @@
ContactEntry entry = getContactEntry();
entry.validate();
- serializeLink(serializer, XmlContactsGDataParser.LINK_REL_EDIT_PHOTO,
- entry.getLinkEditPhotoHref(), entry.getLinkEditPhotoType());
serializeLink(serializer, XmlContactsGDataParser.LINK_REL_PHOTO,
- entry.getLinkPhotoHref(), entry.getLinkPhotoType());
+ entry.getLinkPhotoHref(), entry.getLinkPhotoType(), entry.getLinkPhotoETag());
// Serialize the contact specific parts of this entry. Note that
// gd:ContactSection and gd:geoPt are likely to be deprecated, and
diff --git a/src/com/google/wireless/gdata2/data/Entry.java b/src/com/google/wireless/gdata2/data/Entry.java
index 1c191d4..fff706e 100644
--- a/src/com/google/wireless/gdata2/data/Entry.java
+++ b/src/com/google/wireless/gdata2/data/Entry.java
@@ -24,6 +24,7 @@
private String categoryScheme = null;
private String publicationDate = null;
private String updateDate = null;
+ private String eTagValue = null;
private boolean deleted = false;
/**
@@ -219,6 +220,21 @@
public void setDeleted(boolean isDeleted) {
deleted = isDeleted;
}
+
+ /**
+ * @return the value of the parsed eTag attribute
+ */
+ public String getETag() {
+ return eTagValue;
+ }
+
+ /**
+ * @param sets the eTag on the entry, used during
+ * parsing
+ */
+ public void setETag(String eTag) {
+ eTagValue = eTag;
+ }
/**
* Appends the name and value to this StringBuffer, if value is not null.
diff --git a/src/com/google/wireless/gdata2/data/Feed.java b/src/com/google/wireless/gdata2/data/Feed.java
index 201a134..dd9779c 100644
--- a/src/com/google/wireless/gdata2/data/Feed.java
+++ b/src/com/google/wireless/gdata2/data/Feed.java
@@ -18,6 +18,7 @@
private String lastUpdated;
private String category;
private String categoryScheme;
+ private String eTagValue;
/**
* Creates a new, empty feed.
@@ -119,4 +120,19 @@
this.title = title;
}
+ /**
+ * @return the value of the parsed eTag attribute
+ */
+ public String getETag() {
+ return eTagValue;
+ }
+
+ /**
+ * @param sets the eTag on the entry, used during
+ * parsing
+ */
+ public void setETag(String eTag) {
+ eTagValue = eTag;
+ }
+
}
diff --git a/src/com/google/wireless/gdata2/parser/xml/XmlGDataParser.java b/src/com/google/wireless/gdata2/parser/xml/XmlGDataParser.java
index 9cd3e23..44fd2a2 100644
--- a/src/com/google/wireless/gdata2/parser/xml/XmlGDataParser.java
+++ b/src/com/google/wireless/gdata2/parser/xml/XmlGDataParser.java
@@ -28,7 +28,7 @@
public static final String NAMESPACE_OPENSEARCH = "openSearch";
public static final String NAMESPACE_OPENSEARCH_URI =
- "http://a9.com/-/spec/opensearchrss/1.0/";
+ "http://a9.com/-/spec/opensearch/1.1/";
/** Namespace prefix for GData */
public static final String NAMESPACE_GD = "gd";
@@ -51,6 +51,13 @@
throws ParseException {
this.is = is;
this.parser = parser;
+
+ if (!parser.getFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES))
+ {
+ throw new IllegalStateException("A XmlGDataParser needs to be "
+ + "constructed with a namespace aware XmlPullParser");
+ }
+
this.isInBadState = false;
if (this.is != null) {
try {
@@ -142,8 +149,9 @@
}
/**
- * Parses the feed (but not any entries).
- *
+ * Parses the feed (but not any entries). This requires a
+ * namespace enabled parser
+ *
* @return A new {@link Feed} containing information about the feed.
* @throws XmlPullParserException Thrown if the XML document cannot be
* parsed.
@@ -154,41 +162,51 @@
Feed feed = createFeed();
// parsing <feed>
// not interested in any attributes -- move onto the children.
+
+ feed.setETag(parser.getAttributeValue(NAMESPACE_GD_URI, "etag"));
+
+
int eventType = parser.next();
while (eventType != XmlPullParser.END_DOCUMENT) {
switch (eventType) {
case XmlPullParser.START_TAG:
String name = parser.getName();
- if ("totalResults".equals(name)) {
- feed.setTotalResults(StringUtils.parseInt(
- XmlUtils.extractChildText(parser), 0));
- } else if ("startIndex".equals(name)) {
- feed.setStartIndex(StringUtils.parseInt(
- XmlUtils.extractChildText(parser), 0));
- } else if ("itemsPerPage".equals(name)) {
- feed.setItemsPerPage(StringUtils.parseInt(
- XmlUtils.extractChildText(parser), 0));
- } else if ("title".equals(name)) {
- feed.setTitle(XmlUtils.extractChildText(parser));
- } else if ("id".equals(name)) {
- feed.setId(XmlUtils.extractChildText(parser));
- } else if ("updated".equals(name)) {
- feed.setLastUpdated(XmlUtils.extractChildText(parser));
- } else if ("category".equals(name)) {
- String category =
- parser.getAttributeValue(null /* ns */, "term");
- if (!StringUtils.isEmpty(category)) {
- feed.setCategory(category);
+ String namespace = parser.getNamespace();
+
+ if (XmlGDataParser.NAMESPACE_OPENSEARCH_URI.equals(namespace)) {
+ if ("totalResults".equals(name)) {
+ feed.setTotalResults(StringUtils.parseInt(
+ XmlUtils.extractChildText(parser), 0));
+ } else if ("startIndex".equals(name)) {
+ feed.setStartIndex(StringUtils.parseInt(
+ XmlUtils.extractChildText(parser), 0));
+ } else if ("itemsPerPage".equals(name)) {
+ feed.setItemsPerPage(StringUtils.parseInt(
+ XmlUtils.extractChildText(parser), 0));
}
- String categoryScheme =
- parser.getAttributeValue(null /* ns */, "scheme");
- if (!StringUtils.isEmpty(categoryScheme)) {
- feed.setCategoryScheme(categoryScheme);
- }
- } else if ("entry".equals(name)) {
- // stop parsing here.
- // TODO: pay attention to depth?
- return feed;
+ } else if (XmlGDataParser.NAMESPACE_ATOM_URI.equals(namespace)) {
+ if ("title".equals(name)) {
+ feed.setTitle(XmlUtils.extractChildText(parser));
+ } else if ("id".equals(name)) {
+ feed.setId(XmlUtils.extractChildText(parser));
+ } else if ("updated".equals(name)) {
+ feed.setLastUpdated(XmlUtils.extractChildText(parser));
+ } else if ("category".equals(name)) {
+ String category =
+ parser.getAttributeValue(null /* ns */, "term");
+ if (!StringUtils.isEmpty(category)) {
+ feed.setCategory(category);
+ }
+ String categoryScheme =
+ parser.getAttributeValue(null /* ns */, "scheme");
+ if (!StringUtils.isEmpty(categoryScheme)) {
+ feed.setCategoryScheme(categoryScheme);
+ }
+ } else if ("entry".equals(name)) {
+ // stop parsing here.
+ // TODO: pay attention to depth?
+ return feed;
+ }
} else {
handleExtraElementInFeed(feed);
}
@@ -262,7 +280,6 @@
}
try {
- parser.next();
handleEntry(entry);
entry.validate();
} catch (ParseException xppe1) {
@@ -321,7 +338,6 @@
String name = parser.getName();
if ("entry".equals(name)) {
try {
- parser.next();
handleEntry(entry);
return entry;
} catch (XmlPullParserException xppe) {
@@ -373,7 +389,8 @@
/**
* Parses the current entry in the XML document. Assumes that the parser
- * is currently pointing just after an <entry>.
+ * is currently pointing just at the beginning of an
+ * <entry>.
*
* @param entry The entry that will be filled.
* @throws XmlPullParserException Thrown if the XML cannot be parsed.
@@ -381,6 +398,18 @@
*/
protected void handleEntry(Entry entry)
throws XmlPullParserException, IOException, ParseException {
+ // first thing we do is to get the attributes out of the parser for this entry
+ // so we verify that we are at the start of an entry
+ if (!"entry".equals(parser.getName())) {
+ throw new
+ IllegalStateException("Expected <entry>: Actual element: <"
+ + parser.getName() + ">");
+ }
+
+ entry.setETag(parser.getAttributeValue(NAMESPACE_GD_URI, "etag"));
+ // now skip to the next parser event
+ parser.next();
+
int eventType = parser.getEventType();
while (eventType != XmlPullParser.END_DOCUMENT) {
switch (eventType) {
diff --git a/src/com/google/wireless/gdata2/serializer/xml/XmlEntryGDataSerializer.java b/src/com/google/wireless/gdata2/serializer/xml/XmlEntryGDataSerializer.java
index 210f76c..23036ea 100644
--- a/src/com/google/wireless/gdata2/serializer/xml/XmlEntryGDataSerializer.java
+++ b/src/com/google/wireless/gdata2/serializer/xml/XmlEntryGDataSerializer.java
@@ -109,8 +109,8 @@
serializeTitle(serializer, entry.getTitle());
if (format != FORMAT_CREATE) {
- serializeLink(serializer, "edit" /* rel */, entry.getEditUri(), null /* type */);
- serializeLink(serializer, "alternate" /* rel */, entry.getHtmlUri(), "text/html" /* type */);
+ serializeLink(serializer, "edit" /* rel */, entry.getEditUri(), null /* type */, null /* etag */ );
+ serializeLink(serializer, "alternate" /* rel */, entry.getHtmlUri(), "text/html" /* type */, null /* etag */ );
}
serializeSummary(serializer, entry.getSummary());
@@ -172,7 +172,18 @@
serializer.endTag(null /* ns */, "title");
}
- public static void serializeLink(XmlSerializer serializer, String rel, String href, String type)
+ /**
+ * Serializes a link relationship into the xml serializer passed in.
+ *
+ * @param serializer The serializer to be used
+ * @param rel The relationship value (like alternate, edit etc)
+ * @param href the URI this link points to
+ * @param type the content type
+ * @param etag the optional etag if this link specifies a resource
+ *
+ * @exception IOException
+ */
+ protected static void serializeLink(XmlSerializer serializer, String rel, String href, String type, String etag)
throws IOException {
if (StringUtils.isEmpty(href)) {
return;
@@ -181,6 +192,7 @@
serializer.attribute(null /* ns */, "rel", rel);
serializer.attribute(null /* ns */, "href", href);
if (!StringUtils.isEmpty(type)) serializer.attribute(null /* ns */, "type", type);
+ if (!StringUtils.isEmpty(etag)) serializer.attribute(null /* ns */, "etag", etag);
serializer.endTag(null /* ns */, "link");
}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/client/SpreadsheetsClient.java b/src/com/google/wireless/gdata2/spreadsheets/client/SpreadsheetsClient.java
deleted file mode 100755
index 585c0a3..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/client/SpreadsheetsClient.java
+++ /dev/null
@@ -1,236 +0,0 @@
-// Copyright 2007 The Android Open Source Project
-package com.google.wireless.gdata2.spreadsheets.client;
-
-import com.google.wireless.gdata2.client.GDataClient;
-import com.google.wireless.gdata2.client.GDataParserFactory;
-import com.google.wireless.gdata2.client.GDataServiceClient;
-import com.google.wireless.gdata2.client.HttpException;
-import com.google.wireless.gdata2.data.Entry;
-import com.google.wireless.gdata2.data.StringUtils;
-import com.google.wireless.gdata2.parser.GDataParser;
-import com.google.wireless.gdata2.parser.ParseException;
-import com.google.wireless.gdata2.serializer.GDataSerializer;
-import com.google.wireless.gdata2.spreadsheets.data.CellEntry;
-import com.google.wireless.gdata2.spreadsheets.data.ListEntry;
-import com.google.wireless.gdata2.spreadsheets.data.SpreadsheetEntry;
-import com.google.wireless.gdata2.spreadsheets.data.WorksheetEntry;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * GDataServiceClient for accessing Google Spreadsheets. This client can
- * access and parse all of the Spreadsheets feed types: Spreadsheets feed,
- * Worksheets feed, List feed, and Cells feed. Read operations are supported
- * on all feed types, but only the List and Cells feeds support write
- * operations. (This is a limitation of the protocol, not this API. Such write
- * access may be added to the protocol in the future, requiring changes to
- * this implementation.)
- *
- * Only 'private' visibility and 'full' projections are currently supported.
- */
-public class SpreadsheetsClient extends GDataServiceClient {
- /** The name of the service, dictated to be 'wise' by the protocol. */
- private static final String SERVICE = "wise";
-
- /** Standard base feed url for spreadsheets. */
- public static final String SPREADSHEETS_BASE_FEED_URL =
- "http://spreadsheets.google.com/feeds/spreadsheets/private/full";
-
- /** Base feed url for spreadsheets. */
- private final String baseFeedUrl;
-
- /**
- * Create a new SpreadsheetsClient.
- *
- * @param client The GDataClient that should be used to authenticate
- * requests, retrieve feeds, etc.
- * @param spreadsheetFactory The GDataParserFactory that should be used to obtain GDataParsers
- * used by this client.
- * @param baseFeedUrl The base URL for spreadsheets feeds.
- */
- public SpreadsheetsClient(GDataClient client,
- GDataParserFactory spreadsheetFactory,
- String baseFeedUrl) {
- super(client, spreadsheetFactory);
- this.baseFeedUrl = baseFeedUrl;
- }
-
- /**
- * Create a new SpreadsheetsClient. Uses the standard base URL for spreadsheets feeds.
- *
- * @param client The GDataClient that should be used to authenticate
- * requests, retrieve feeds, etc.
- */
- public SpreadsheetsClient(GDataClient client,
- GDataParserFactory spreadsheetFactory) {
- this(client, spreadsheetFactory, SPREADSHEETS_BASE_FEED_URL);
- }
-
- /* (non-Javadoc)
- * @see GDataServiceClient#getServiceName
- */
- public String getServiceName() {
- return SERVICE;
- }
-
- /**
- * Returns a parser for the specified feed type.
- *
- * @param feedEntryClass the Class of entry type that will be parsed. This lets this
- * method figure out which parser to create.
- * @param feedUri the URI of the feed to be fetched and parsed
- * @param authToken the current authToken to use for the request @return a parser for the indicated feed
- * @throws HttpException if an http error is encountered
- * @throws ParseException if the response from the server could not be
- * parsed
- */
- private GDataParser getParserForTypedFeed(Class feedEntryClass, String feedUri,
- String authToken) throws ParseException, IOException, HttpException {
- GDataClient gDataClient = getGDataClient();
- GDataParserFactory gDataParserFactory = getGDataParserFactory();
-
- InputStream is = gDataClient.getFeedAsStream(feedUri, authToken);
- return gDataParserFactory.createParser(feedEntryClass, is);
- }
-
- /* (non-javadoc)
- * @see GDataServiceClient#createEntry
- */
- public Entry createEntry(String feedUri, String authToken, Entry entry)
- throws ParseException, IOException, HttpException {
-
- GDataParserFactory factory = getGDataParserFactory();
- GDataSerializer serializer = factory.createSerializer(entry);
-
- InputStream is = getGDataClient().createEntry(feedUri, authToken, serializer);
- GDataParser parser = factory.createParser(entry.getClass(), is);
- try {
- return parser.parseStandaloneEntry();
- } finally {
- parser.close();
- }
- }
-
- /**
- * Returns a parser for a Cells-based feed.
- *
- * @param feedUri the URI of the feed to be fetched and parsed
- * @param authToken the current authToken to use for the request
- * @return a parser for the indicated feed
- * @throws HttpException if an http error is encountered
- * @throws ParseException if the response from the server could not be
- * parsed
- */
- public GDataParser getParserForCellsFeed(String feedUri, String authToken)
- throws ParseException, IOException, HttpException {
- return getParserForTypedFeed(CellEntry.class, feedUri, authToken);
- }
-
- /**
- * Fetches a GDataParser for the indicated feed. The parser can be used to
- * access the contents of URI. WARNING: because we cannot reliably infer
- * the feed type from the URI alone, this method assumes the default feed
- * type! This is probably NOT what you want. Please use the
- * getParserFor[Type]Feed methods.
- *
- * @param feedEntryClass
- * @param feedUri the URI of the feed to be fetched and parsed
- * @param authToken the current authToken to use for the request
- * @return a parser for the indicated feed
- * @throws HttpException if an http error is encountered
- * @throws ParseException if the response from the server could not be
- * parsed
- */
- public GDataParser getParserForFeed(Class feedEntryClass, String feedUri, String authToken)
- throws ParseException, IOException, HttpException {
- GDataClient gDataClient = getGDataClient();
- GDataParserFactory gDataParserFactory = getGDataParserFactory();
- InputStream is = gDataClient.getFeedAsStream(feedUri, authToken);
- return gDataParserFactory.createParser(feedEntryClass, is);
- }
-
- /**
- * Returns a parser for a List (row-based) feed.
- *
- * @param feedUri the URI of the feed to be fetched and parsed
- * @param authToken the current authToken to use for the request
- * @return a parser for the indicated feed
- * @throws HttpException if an http error is encountered
- * @throws ParseException if the response from the server could not be
- * parsed
- */
- public GDataParser getParserForListFeed(String feedUri, String authToken)
- throws ParseException, IOException, HttpException {
- return getParserForTypedFeed(ListEntry.class, feedUri, authToken);
- }
-
- /**
- * Returns a parser for a Spreadsheets meta-feed.
- *
- * @param feedUri the URI of the feed to be fetched and parsed
- * @param authToken the current authToken to use for the request
- * @return a parser for the indicated feed
- * @throws HttpException if an http error is encountered
- * @throws ParseException if the response from the server could not be
- * parsed
- */
- public GDataParser getParserForSpreadsheetsFeed(String feedUri, String authToken)
- throws ParseException, IOException, HttpException {
- return getParserForTypedFeed(SpreadsheetEntry.class, feedUri, authToken);
- }
-
- /**
- * Returns a parser for a Worksheets meta-feed.
- *
- * @param feedUri the URI of the feed to be fetched and parsed
- * @param authToken the current authToken to use for the request
- * @return a parser for the indicated feed
- * @throws HttpException if an http error is encountered
- * @throws ParseException if the response from the server could not be
- * parsed
- */
- public GDataParser getParserForWorksheetsFeed(String feedUri, String authToken)
- throws ParseException, IOException, HttpException {
- return getParserForTypedFeed(WorksheetEntry.class, feedUri, authToken);
- }
-
- /**
- * Updates an entry. The URI to be updated is taken from
- * <code>entry</code>. Note that only entries in List and Cells feeds
- * can be updated, so <code>entry</code> must be of the corresponding
- * type; other types will result in an exception.
- *
- * @param entry the entry to be updated; must include its URI
- * @param authToken the current authToken to be used for the operation
- * @return An Entry containing the re-parsed version of the entry returned
- * by the server in response to the update.
- * @throws HttpException if an http error is encountered
- * @throws ParseException if the server returned an error, if the server's
- * response was unparseable (unlikely), or if <code>entry</code>
- * is of a read-only type
- * @throws IOException on network error
- */
- public Entry updateEntry(Entry entry, String authToken)
- throws ParseException, IOException, HttpException {
- GDataParserFactory factory = getGDataParserFactory();
- GDataSerializer serializer = factory.createSerializer(entry);
-
- String editUri = entry.getEditUri();
- if (StringUtils.isEmpty(editUri)) {
- throw new ParseException("No edit URI -- cannot update.");
- }
-
- InputStream is = getGDataClient().updateEntry(editUri, authToken, serializer);
- GDataParser parser = factory.createParser(entry.getClass(), is);
- try {
- return parser.parseStandaloneEntry();
- } finally {
- parser.close();
- }
- }
-
- public String getBaseFeedUrl() {
- return baseFeedUrl;
- }
-}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/client/package.html b/src/com/google/wireless/gdata2/spreadsheets/client/package.html
deleted file mode 100644
index 1c9bf9d..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/client/package.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<html>
-<body>
- {@hide}
-</body>
-</html>
diff --git a/src/com/google/wireless/gdata2/spreadsheets/data/CellEntry.java b/src/com/google/wireless/gdata2/spreadsheets/data/CellEntry.java
deleted file mode 100755
index 82f8910..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/data/CellEntry.java
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright 2007 The Android Open Source Project
-package com.google.wireless.gdata2.spreadsheets.data;
-
-import com.google.wireless.gdata2.data.Entry;
-
-/**
- * Represents an entry in a GData Spreadsheets Cell-based feed.
- */
-public class CellEntry extends Entry {
- /** The spreadsheet column of the cell. */
- private int col = -1;
-
- /** The cell entry's inputValue attribute */
- private String inputValue = null;
-
- /** The cell entry's numericValue attribute */
- private String numericValue = null;
-
- /** The spreadsheet row of the cell */
- private int row = -1;
-
- /** The cell entry's text sub-element */
- private String value = null;
-
- /** Default constructor. */
- public CellEntry() {
- super();
- }
-
- /**
- * Fetches the cell's spreadsheet column.
- *
- * @return the cell's spreadsheet column
- */
- public int getCol() {
- return col;
- }
-
- /**
- * Fetches the cell's inputValue attribute, which is the actual user input
- * rather (such as a formula) than computed value of the cell.
- *
- * @return the cell's inputValue
- */
- public String getInputValue() {
- return inputValue;
- }
-
- /**
- * Fetches the cell's numericValue attribute, which is a decimal
- * representation.
- *
- * @return the cell's numericValue
- */
- public String getNumericValue() {
- return numericValue;
- }
-
- /**
- * Fetches the cell's spreadsheet row.
- *
- * @return the cell's spreadsheet row
- */
- public int getRow() {
- return row;
- }
-
- /**
- * Fetches the cell's contents, after any computation. For example, if the
- * cell actually contains a formula, this will return the formula's computed
- * value.
- *
- * @return the computed value of the cell
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Indicates whether the cell's contents are numeric.
- *
- * @return true if the contents are numeric, or false if not
- */
- public boolean hasNumericValue() {
- return numericValue != null;
- }
-
- /**
- * Sets the cell's spreadsheet column.
- *
- * @param col the new spreadsheet column of the cell
- */
- public void setCol(int col) {
- this.col = col;
- }
-
- /**
- * Sets the cell's actual contents (such as a formula, or a raw value.)
- *
- * @param inputValue the new inputValue of the cell
- */
- public void setInputValue(String inputValue) {
- this.inputValue = inputValue;
- }
-
- /**
- * Sets the cell's numeric value. This can be different from the actual
- * value; for instance, the actual value may be a thousands-delimited pretty
- * string, while the numeric value could be the raw decimal.
- *
- * @param numericValue the cell's new numericValue
- */
- public void setNumericValue(String numericValue) {
- this.numericValue = numericValue;
- }
-
- /**
- * Sets the cell's spreadsheet row.
- *
- * @param row the new spreadsheet row of the cell
- */
- public void setRow(int row) {
- this.row = row;
- }
-
- /**
- * Sets the cell's computed value.
- *
- * @param value the new value of the cell
- */
- public void setValue(String value) {
- this.value = value;
- }
-}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/data/CellFeed.java b/src/com/google/wireless/gdata2/spreadsheets/data/CellFeed.java
deleted file mode 100755
index 19d6ad9..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/data/CellFeed.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2007 The Android Open Source Project
-package com.google.wireless.gdata2.spreadsheets.data;
-
-import com.google.wireless.gdata2.data.Feed;
-
-/**
- * A feed handler for GData Spreadsheets cell-based feeds.
- */
-public class CellFeed extends Feed {
- private String editUri;
-
- /** Default constructor. */
- public CellFeed() {
- super();
- }
-
- /**
- * Fetches the URI to which edits (such as cell content updates) should
- * go.
- *
- * @return the edit URI for this feed
- */
- public String getEditUri() {
- return editUri;
- }
-
- /**
- * Sets the URI to which edits (such as cell content updates) should go.
- *
- * @param editUri the new edit URI for this feed
- */
- public void setEditUri(String editUri) {
- this.editUri = editUri;
- }
-}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/data/ListEntry.java b/src/com/google/wireless/gdata2/spreadsheets/data/ListEntry.java
deleted file mode 100755
index 570bd18..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/data/ListEntry.java
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2007 The Android Open Source Project
-package com.google.wireless.gdata2.spreadsheets.data;
-
-import com.google.wireless.gdata2.data.Entry;
-import com.google.wireless.gdata2.data.StringUtils;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-
-/**
- * Represents an entry in a GData Spreadsheets List feed.
- */
-public class ListEntry extends Entry {
- /** Map containing the values in the row. */
- private Hashtable values = new Hashtable();
-
- /** Caches the list of names, so they don't need to be recomputed. */
- private Vector names = null;
-
- /**
- * Retrieves the column names present in this row.
- *
- * @return a Set of Strings, one per column where data exists
- */
- public Vector getNames() {
- if (names != null) {
- return names;
- }
- names = new Vector();
- Enumeration e = values.keys();
- while (e.hasMoreElements()) {
- names.add(e.nextElement());
- }
- return names;
- }
-
- /**
- * Fetches the value for a column. Equivalent to
- * <code>getValue(name, null)</code>.
- *
- * @param name the name of the column whose row is to be fetched
- * @return the value of the column, or null if the column is not present
- */
- public String getValue(String name) {
- return getValue(name, null);
- }
-
- /**
- * Fetches the value for a column.
- *
- * @param name the name of the column whose row is to be fetched
- * @param defaultValue the value to return if the row has no value for the
- * requested column; may be null
- * @return the value of the column, or null if the column is not present
- */
- public String getValue(String name, String defaultValue) {
- if (StringUtils.isEmpty(name)) {
- return defaultValue;
- }
- String val = (String) values.get(name);
- if (val == null) {
- return defaultValue;
- }
- return val;
- }
-
- /**
- * Sets the value of a column.
- *
- * @param name the name of the column
- * @param value the value for the column
- */
- public void setValue(String name, String value) {
- values.put(name, value == null ? "" : value);
- }
-}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/data/ListFeed.java b/src/com/google/wireless/gdata2/spreadsheets/data/ListFeed.java
deleted file mode 100755
index 2fcc0a9..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/data/ListFeed.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2007 The Android Open Source Project
-package com.google.wireless.gdata2.spreadsheets.data;
-
-import com.google.wireless.gdata2.data.Feed;
-
-/**
- * A feed handler for GData Spreadsheets List-based feeds.
- */
-public class ListFeed extends Feed {
- private String editUri;
-
- /** Default constructor. */
- public ListFeed() {
- super();
- }
-
- /**
- * Fetches the URI to which edits (such as cell content updates) should
- * go.
- *
- * @return the edit URI for this feed
- */
- public String getEditUri() {
- return editUri;
- }
-
- /**
- * Sets the URI to which edits (such as cell content updates) should go.
- *
- * @param editUri the new edit URI for this feed
- */
- public void setEditUri(String editUri) {
- this.editUri = editUri;
- }
-}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/data/SpreadsheetEntry.java b/src/com/google/wireless/gdata2/spreadsheets/data/SpreadsheetEntry.java
deleted file mode 100755
index 74c5344..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/data/SpreadsheetEntry.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2007 The Android Open Source Project
-package com.google.wireless.gdata2.spreadsheets.data;
-
-import com.google.wireless.gdata2.GDataException;
-import com.google.wireless.gdata2.data.Entry;
-import com.google.wireless.gdata2.data.StringUtils;
-
-/**
- * Represents an entry in a GData Spreadsheets meta-feed.
- */
-public class SpreadsheetEntry extends Entry {
- /** The URI of the worksheets meta-feed for this spreadsheet */
- private String worksheetsUri = null;
-
- /**
- * Fetches the URI of the worksheets meta-feed (that is, list of worksheets)
- * for this spreadsheet.
- *
- * @return the worksheets meta-feed URI
- * @throws GDataException if the unique key is not set
- */
- public String getWorksheetFeedUri() throws GDataException {
- if (StringUtils.isEmpty(worksheetsUri)) {
- throw new GDataException("worksheet URI is not set");
- }
- return worksheetsUri;
- }
-
- /**
- * Sets the URI of the worksheet meta-feed corresponding to this
- * spreadsheet.
- *
- * @param href
- */
- public void setWorksheetFeedUri(String href) {
- worksheetsUri = href;
- }
-}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/data/SpreadsheetFeed.java b/src/com/google/wireless/gdata2/spreadsheets/data/SpreadsheetFeed.java
deleted file mode 100755
index ab2cdbb..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/data/SpreadsheetFeed.java
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2007 The Android Open Source Project
-package com.google.wireless.gdata2.spreadsheets.data;
-
-import com.google.wireless.gdata2.data.Feed;
-
-/**
- * Feed handler for a GData Spreadsheets meta-feed.
- */
-public class SpreadsheetFeed extends Feed {
- /** Default constructor. */
- public SpreadsheetFeed() {
- super();
- }
-}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/data/WorksheetEntry.java b/src/com/google/wireless/gdata2/spreadsheets/data/WorksheetEntry.java
deleted file mode 100644
index 9c77221..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/data/WorksheetEntry.java
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright 2007 The Android Open Source Project
-package com.google.wireless.gdata2.spreadsheets.data;
-
-import com.google.wireless.gdata2.GDataException;
-import com.google.wireless.gdata2.data.Entry;
-import com.google.wireless.gdata2.data.StringUtils;
-
-/**
- * Represents an entry in a GData Worksheets meta-feed.
- */
-public class WorksheetEntry extends Entry {
- /** The URI to this entry's cells feed. */
- private String cellsUri = null;
-
- /** The number of columns in the worksheet. */
- private int colCount = -1;
-
- /** The URI to this entry's list feed. */
- private String listUri = null;
-
- /** The number of rows in the worksheet. */
- private int rowCount = -1;
-
- /**
- * Fetches the URI of this entry's Cells feed.
- *
- * @return The URI of the entry's Cells feed.
- */
- public String getCellFeedUri() {
- return cellsUri;
- }
-
- /**
- * Fetches the number of columns in the worksheet.
- *
- * @return The number of columns.
- */
- public int getColCount() {
- return colCount;
- }
-
- /**
- * Fetches the URI of this entry's List feed.
- *
- * @return The URI of the entry's List feed.
- * @throws GDataException If the URI is not set or is invalid.
- */
- public String getListFeedUri() {
- return listUri;
- }
-
- /**
- * Fetches the number of rows in the worksheet.
- *
- * @return The number of rows.
- */
- public int getRowCount() {
- return rowCount;
- }
-
- /**
- * Sets the URI of this entry's Cells feed.
- *
- * @param href The HREF attribute that should be the Cells feed URI.
- */
- public void setCellFeedUri(String href) {
- cellsUri = href;
- }
-
- /**
- * Sets the number of columns in the worksheet.
- *
- * @param colCount The new number of columns.
- */
- public void setColCount(int colCount) {
- this.colCount = colCount;
- }
-
- /**
- * Sets this entry's Atom ID.
- *
- * @param id The new ID value.
- */
- public void setId(String id) {
- super.setId(id);
- }
-
- /**
- * Sets the URI of this entry's List feed.
- *
- * @param href The HREF attribute that should be the List feed URI.
- */
- public void setListFeedUri(String href) {
- listUri = href;
- }
-
- /**
- * Sets the number of rows in the worksheet.
- *
- * @param rowCount The new number of rows.
- */
- public void setRowCount(int rowCount) {
- this.rowCount = rowCount;
- }
-}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/data/WorksheetFeed.java b/src/com/google/wireless/gdata2/spreadsheets/data/WorksheetFeed.java
deleted file mode 100755
index 000655b..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/data/WorksheetFeed.java
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2007 The Android Open Source Project
-package com.google.wireless.gdata2.spreadsheets.data;
-
-import com.google.wireless.gdata2.data.Feed;
-
-/**
- * Feed handler for GData Spreadsheets Worksheet meta-feed.
- */
-public class WorksheetFeed extends Feed {
- /** Default constructor. */
- public WorksheetFeed() {
- super();
- }
-}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/data/package.html b/src/com/google/wireless/gdata2/spreadsheets/data/package.html
deleted file mode 100644
index 1c9bf9d..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/data/package.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<html>
-<body>
- {@hide}
-</body>
-</html>
diff --git a/src/com/google/wireless/gdata2/spreadsheets/package.html b/src/com/google/wireless/gdata2/spreadsheets/package.html
deleted file mode 100644
index 1c9bf9d..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/package.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<html>
-<body>
- {@hide}
-</body>
-</html>
diff --git a/src/com/google/wireless/gdata2/spreadsheets/parser/package.html b/src/com/google/wireless/gdata2/spreadsheets/parser/package.html
deleted file mode 100644
index 1c9bf9d..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/parser/package.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<html>
-<body>
- {@hide}
-</body>
-</html>
diff --git a/src/com/google/wireless/gdata2/spreadsheets/parser/xml/XmlCellsGDataParser.java b/src/com/google/wireless/gdata2/spreadsheets/parser/xml/XmlCellsGDataParser.java
deleted file mode 100755
index 043fe5b..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/parser/xml/XmlCellsGDataParser.java
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright 2007 The Android Open Source Project
-package com.google.wireless.gdata2.spreadsheets.parser.xml;
-
-import com.google.wireless.gdata2.data.Entry;
-import com.google.wireless.gdata2.data.Feed;
-import com.google.wireless.gdata2.data.StringUtils;
-import com.google.wireless.gdata2.data.XmlUtils;
-import com.google.wireless.gdata2.parser.ParseException;
-import com.google.wireless.gdata2.parser.xml.XmlGDataParser;
-import com.google.wireless.gdata2.spreadsheets.data.CellEntry;
-import com.google.wireless.gdata2.spreadsheets.data.CellFeed;
-
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Parser for non-Atom data in a GData Spreadsheets Cell-based feed.
- */
-public class XmlCellsGDataParser extends XmlGDataParser {
- /**
- * The rel ID used by the server to identify the URLs for Cell POSTs
- * (updates)
- */
- private static final String CELL_FEED_POST_REL =
- "http://schemas.google.com/g/2005#post";
-
- /**
- * Creates a new XmlCellsGDataParser.
- *
- * @param is the stream from which to read the data
- * @param xmlParser the XMLPullParser to use for parsing the raw XML
- * @throws ParseException if the super-class throws one
- */
- public XmlCellsGDataParser(InputStream is, XmlPullParser xmlParser)
- throws ParseException {
- super(is, xmlParser);
- }
-
- /* (non-JavaDoc)
- * Creates a new Entry that can handle the data parsed by this class.
- */
- protected Entry createEntry() {
- return new CellEntry();
- }
-
- /* (non-JavaDoc)
- * Creates a new Feed that can handle the data parsed by this class.
- */
- protected Feed createFeed() {
- return new CellFeed();
- }
-
- /* (non-JavaDoc)
- * Callback to handle non-Atom data present in an Atom entry tag.
- */
- protected void handleExtraElementInEntry(Entry entry)
- throws XmlPullParserException, IOException {
- XmlPullParser parser = getParser();
- if (!(entry instanceof CellEntry)) {
- throw new IllegalArgumentException("Expected CellEntry!");
- }
- CellEntry row = (CellEntry) entry;
-
- String name = parser.getName();
- // cells can only have row, col, inputValue, & numericValue attrs
- if ("cell".equals(name)) {
- int count = parser.getAttributeCount();
- String attrName = null;
- for (int i = 0; i < count; ++i) {
- attrName = parser.getAttributeName(i);
- if ("row".equals(attrName)) {
- row.setRow(StringUtils.parseInt(parser
- .getAttributeValue(i), 0));
- } else if ("col".equals(attrName)) {
- row.setCol(StringUtils.parseInt(parser
- .getAttributeValue(i), 0));
- } else if ("numericValue".equals(attrName)) {
- row.setNumericValue(parser.getAttributeValue(i));
- } else if ("inputValue".equals(attrName)) {
- row.setInputValue(parser.getAttributeValue(i));
- }
- }
-
- // also need the data stored in the child text node
- row.setValue(XmlUtils.extractChildText(parser));
- }
- }
-
- /* (non-JavaDoc)
- * Callback to handle non-Atom data in the feed.
- */
- protected void handleExtraElementInFeed(Feed feed)
- throws XmlPullParserException, IOException {
- XmlPullParser parser = getParser();
- if (!(feed instanceof CellFeed)) {
- throw new IllegalArgumentException("Expected CellFeed!");
- }
- CellFeed cellFeed = (CellFeed) feed;
-
- String name = parser.getName();
- if (!"link".equals(name)) {
- return;
- }
-
- int numAttrs = parser.getAttributeCount();
- String rel = null;
- String href = null;
- String attrName = null;
- for (int i = 0; i < numAttrs; ++i) {
- attrName = parser.getAttributeName(i);
- if ("rel".equals(attrName)) {
- rel = parser.getAttributeValue(i);
- } else if ("href".equals(attrName)) {
- href = parser.getAttributeValue(i);
- }
- }
- if (!(StringUtils.isEmpty(rel) || StringUtils.isEmpty(href))) {
- if (CELL_FEED_POST_REL.equals(rel)) {
- cellFeed.setEditUri(href);
- }
- }
- }
-}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/parser/xml/XmlListGDataParser.java b/src/com/google/wireless/gdata2/spreadsheets/parser/xml/XmlListGDataParser.java
deleted file mode 100755
index 6578a1f..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/parser/xml/XmlListGDataParser.java
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright 2007 The Android Open Source Project
-package com.google.wireless.gdata2.spreadsheets.parser.xml;
-
-import com.google.wireless.gdata2.data.Entry;
-import com.google.wireless.gdata2.data.Feed;
-import com.google.wireless.gdata2.data.StringUtils;
-import com.google.wireless.gdata2.data.XmlUtils;
-import com.google.wireless.gdata2.parser.ParseException;
-import com.google.wireless.gdata2.parser.xml.XmlGDataParser;
-import com.google.wireless.gdata2.spreadsheets.data.ListEntry;
-import com.google.wireless.gdata2.spreadsheets.data.ListFeed;
-
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Parser for non-Atom data in a GData Spreadsheets List-based feed.
- */
-public class XmlListGDataParser extends XmlGDataParser {
- /**
- * The rel ID used by the server to identify the URLs for List POSTs
- * (updates)
- */
- private static final String LIST_FEED_POST_REL =
- "http://schemas.google.com/g/2005#post";
-
- /**
- * Creates a new XmlListGDataParser.
- *
- * @param is the stream from which to read the data
- * @param xmlParser the XmlPullParser to use to parse the raw XML
- * @throws ParseException if the super-class throws one
- */
- public XmlListGDataParser(InputStream is, XmlPullParser xmlParser)
- throws ParseException {
- super(is, xmlParser);
- }
-
- /* (non-JavaDoc)
- * Creates a new Entry that can handle the data parsed by this class.
- */
- protected Entry createEntry() {
- return new ListEntry();
- }
-
- /* (non-JavaDoc)
- * Creates a new Feed that can handle the data parsed by this class.
- */
- protected Feed createFeed() {
- return new ListFeed();
- }
-
- /* (non-JavaDoc)
- * Callback to handle non-Atom data present in an Atom entry tag.
- */
- protected void handleExtraElementInEntry(Entry entry)
- throws XmlPullParserException, IOException {
- XmlPullParser parser = getParser();
- if (!(entry instanceof ListEntry)) {
- throw new IllegalArgumentException("Expected ListEntry!");
- }
- ListEntry row = (ListEntry) entry;
-
- String name = parser.getName();
- row.setValue(name, XmlUtils.extractChildText(parser));
- }
-
- /* (non-JavaDoc)
- * Callback to handle non-Atom data in the feed.
- */
- protected void handleExtraElementInFeed(Feed feed)
- throws XmlPullParserException, IOException {
- XmlPullParser parser = getParser();
- if (!(feed instanceof ListFeed)) {
- throw new IllegalArgumentException("Expected ListFeed!");
- }
- ListFeed listFeed = (ListFeed) feed;
-
- String name = parser.getName();
- if (!"link".equals(name)) {
- return;
- }
-
- // lists store column data in the gsx namespace:
- // <gsx:columnheader>data</gsx:columnheader>
- // The columnheader tag names are the scrubbed values of the first row.
- // We extract them all and store them as keys in a Map.
- int numAttrs = parser.getAttributeCount();
- String rel = null;
- String href = null;
- String attrName = null;
- for (int i = 0; i < numAttrs; ++i) {
- attrName = parser.getAttributeName(i);
- if ("rel".equals(attrName)) {
- rel = parser.getAttributeValue(i);
- } else if ("href".equals(attrName)) {
- href = parser.getAttributeValue(i);
- }
- }
- if (!(StringUtils.isEmpty(rel) || StringUtils.isEmpty(href))) {
- if (LIST_FEED_POST_REL.equals(rel)) {
- listFeed.setEditUri(href);
- }
- }
- }
-}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/parser/xml/XmlSpreadsheetsGDataParser.java b/src/com/google/wireless/gdata2/spreadsheets/parser/xml/XmlSpreadsheetsGDataParser.java
deleted file mode 100755
index 596e624..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/parser/xml/XmlSpreadsheetsGDataParser.java
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2007 The Android Open Source Project
-package com.google.wireless.gdata2.spreadsheets.parser.xml;
-
-import com.google.wireless.gdata2.data.Entry;
-import com.google.wireless.gdata2.data.Feed;
-import com.google.wireless.gdata2.parser.ParseException;
-import com.google.wireless.gdata2.parser.xml.XmlGDataParser;
-import com.google.wireless.gdata2.spreadsheets.data.SpreadsheetEntry;
-import com.google.wireless.gdata2.spreadsheets.data.SpreadsheetFeed;
-
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Parser helper for non-Atom data in a GData Spreadsheets meta-feed.
- */
-public class XmlSpreadsheetsGDataParser extends XmlGDataParser {
- /**
- * The rel ID used by the server to identify the URLs for the worksheets
- * feed
- */
- protected static final String WORKSHEET_FEED_REL =
- "http://schemas.google.com/spreadsheets/2006#worksheetsfeed";
-
- /**
- * Creates a new XmlSpreadsheetsGDataParser.
- *
- * @param is the stream from which to read the data
- * @param xmlParser the XmlPullParser to use to parse the raw XML
- * @throws ParseException if the super-class throws one
- */
- public XmlSpreadsheetsGDataParser(InputStream is, XmlPullParser xmlParser)
- throws ParseException {
- super(is, xmlParser);
- }
-
- /* (non-JavaDoc)
- * Creates a new Entry that can handle the data parsed by this class.
- */
- protected Entry createEntry() {
- return new SpreadsheetEntry();
- }
-
- /* (non-JavaDoc)
- * Creates a new Feed that can handle the data parsed by this class.
- */
- protected Feed createFeed() {
- return new SpreadsheetFeed();
- }
-
- /* (non-JavaDoc)
- * Callback to handle link elements that are not recognized as Atom links.
- * Used to pick out the link tag in a Spreadsheet's entry that corresponds
- * to that spreadsheet's worksheets meta-feed.
- */
- protected void handleExtraLinkInEntry(String rel, String type, String href,
- Entry entry) throws XmlPullParserException, IOException {
- super.handleExtraLinkInEntry(rel, type, href, entry);
- if (WORKSHEET_FEED_REL.equals(rel)
- && "application/atom+xml".equals(type)) {
- SpreadsheetEntry sheet = (SpreadsheetEntry) entry;
- sheet.setWorksheetFeedUri(href);
- }
- }
-}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/parser/xml/XmlSpreadsheetsGDataParserFactory.java b/src/com/google/wireless/gdata2/spreadsheets/parser/xml/XmlSpreadsheetsGDataParserFactory.java
deleted file mode 100644
index 8aaf300..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/parser/xml/XmlSpreadsheetsGDataParserFactory.java
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2007 The Android Open Source Project
-package com.google.wireless.gdata2.spreadsheets.parser.xml;
-
-import com.google.wireless.gdata2.client.GDataParserFactory;
-import com.google.wireless.gdata2.data.Entry;
-import com.google.wireless.gdata2.parser.GDataParser;
-import com.google.wireless.gdata2.parser.ParseException;
-import com.google.wireless.gdata2.parser.xml.XmlParserFactory;
-import com.google.wireless.gdata2.serializer.GDataSerializer;
-import com.google.wireless.gdata2.spreadsheets.data.CellEntry;
-import com.google.wireless.gdata2.spreadsheets.data.ListEntry;
-import com.google.wireless.gdata2.spreadsheets.data.SpreadsheetEntry;
-import com.google.wireless.gdata2.spreadsheets.data.WorksheetEntry;
-import com.google.wireless.gdata2.spreadsheets.serializer.xml.XmlCellEntryGDataSerializer;
-import com.google.wireless.gdata2.spreadsheets.serializer.xml.XmlListEntryGDataSerializer;
-
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
-import java.io.InputStream;
-
-/**
- * A GDataParserFactory capable of handling Spreadsheets.
- */
-public class XmlSpreadsheetsGDataParserFactory implements GDataParserFactory {
- /*
- * @see GDataParserFactory
- */
- public XmlSpreadsheetsGDataParserFactory(XmlParserFactory xmlFactory) {
- this.xmlFactory = xmlFactory;
- }
-
- /** Intentionally private. */
- private XmlSpreadsheetsGDataParserFactory() {
- }
-
- /*
- * Creates a parser for the indicated feed, assuming the default feed type.
- * The default type is specified on {@link SpreadsheetsClient#DEFAULT_FEED}.
- *
- * @param is The stream containing the feed to be parsed.
- * @return A GDataParser capable of parsing the feed as the default type.
- * @throws ParseException if the feed could not be parsed for any reason
- */
- public GDataParser createParser(InputStream is) throws ParseException {
- // attempt a default
- return createParser(SpreadsheetEntry.class, is);
- }
-
- /*
- * Creates a parser of the indicated type for the indicated feed.
- *
- * @param feedType The type of the feed; must be one of the constants on
- * {@link SpreadsheetsClient}.
- * @return A parser capable of parsing the feed as the indicated type.
- * @throws ParseException if the feed could not be parsed for any reason
- */
- public GDataParser createParser(Class entryClass, InputStream is)
- throws ParseException {
- try {
- XmlPullParser xmlParser = xmlFactory.createParser();
- if (entryClass == SpreadsheetEntry.class) {
- return new XmlSpreadsheetsGDataParser(is, xmlParser);
- } else if (entryClass == WorksheetEntry.class) {
- return new XmlWorksheetsGDataParser(is, xmlParser);
- } else if (entryClass == CellEntry.class) {
- return new XmlCellsGDataParser(is, xmlParser);
- } else if (entryClass == ListEntry.class) {
- return new XmlListGDataParser(is, xmlParser);
- } else {
- throw new ParseException("Unrecognized feed requested.");
- }
- } catch (XmlPullParserException e) {
- throw new ParseException("Failed to create parser", e);
- }
- }
-
- /*
- * Creates a serializer capable of handling the indicated entry.
- *
- * @param The Entry to be serialized to an XML string.
- * @return A GDataSerializer capable of handling the indicated entry.
- * @throws IllegalArgumentException if Entry is not a supported type (which
- * currently includes only {@link ListEntry} and {@link CellEntry}.)
- */
- public GDataSerializer createSerializer(Entry entry) {
- if (entry instanceof ListEntry) {
- return new XmlListEntryGDataSerializer(xmlFactory, entry);
- } else if (entry instanceof CellEntry) {
- return new XmlCellEntryGDataSerializer(xmlFactory, entry);
- } else {
- throw new IllegalArgumentException(
- "Expected a ListEntry or CellEntry");
- }
- }
-
- /** The XmlParserFactory to use to actually process XML streams. */
- private XmlParserFactory xmlFactory;
-}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/parser/xml/XmlWorksheetsGDataParser.java b/src/com/google/wireless/gdata2/spreadsheets/parser/xml/XmlWorksheetsGDataParser.java
deleted file mode 100755
index 9007b6b..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/parser/xml/XmlWorksheetsGDataParser.java
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright 2007 The Android Open Source Project
-package com.google.wireless.gdata2.spreadsheets.parser.xml;
-
-import com.google.wireless.gdata2.data.Entry;
-import com.google.wireless.gdata2.data.Feed;
-import com.google.wireless.gdata2.data.StringUtils;
-import com.google.wireless.gdata2.data.XmlUtils;
-import com.google.wireless.gdata2.parser.ParseException;
-import com.google.wireless.gdata2.parser.xml.XmlGDataParser;
-import com.google.wireless.gdata2.spreadsheets.data.WorksheetEntry;
-import com.google.wireless.gdata2.spreadsheets.data.WorksheetFeed;
-
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Parser helper for non-Atom data in a GData Spreadsheets Worksheets meta-feed.
- */
-public class XmlWorksheetsGDataParser extends XmlGDataParser {
- /**
- * The rel ID used by the server to identify the cells feed for a worksheet
- */
- protected static final String CELLS_FEED_REL =
- "http://schemas.google.com/spreadsheets/2006#cellsfeed";
-
- /**
- * The rel ID used by the server to identify the list feed for a worksheet
- */
- protected static final String LIST_FEED_REL =
- "http://schemas.google.com/spreadsheets/2006#listfeed";
-
- /**
- * Creates a new XmlWorksheetsGDataParser.
- *
- * @param is the stream from which to read the data
- * @param xmlParser the XmlPullParser to use to parse the raw XML
- * @throws ParseException if the super-class throws one
- */
- public XmlWorksheetsGDataParser(InputStream is, XmlPullParser xmlParser)
- throws ParseException {
- super(is, xmlParser);
- }
-
- /* (non-JavaDoc)
- * Creates a new Entry that can handle the data parsed by this class.
- */
- protected Entry createEntry() {
- return new WorksheetEntry();
- }
-
- /* (non-JavaDoc)
- * Creates a new Feed that can handle the data parsed by this class.
- */
- protected Feed createFeed() {
- return new WorksheetFeed();
- }
-
- /* (non-JavaDoc)
- * Callback to handle non-Atom data present in an Atom entry tag.
- */
- protected void handleExtraElementInEntry(Entry entry)
- throws XmlPullParserException, IOException {
- XmlPullParser parser = getParser();
- if (!(entry instanceof WorksheetEntry)) {
- throw new IllegalArgumentException("Expected WorksheetEntry!");
- }
- WorksheetEntry worksheet = (WorksheetEntry) entry;
-
- // the only custom elements are rowCount and colCount
- String name = parser.getName();
- if ("rowCount".equals(name)) {
- worksheet.setRowCount(StringUtils.parseInt(XmlUtils
- .extractChildText(parser), 0));
- } else if ("colCount".equals(name)) {
- worksheet.setColCount(StringUtils.parseInt(XmlUtils
- .extractChildText(parser), 0));
- }
- }
-
- /* (non-JavaDoc)
- * Callback to handle non-Atom links present in an Atom entry tag. Used to
- * pick out a worksheet's cells and list feeds.
- */
- protected void handleExtraLinkInEntry(String rel, String type, String href,
- Entry entry) throws XmlPullParserException, IOException {
- if (LIST_FEED_REL.equals(rel) && "application/atom+xml".equals(type)) {
- WorksheetEntry sheet = (WorksheetEntry) entry;
- sheet.setListFeedUri(href);
- } else if (CELLS_FEED_REL.equals(rel)
- && "application/atom+xml".equals(type)) {
- WorksheetEntry sheet = (WorksheetEntry) entry;
- sheet.setCellFeedUri(href);
- }
- }
-}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/parser/xml/package.html b/src/com/google/wireless/gdata2/spreadsheets/parser/xml/package.html
deleted file mode 100644
index 1c9bf9d..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/parser/xml/package.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<html>
-<body>
- {@hide}
-</body>
-</html>
diff --git a/src/com/google/wireless/gdata2/spreadsheets/serializer/package.html b/src/com/google/wireless/gdata2/spreadsheets/serializer/package.html
deleted file mode 100644
index 1c9bf9d..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/serializer/package.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<html>
-<body>
- {@hide}
-</body>
-</html>
diff --git a/src/com/google/wireless/gdata2/spreadsheets/serializer/xml/XmlCellEntryGDataSerializer.java b/src/com/google/wireless/gdata2/spreadsheets/serializer/xml/XmlCellEntryGDataSerializer.java
deleted file mode 100755
index 9a382c4..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/serializer/xml/XmlCellEntryGDataSerializer.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package com.google.wireless.gdata2.spreadsheets.serializer.xml;
-
-import com.google.wireless.gdata2.data.Entry;
-import com.google.wireless.gdata2.data.StringUtils;
-import com.google.wireless.gdata2.parser.ParseException;
-import com.google.wireless.gdata2.parser.xml.XmlParserFactory;
-import com.google.wireless.gdata2.serializer.xml.XmlEntryGDataSerializer;
-import com.google.wireless.gdata2.spreadsheets.data.CellEntry;
-
-import org.xmlpull.v1.XmlSerializer;
-
-import java.io.IOException;
-
-/**
- * A serializer for handling GData Spreadsheets Cell entries.
- */
-public class XmlCellEntryGDataSerializer extends XmlEntryGDataSerializer {
- /** The namespace to use for the GData Cell attributes */
- public static final String NAMESPACE_GS = "gs";
-
- /** The URI of the GData Cell namespace */
- public static final String NAMESPACE_GS_URI =
- "http://schemas.google.com/spreadsheets/2006";
-
- /**
- * Creates a new XmlCellEntryGDataSerializer.
- *
- * @param entry the entry to be serialized
- */
- public XmlCellEntryGDataSerializer(XmlParserFactory xmlFactory,
- Entry entry) {
- super(xmlFactory, entry);
- }
-
- /**
- * Sets up the GData Cell namespace.
- *
- * @param serializer the serializer to use
- */
- protected void declareExtraEntryNamespaces(XmlSerializer serializer)
- throws IOException {
- serializer.setPrefix(NAMESPACE_GS, NAMESPACE_GS_URI);
- }
-
- /*
- * Handles the non-Atom data belonging to the GData Spreadsheets Cell
- * namespace.
- *
- * @param serializer the XML serializer to use
- * @param format unused
- * @throws ParseException if the data could not be serialized
- * @throws IOException on network error
- */
- protected void serializeExtraEntryContents(XmlSerializer serializer,
- int format) throws ParseException, IOException {
- CellEntry entry = (CellEntry) getEntry();
- int row = entry.getRow();
- int col = entry.getCol();
- String value = entry.getValue();
- String inputValue = entry.getInputValue();
- if (row < 0 || col < 0) {
- throw new ParseException("Negative row or column value");
- }
-
- // cells require row & col attrs, and allow inputValue and
- // numericValue
- serializer.startTag(NAMESPACE_GS_URI, "cell");
- serializer.attribute(null /* ns */, "row", "" + row);
- serializer.attribute(null /* ns */, "col", "" + col);
- if (inputValue != null) {
- serializer.attribute(null /* ns */, "inputValue", inputValue);
- }
- if (entry.hasNumericValue()) {
- serializer.attribute(null /* ns */, "numericValue", entry
- .getNumericValue());
- }
-
- // set the child text...
- value = StringUtils.isEmpty(value) ? "" : value;
- serializer.text(value);
- serializer.endTag(NAMESPACE_GS_URI, "cell");
- }
-}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/serializer/xml/XmlListEntryGDataSerializer.java b/src/com/google/wireless/gdata2/spreadsheets/serializer/xml/XmlListEntryGDataSerializer.java
deleted file mode 100755
index 3f0c439..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/serializer/xml/XmlListEntryGDataSerializer.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.google.wireless.gdata2.spreadsheets.serializer.xml;
-
-import com.google.wireless.gdata2.data.Entry;
-import com.google.wireless.gdata2.parser.ParseException;
-import com.google.wireless.gdata2.parser.xml.XmlParserFactory;
-import com.google.wireless.gdata2.serializer.xml.XmlEntryGDataSerializer;
-import com.google.wireless.gdata2.spreadsheets.data.ListEntry;
-
-import org.xmlpull.v1.XmlSerializer;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Vector;
-
-/**
- * A serializer for handling GData Spreadsheets List entries.
- */
-public class XmlListEntryGDataSerializer extends XmlEntryGDataSerializer {
- /** The prefix to use for the GData Spreadsheets list namespace */
- public static final String NAMESPACE_GSX = "gsx";
-
- /** The URI of the GData Spreadsheets list namespace */
- public static final String NAMESPACE_GSX_URI =
- "http://schemas.google.com/spreadsheets/2006/extended";
-
- /**
- * Creates a new XmlListEntryGDataSerializer.
- *
- * @param entry the entry to be serialized
- */
- public XmlListEntryGDataSerializer(XmlParserFactory xmlFactory, Entry entry) {
- super(xmlFactory, entry);
- }
-
- /**
- * Sets up the GData Spreadsheets list namespace.
- *
- * @param serializer the XML serializer to use
- * @throws IOException on stream errors.
- */
- protected void declareExtraEntryNamespaces(XmlSerializer serializer)
- throws IOException {
- serializer.setPrefix(NAMESPACE_GSX, NAMESPACE_GSX_URI);
- }
-
- /* (non-JavaDoc)
- * Handles the non-Atom data belonging to the GData Spreadsheets Cell
- * namespace.
- */
- protected void serializeExtraEntryContents(XmlSerializer serializer,
- int format) throws ParseException, IOException {
- ListEntry entry = (ListEntry) getEntry();
- Vector names = entry.getNames();
- String name = null;
- String value = null;
- Iterator it = names.iterator();
- while (it.hasNext()) {
- name = (String) it.next();
- value = entry.getValue(name);
- if (value != null) {
- serializer.startTag(NAMESPACE_GSX_URI, name);
- serializer.text(value);
- serializer.endTag(NAMESPACE_GSX_URI, name);
- }
- }
- }
-}
diff --git a/src/com/google/wireless/gdata2/spreadsheets/serializer/xml/package.html b/src/com/google/wireless/gdata2/spreadsheets/serializer/xml/package.html
deleted file mode 100644
index 1c9bf9d..0000000
--- a/src/com/google/wireless/gdata2/spreadsheets/serializer/xml/package.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<html>
-<body>
- {@hide}
-</body>
-</html>