Package com.google.gdata.model

Examples of com.google.gdata.model.Element


    public ClientOutputProperties(GDataRequest req, Object source) {
      super(req);

      if (source instanceof Element) {
        Element element = (Element) source;
        ElementKey<?, ?> key = element.getElementKey();
        elementMetadata = getSchema().bind(key, getMetadataContext());
      } else {
        elementMetadata = null;
      }
    }
View Full Code Here


   * Sets the total number of results associated with this feed. The value may
   * be larger than the number of contained entries for paged feeds. A value of
   * {@link Query#UNDEFINED} indicates the total size is undefined.
   */
  public void setTotalResults(int v) {
    setElement(TOTAL_RESULTS, new Element(TOTAL_RESULTS).setTextValue(v));
  }
View Full Code Here

  /**
   * Sets the starting index of the contained entries for paged feeds. A value
   * of {@link Query#UNDEFINED} indicates the start index is undefined.
   */
  public void setStartIndex(int v) {
    setElement(START_INDEX, new Element(START_INDEX).setTextValue(v));
  }
View Full Code Here

   * Sets the number of items that will be returned per page for paged feeds. A
   * value of {@link Query#UNDEFINED} indicates the page item count is
   * undefined.
   */
  public void setItemsPerPage(int v) {
    setElement(ITEMS_PER_PAGE, new Element(ITEMS_PER_PAGE).setTextValue(v));
  }
View Full Code Here

   * and adapting the feed to that kind if an appropriate adaptation was
   * found. This will return the most specific subtype of the narrowed type.
   */
  @Override
  protected Element narrow(ElementMetadata<?,?> meta, ValidationContext vc) {
    Element narrowed = this;
    for (Category category : getCategories()) {
      if (Namespaces.gKind.equals(category.getScheme())) {
        narrowed = adapt(narrowed, meta, category.getTerm());
      }
    }
View Full Code Here

      // and X as the version number. In {@link UriTemplate} we've
      // made the choice that it means a feed request. Therefore "-"
      // cannot be an entry ID.
      throw new IllegalArgumentException("Entry.id must not be equal to '-'.");
    }
    setElement(ID, (v == null) ? null : new Element(ID).setTextValue(v));
  }
View Full Code Here

    if (v != null && v.getTzShift() == null) {
      throw new IllegalArgumentException(
          "Entry.published must have a timezone.");
    }
    setElement(PUBLISHED,
        (v == null) ? null : new Element(PUBLISHED).setTextValue(v));
  }
View Full Code Here

  public void setUpdated(DateTime v) {
    if (v != null && v.getTzShift() == null) {
      throw new IllegalArgumentException("Entry.updated must have a timezone.");
    }
    setElement(UPDATED,
        (v == null) ? null : new Element(UPDATED).setTextValue(v));
  }
View Full Code Here

   * that could be found.
   */
  @Override
  protected Element narrow(ElementMetadata<?, ?> metadata,
      ValidationContext vc) {
    Element narrowed = super.narrow(metadata, vc);
    for (Category category : getCategories()) {
      if (Namespaces.gKind.equals(category.getScheme())) {
        narrowed = adapt(narrowed, metadata, category.getTerm());
      }
    }
View Full Code Here

TOP

Related Classes of com.google.gdata.model.Element

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.