Package com.google.gdata.data

Examples of com.google.gdata.data.Feed


    // The default extension profile is configured to accept arbitrary XML
    // at the feed or entry level. A client never wants to lose any
    // foreign markup, so capture everything even if not explicitly
    // understood.
    new Feed().declareExtensions(extProfile);
  }
View Full Code Here


      // modified before the given date.  Logically, we only care about those
      // entries that were modified recently.
      query.setUpdatedMin(ifModifiedSince);
    }
   
    Feed feed = null;
    try {
      feed = (Feed) service.query(query, Feed.class, ifModifiedSince);
    } catch (NotModifiedException nme) {
      // excellent! no work to do
      return new LinkedList();
    } catch (ServiceException se) {
      LOGGER.severe(se.toString());
      throw new RepositoryException(se);
    } catch (IOException ioe) {
      LOGGER.severe(ioe.toString());
      throw new RepositoryException(ioe);
    }
    List entries = feed.getEntries();
    Collections.sort(entries, comparator);
    Entry lastEntry = (Entry) entries.get(entries.size() - 1);
    lastEntryId = lastEntry.getId();
    lastEntryCheckpoint = fetchTime.toString() + "!" + lastEntryId;
   
View Full Code Here

   
    Collections.reverse(entries);
    Collections.rotate(entries, entries.size() / 2);
    Collections.swap(entries, 0, entries.size() - 1);
   
    Feed riggedFeed = new Feed();
    riggedFeed.getEntries().addAll(entries);
   
    RiggedCalendarService service = new RiggedCalendarService(riggedFeed);
   
    CalendarEntryProvider provider =
      new CalendarEntryProvider(service, "admin@example.com", "secret");
View Full Code Here

      entry.setUpdated(sometime);
      entry.setId("" + idx);
      entries.add(entry);
    }
   
    Feed riggedFeed = new Feed();
    riggedFeed.getEntries().addAll(entries);
    RiggedCalendarService service = new RiggedCalendarService(riggedFeed);
    CalendarEntryProvider provider =
      new CalendarEntryProvider(service, "admin@example.com", "secret");
   
    String checkpoint = sometime.toString() + "!" + (SKIP - 1);
View Full Code Here

    Entry entry = new Entry();
    entry.setUpdated(DateTime.now());
    entry.setId("meow");
    entries.add(entry);
   
    Feed riggedFeed = new Feed();
    riggedFeed.getEntries().addAll(entries);
    RiggedCalendarService service = new RiggedCalendarService(riggedFeed);
    CalendarEntryProvider provider =
      new CalendarEntryProvider(service, "admin@example.com", "secret");
   
View Full Code Here

            //System.out.println("[Debug Info] GdataBindingInvoker.GetAllInvoker.invoke---feedURL: " + uri);

            try {

                Feed feed = googleService.getFeed(new URL(uri), Feed.class);
                msg.setBody(feed);

            } catch (ResourceNotFoundException ex) {
                msg.setFaultBody(new ResourceNotFoundException("Invalid Resource at " + uri));
            } catch (ServiceException ex) {
View Full Code Here

           
            //System.out.println("[Debug Info] GdataBindingInvoker.QueryInvoker.invoke---feedURL: " + uri);

            try {

              Feed resultFeed = googleService.query(myQuery, Feed.class);
                msg.setBody(resultFeed);

            } catch (ResourceNotFoundException ex) {
                msg.setFaultBody(new ResourceNotFoundException("Invalid Resource at " + uri));
            } catch (ServiceException ex) {
View Full Code Here

   * @param feedUrl Meta feed URL to be user to get the list of
   * blogs/albums/etc. depending on the service
   * @return Feed object containing the list of blogs/albums/etc.
   */
  public Feed getMetaFeed() {
    Feed metaFeed = null;
    try {
      metaFeed = service.getFeed(feedUrl, Feed.class);
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

            System.out.println("[Debug Info] GdataBindingInvoker.GetAllInvoker.invoke---feedURL: " + uri);

            try {

                Feed feed = googleService.getFeed(new URL(uri), Feed.class);
                msg.setBody(feed);

            } catch (ResourceNotFoundException ex) {
                msg.setFaultBody(new ResourceNotFoundException("Invalid Resource at " + uri));
            } catch (ServiceException ex) {
View Full Code Here

           
            System.out.println("[Debug Info] GdataBindingInvoker.QueryInvoker.invoke---feedURL: " + uri);

            try {

              Feed resultFeed = googleService.query(myQuery, Feed.class);
                msg.setBody(resultFeed);

            } catch (ResourceNotFoundException ex) {
                msg.setFaultBody(new ResourceNotFoundException("Invalid Resource at " + uri));
            } catch (ServiceException ex) {
View Full Code Here

TOP

Related Classes of com.google.gdata.data.Feed

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.