Package com.dongxuexidu.douban4j.model.common

Examples of com.dongxuexidu.douban4j.model.common.DoubanAttributeObj


  }

  private DoubanMailEntryObj generateOnlyAttribute(String id, boolean hasAttr) {
    DoubanMailEntryObj entity = new DoubanMailEntryObj();
    if (hasAttr) {
      DoubanAttributeObj att = new DoubanAttributeObj();
      att.setName("unread");
      att.setValue("false");
      entity.setAttr(att);
    }
    if (id != null) {
      if (!id.startsWith("http://")) {
        id = "http://api.douban.com/doumail/" + id;
View Full Code Here


    sub.setId("" + subjectId);
    col.setSubject(sub);
    col.setContent(content == null ? "" : content);
    if (isPrivate != null && isPrivate) {
      List<DoubanAttributeObj> atts = new ArrayList<DoubanAttributeObj>();
      DoubanAttributeObj att = new DoubanAttributeObj();
      att.setName("privacy");
      att.setValue("private");
      atts.add(att);
      col.setAtt(atts);
    }
    return col;
  }
View Full Code Here

      entry.setContent(content);
    } else {
      return null;
    }
    List<DoubanAttributeObj> atts = new ArrayList<DoubanAttributeObj>();
    DoubanAttributeObj privateAtt = new DoubanAttributeObj();
    privateAtt.setName("privacy");
    if (isPrivate) {
      privateAtt.setValue("private");
    } else {
      privateAtt.setValue("public");
    }
    atts.add(privateAtt);
    DoubanAttributeObj replyAtt = new DoubanAttributeObj();
    replyAtt.setName("can_reply");
    replyAtt.setValue(canReply ? "yes" : "no");
    atts.add(replyAtt);
    entry.setAttributes(atts);
    return entry;
  }
View Full Code Here

    //<category scheme="http://www.douban.com/2007#kind" term="http://www.douban.com/2007#event.music"/>
    DoubanCategoryObj cat = new DoubanCategoryObj();
    cat.setScheme("http://www.douban.com/2007#kind");
    cat.setTerm(typeStr);
    entry.setCategory(cat);
    DoubanAttributeObj inviteOnlyAtt = new DoubanAttributeObj();
    inviteOnlyAtt.setName("invite_only");
    DoubanAttributeObj canInviteAtt = new DoubanAttributeObj();
    canInviteAtt.setName("can_invite");
    if (inviteOnly) {
      inviteOnlyAtt.setValue("yes");
    } else {
      inviteOnlyAtt.setValue("no");
    }
    if (canInvite) {
      canInviteAtt.setValue("yes");
    } else {
      canInviteAtt.setValue("no");
    }
    List<DoubanAttributeObj> atts = new ArrayList<DoubanAttributeObj>();
    atts.add(canInviteAtt);
    atts.add(inviteOnlyAtt);
    entry.setAttrs(atts);
View Full Code Here

TOP

Related Classes of com.dongxuexidu.douban4j.model.common.DoubanAttributeObj

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.