Search in sources :

Example 1 with FeedURLFactory

use of com.google.gdata.client.spreadsheet.FeedURLFactory in project OpenRefine by OpenRefine.

the class GDataImportingController method getWorksheetEntriesForDoc.

private List<WorksheetEntry> getWorksheetEntriesForDoc(URL docUrl) throws IOException, ServiceException {
    SpreadsheetService spreadsheetService = GDataExtension.getSpreadsheetService(null);
    String visibility = "public";
    FeedURLFactory factory = FeedURLFactory.getDefault();
    String key = GDataExtension.getSpreadsheetID(docUrl);
    docUrl = factory.getWorksheetFeedUrl(key, visibility, "values");
    WorksheetFeed feed = spreadsheetService.getFeed(docUrl, WorksheetFeed.class);
    return feed.getEntries();
}
Also used : FeedURLFactory(com.google.gdata.client.spreadsheet.FeedURLFactory) SpreadsheetService(com.google.gdata.client.spreadsheet.SpreadsheetService) WorksheetFeed(com.google.gdata.data.spreadsheet.WorksheetFeed)

Aggregations

FeedURLFactory (com.google.gdata.client.spreadsheet.FeedURLFactory)1 SpreadsheetService (com.google.gdata.client.spreadsheet.SpreadsheetService)1 WorksheetFeed (com.google.gdata.data.spreadsheet.WorksheetFeed)1