Package com.google.gdata.data.spreadsheet

Examples of com.google.gdata.data.spreadsheet.SpreadsheetFeed


    if (!isServiceInitialized())
      initializeService();
   
    FeedURLFactory factory = FeedURLFactory.getDefault();
     
    SpreadsheetFeed feed = (SpreadsheetFeed)spreadsheetService.getFeed(factory.getSpreadsheetsFeedUrl(), SpreadsheetFeed.class);
     
      return feed.getEntries();
  }
View Full Code Here


public class GDocParser {
    public static String onSupport2() throws AuthenticationException, MalformedURLException, IOException,
        ServiceException, URISyntaxException {
        SpreadsheetService service = new SpreadsheetService("MySpreadsheetIntegration-foo");
        URL url = new URL("https://spreadsheets.google.com/feeds/spreadsheets/private/full?title=GSS-Dev-Schedule");
        SpreadsheetFeed feed = service.getFeed(url, SpreadsheetFeed.class);
        List<SpreadsheetEntry> spreadsheets = feed.getEntries();
        SpreadsheetEntry spreadsheet = spreadsheets.get(0);
        WorksheetFeed worksheetFeed = service.getFeed(spreadsheet.getWorksheetFeedUrl(), WorksheetFeed.class);
        List<WorksheetEntry> worksheets = worksheetFeed.getEntries();
        WorksheetEntry worksheet = worksheets.get(0);
        // fetch A1 only
View Full Code Here

    return photoService.insert(new URL(PWA_API_PREFIX + "default"), myPhoto);

  }

  public SpreadsheetEntry findSpreadsheetEntry(String title) throws IOException, ServiceException {
    SpreadsheetFeed feed = spreadsheetService.getFeed(spreadsheetFeedUri, SpreadsheetFeed.class);
    for (SpreadsheetEntry entry : feed.getEntries()) {
      if (entry.getTitle().getPlainText().equals(title))
        return entry;
    }
    return null;
  }
View Full Code Here

    }
   
    private void listSpreadsheets(DocsService service, JSONWriter writer)
            throws IOException, ServiceException, JSONException {
        URL metafeedUrl = new URL("https://spreadsheets.google.com/feeds/spreadsheets/private/full");
        SpreadsheetFeed feed = service.getFeed(metafeedUrl, SpreadsheetFeed.class);
        for (SpreadsheetEntry entry : feed.getEntries()) {
            writer.object();
            writer.key("docId"); writer.value(entry.getId());
            writer.key("docLink"); writer.value(entry.getHtmlLink().getHref());
            writer.key("docSelfLink"); writer.value(entry.getSelfLink().getHref());
            writer.key("title"); writer.value(entry.getTitle().getPlainText());
View Full Code Here

  public List<Map<String, String>> getAllSpreadSheets() throws IOException, ServiceException {

    FeedURLFactory urlFactory = FeedURLFactory.getDefault();
    SpreadsheetQuery spreadsheetQuery =
      new SpreadsheetQuery(urlFactory.getSpreadsheetsFeedUrl());
    SpreadsheetFeed spreadsheetFeed = ss.query(spreadsheetQuery, SpreadsheetFeed.class);
    List<SpreadsheetEntry> entries = spreadsheetFeed.getEntries();

    List<Map<String, String>> list = new ArrayList<Map<String, String>>();
    for (SpreadsheetEntry spreadSheet : entries) {
      Map<String, String> row = new HashMap<String, String>();
      row.put("key", spreadSheet.getKey());
View Full Code Here

      // Re-get in "spreadsheet".SpreadsheetEntry
      FeedURLFactory urlFactory = FeedURLFactory.getDefault();
      SpreadsheetQuery spreadsheetQuery =
        new SpreadsheetQuery(urlFactory.getSpreadsheetsFeedUrl());
      spreadsheetQuery.setTitleQuery(fileName);
      SpreadsheetFeed spreadsheetFeed = ss.query(spreadsheetQuery, SpreadsheetFeed.class);
      SpreadsheetEntry spreadsheetEntry = spreadsheetFeed.getEntries().get(0);

      // Modify a default worksheet
      URL worksheetFeedUrl = spreadsheetEntry.getWorksheetFeedUrl();
      WorksheetFeed worksheetFeed = ss.getFeed(worksheetFeedUrl, WorksheetFeed.class);
      WorksheetEntry defaultWorksheet = worksheetFeed.getEntries().get(0);
View Full Code Here

    // Search Spreadsheet
    FeedURLFactory urlFactory = FeedURLFactory.getDefault();
    SpreadsheetQuery spreadsheetQuery =
      new SpreadsheetQuery(urlFactory.getSpreadsheetsFeedUrl());
    SpreadsheetFeed spreadsheetFeed = ss.query(spreadsheetQuery, SpreadsheetFeed.class);
    SpreadsheetEntry spreadsheetEntry = null;
    for (SpreadsheetEntry entry : spreadsheetFeed.getEntries()) {
      if (ssKey.equals(entry.getKey())) {
        spreadsheetEntry = entry;
        logger.info("Spreadsheet:" + ssKey + " is found.");
        break;
      }
View Full Code Here

    throws EPAuthenticationException {
    List<SpreadsheetEntry> returnList = null;

    try {
      SpreadsheetService ssService = getSsService();
      SpreadsheetFeed ssFeed = ssService.getFeed(
          new URL(SPREADSHEETS_META_FEED),
          SpreadsheetFeed.class);
      returnList = ssFeed.getEntries();
    } catch (com.google.gdata.util.AuthenticationException authEx) {
      throw new EPAuthenticationException(
          "SS list read access not available");
    } catch (com.google.gdata.util.ServiceException svcex) {
      System.err.println("ServiceException while retrieving " +
View Full Code Here

   *
   */
  public void loadSheet(BufferedReader reader) throws IOException,
      ServiceException {
    // Get the spreadsheet to load
    SpreadsheetFeed feed = service.getFeed(factory.getSpreadsheetsFeedUrl(),
        SpreadsheetFeed.class);
    List spreadsheets = feed.getEntries();
    int spreadsheetIndex = getIndexFromUser(reader, spreadsheets,
        "spreadsheet");
    SpreadsheetEntry spreadsheet = (SpreadsheetEntry) spreadsheets
        .get(spreadsheetIndex);

View Full Code Here

   * Asks Google Spreadsheets for a list of all the spreadsheets
   * the user has access to.
   * @return true if successful
   */
  private boolean retrieveSpreadsheetList() {
    SpreadsheetFeed feed;

    try {
      feed = service.getFeed(
          factory.getSpreadsheetsFeedUrl(), SpreadsheetFeed.class);
    } catch (IOException e) {
      SpreadsheetApiDemo.showErrorBox(e);
      return false;
    } catch (ServiceException e) {
      SpreadsheetApiDemo.showErrorBox(e);
      return false;
    }

    this.spreadsheetEntries = feed.getEntries();

    return true;
  }
View Full Code Here

TOP

Related Classes of com.google.gdata.data.spreadsheet.SpreadsheetFeed

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.