Package com.google.gdata.client

Examples of com.google.gdata.client.Query


    IssueCommentsFeed resultFeed = null;
    try {
      URL feedUrl = new URL("http://code.google.com/feeds/issues/p/" + project + "/issues/"
          + issueId + "/comments/full");
      ;
      Query query = new Query(feedUrl);
      query.setStartIndex(startIndex);
      resultFeed = service.getFeed(query, IssueCommentsFeed.class);
    } catch (MalformedURLException e) {
      log.log(Level.SEVERE, "getComments() failed", e);
    } catch (IOException e) {
      log.log(Level.SEVERE, "getComments() failed", e);
View Full Code Here


      ContactsService myService = new ContactsService("unknown");

      myService.setUserCredentials(authUser, authPassword);

      URL feedUrl = new URL(url);
      Query myQuery = new Query(feedUrl);

      myQuery.setStartIndex(firstResult + 1);
      myQuery.setMaxResults(maxResults);

      ContactFeed resultFeed = myService.query(myQuery, ContactFeed.class);

      for (ContactEntry entry : resultFeed.getEntries())
      {
View Full Code Here

      ContactsService myService = new ContactsService("unknown");

      myService.setUserCredentials(authUser, authPassword);

      URL feedUrl = new URL(url);
      Query myQuery = new Query(feedUrl);
      ContactFeed resultFeed = myService.query(myQuery, ContactFeed.class);

      count = resultFeed.getTotalResults();
    }
    catch (MalformedURLException x)
View Full Code Here

            // Send an HTTP GET
            GetMethod getMethod = new GetMethod(uri);
            getMethod.setRequestHeader("Authorization", authorizationHeader);

            Object[] args = (Object[])msg.getBody();
            Query myQuery = (Query)args[0];
           
            System.out.println("[Debug Info] GdataBindingInvoker.QueryInvoker.invoke---feedURL: " + uri);

            try {
View Full Code Here

    }
   
   
    @Test
    public void testClientQuery() throws Exception {
        Query myQuery = new Query(new URL("http://www.google.com/m8/feeds/contacts/default/base"));
        myQuery.setMaxResults(100);
        //myQuery.setUpdatedMin(startTime);
        myQuery.setUpdatedMax(DateTime.now());
        Feed resultFeed = testService.clientQuery(myQuery);       
        System.out.println("Query result feed title: " + resultFeed.getTitle().getPlainText());   
        System.out.println("Query result entry number: "+ resultFeed.getEntries().size());
        //assertEquals("gdata binding tuscany test", resultFeed.getTitle().getPlainText());
     }
View Full Code Here

   
    @Test
    public void testClientQuery() throws Exception {
      String feedUrlString = "http://picasaweb.google.com/data/feed/api/user/haibotuscany/album/flowers";
      URL feedURL = new URL(feedUrlString);  
      Query myQuery = new Query(feedURL);
        myQuery.setMaxResults(100);
        myQuery.setFullTextQuery("photo");   
        Feed resultFeed = testService.clientQuery(myQuery);       
        System.out.println("Query result feed title: " + resultFeed.getTitle().getPlainText());   
        System.out.println("Query result entry number: "+ resultFeed.getEntries().size());
        //assertEquals("gdata binding tuscany test", resultFeed.getTitle().getPlainText());
     }
View Full Code Here

    }
   
   
    @Test
    public void testClientQuery() throws Exception {
        Query myQuery = new Query(new URL("http://www.google.com/calendar/feeds/haibotuscany@gmail.com/private/full"));
        myQuery.setMaxResults(100);
        //myQuery.setUpdatedMin(startTime);
        myQuery.setUpdatedMax(DateTime.now());
       
        //Google Calendar service supports full-text search
        String queryString = "event0";
        myQuery.setFullTextQuery(queryString);
       
        Feed resultFeed = testService.clientQuery(myQuery);       
        System.out.println("Query result feed title: " + resultFeed.getTitle().getPlainText());   
        System.out.println("Query result entry number: "+ resultFeed.getEntries().size());
        //assertEquals("gdata binding tuscany test", resultFeed.getTitle().getPlainText());
View Full Code Here

    }
   
   
    @Test
    public void testClientQuery() throws Exception {
        Query myQuery = new Query(new URL("http://haibotuscany.blogspot.com/feeds/posts/default"));
        myQuery.setMaxResults(100);
        //myQuery.setUpdatedMin(startTime);
        myQuery.setUpdatedMax(DateTime.now());
        Feed resultFeed = testService.clientQuery(myQuery);       
        System.out.println("Query result feed title: " + resultFeed.getTitle().getPlainText());   
        System.out.println("Query result entry number: "+ resultFeed.getEntries().size());
        //assertEquals("gdata binding tuscany test", resultFeed.getTitle().getPlainText());
     }
View Full Code Here

  private void printAlbumLocation(String uname)
      throws IOException, ServiceException {
    String albumsUrl = API_PREFIX + uname;
    String fields = "entry(title,gphoto:id,gphoto:location)";

    Query albumQuery = new Query(new URL(albumsUrl));
    albumQuery.setFields(fields);

    AlbumFeed feed = service.query(albumQuery, AlbumFeed.class);
    for (GphotoEntry entry : feed.getEntries()) {
      if (entry instanceof AlbumEntry) {
        AlbumEntry albumEntry = (AlbumEntry) entry;
View Full Code Here

    String albumId = IN.readLine();

    // Get the current album entry
    String albumEntryUrl = API_PREFIX + uname + "/" + albumId;
    String fields = "@gd:etag,gphoto:location";
    Query patchQuery = new Query(new URL(albumEntryUrl));
    patchQuery.setFields(fields);
    AlbumEntry entry = service.getEntry(patchQuery.getUrl(), AlbumEntry.class);
    OUT.println("Current location: " + entry.getLocation());

    // Update the location in the album entry
    OUT.println("Specify new location: ");
    String newLocation = IN.readLine();
View Full Code Here

TOP

Related Classes of com.google.gdata.client.Query

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.