Package com.google.gdata.data

Examples of com.google.gdata.data.ParseSource


  @SuppressWarnings("unchecked")
  private <F extends BaseFeed<?, ?>> F getFeed(GDataRequest request,
      Class<F> feedClass, DateTime ifModifiedSince) throws IOException,
      ServiceException {

    ParseSource feedSource = null;
    try {
      startVersionScope();
      request.setIfModifiedSince(ifModifiedSince);
      request.execute();
      feedSource = request.getParseSource();
View Full Code Here


   */
  @SuppressWarnings("unchecked")
  private <F extends BaseFeed<?, ?>> F getFeed(GDataRequest request,
      Class<F> feedClass, String etag) throws IOException, ServiceException {

    ParseSource feedSource = null;
    try {
      startVersionScope();
      request.setEtag(etag);
      request.execute();
      feedSource = request.getParseSource();
View Full Code Here

   *         entry.
   */
  public <E extends BaseEntry<?>> E getEntry(URL entryUrl, Class<E> entryClass,
      DateTime ifModifiedSince) throws IOException, ServiceException {

    ParseSource entrySource = null;
    GDataRequest request = createEntryRequest(entryUrl);
    try {
      startVersionScope();
      request.setIfModifiedSince(ifModifiedSince);
      request.execute();
View Full Code Here

   *         entry.
   */
  public <E extends BaseEntry<?>> E getEntry(URL entryUrl, Class<E> entryClass,
      String etag) throws IOException, ServiceException {

    ParseSource entrySource = null;
    GDataRequest request = createEntryRequest(entryUrl);
    try {
      startVersionScope();
      request.setEtag(etag);
      request.execute();
View Full Code Here

    if (entry == null) {
      throw new NullPointerException("Must supply entry");
    }

    ParseSource resultEntrySource = null;
    try {
      startVersionScope();
      GDataRequest request = createInsertRequest(feedUrl);
      XmlWriter xw = request.getRequestWriter();
      entry.generateAtom(xw, extProfile);
View Full Code Here

   * @see BaseFeed#insert(BaseEntry)
   */
  @SuppressWarnings("unchecked")
  public <F extends BaseFeed<?, ?>> F batch(URL feedUrl, F inputFeed)
      throws IOException, ServiceException, BatchInterruptedException {
    ParseSource resultFeedSource = null;
    GDataRequest request = createInsertRequest(feedUrl);
    try {
      startVersionScope();
      XmlWriter xw = request.getRequestWriter();
      inputFeed.generateAtom(xw, extProfile);
View Full Code Here

   */
  @SuppressWarnings("unchecked")
  public <E extends BaseEntry<?>> E update(URL entryUrl, E entry, String etag)
      throws IOException, ServiceException {

    ParseSource resultEntrySource = null;
    GDataRequest request = createUpdateRequest(entryUrl);

    try {
      startVersionScope();
      request.setEtag(etag);
View Full Code Here

    }
    return responseStream;
  }

  public ParseSource getParseSource() throws IOException {
    return new ParseSource(getResponseStream());
  }
View Full Code Here

   */
  protected GsaEntry getEntryFromFile(String inputFileName) throws ParseException,
      IOException, ServiceException {
    GsaEntry entry = null;

    ParseSource source = new ParseSource(new FileInputStream(inputFileName));
    entry = GsaEntry.readEntry(source, GsaEntry.class, new ExtensionProfile());

    return entry;
  }
View Full Code Here

            if (contentType != null && contentType.startsWith("application/atom+xml")) {

                // Read the entry from the request
                com.google.gdata.data.Entry feedEntry = null;
                try {
                    ParseSource source = new ParseSource(request.getReader());
                    feedEntry = com.google.gdata.data.Entry.readEntry(source, com.google.gdata.data.Entry.class, null);
                } catch (ParseException pe) {
                    throw new ServletException(pe);
                } catch (com.google.gdata.util.ParseException e) {
                    // TODO Auto-generated catch block
View Full Code Here

TOP

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

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.