Changeset 36080

Show
Ignore:
Timestamp:
12/06/09 13:35:10 (3 years ago)
Author:
fumokmm
Message:

キーワードがid:~だったら、#getIdTimelineにディスパッチ。

Location:
lang/java/misc/hatenahaiku4j/branches/for-HTML-scraping/src/hatenahaiku4j
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • lang/java/misc/hatenahaiku4j/branches/for-HTML-scraping/src/hatenahaiku4j/EntityAPI.java

    r35677 r36080  
    11package hatenahaiku4j; 
     2 
     3import hatenahaiku4j.op.CollectOp; 
     4 
     5import java.util.ArrayList; 
     6import java.util.List; 
    27 
    38/** 
     
    4146                return apiHtml != null; 
    4247        } 
     48 
     49        /** 
     50         * 標準の集合操作を返却します。<br/> 
     51         * {@link java.util.ArrayList}にaddしていく。 
     52         *  
     53         * @param <E> 集めるEntity 
     54         * @return 指定したEntityのArrayListによる集合操作 
     55         * @since v1.1.0 
     56         */ 
     57        static <E extends Entity<E>> CollectOp<E, List<E>> createCollectOp() { 
     58                return new CollectOp<E, List<E>>(new ArrayList<E>()); 
     59        } 
     60 
    4361} 
  • lang/java/misc/hatenahaiku4j/branches/for-HTML-scraping/src/hatenahaiku4j/HatenaHaikuAPI.java

    r35713 r36080  
    127127         */ 
    128128        public List<Status> getFriendsTimeline(int page, int count, Date since) throws HatenaHaikuException { 
    129                 return getFriendsTimeline(this.<Status>createCollectOp(), page, count, since); 
     129                return getFriendsTimeline(EntityAPI.<Status>createCollectOp(), page, count, since); 
    130130        } 
    131131         
     
    218218         */ 
    219219        public List<Status> getUserTimeline(int page, int count, Date since) throws HatenaHaikuException { 
    220                 return getUserTimeline(this.<Status>createCollectOp(), page, count, since); 
     220                return getUserTimeline(EntityAPI.<Status>createCollectOp(), page, count, since); 
    221221        } 
    222222 
     
    293293         */ 
    294294        public List<Status> getHotUserTimeline(int page, int count, Date since) throws HatenaHaikuException { 
    295                 return getHotUserTimeline(this.<Status>createCollectOp(), page, count, since); 
     295                return getHotUserTimeline(EntityAPI.<Status>createCollectOp(), page, count, since); 
    296296        } 
    297297         
     
    732732         */ 
    733733        public List<User> getFollowingList(int page) throws HatenaHaikuException { 
    734                 return getFollowingList(this.<User>createCollectOp(), page); 
     734                return getFollowingList(EntityAPI.<User>createCollectOp(), page); 
    735735        } 
    736736 
     
    775775         */ 
    776776        public List<User> getFollowersList() throws HatenaHaikuException { 
    777                 return getFollowersList(this.<User>createCollectOp()); 
     777                return getFollowersList(EntityAPI.<User>createCollectOp()); 
    778778        } 
    779779 
     
    886886         */ 
    887887        public List<Keyword> getFollowingKeywordList() throws HatenaHaikuException { 
    888                 return getFollowingKeywordList(this.<Keyword>createCollectOp()); 
     888                return getFollowingKeywordList(EntityAPI.<Keyword>createCollectOp()); 
    889889        } 
    890890 
  • lang/java/misc/hatenahaiku4j/branches/for-HTML-scraping/src/hatenahaiku4j/HatenaHaikuAPIHTML.java

    r36079 r36080  
    11package hatenahaiku4j; 
    22 
    3 import hatenahaiku4j.op.CollectOp; 
    43import hatenahaiku4j.op.ReduceOp; 
    5 import hatenahaiku4j.util.DateUtil; 
    64import hatenahaiku4j.util.HatenaUtil; 
    75import hatenahaiku4j.util.HttpUtil; 
     
    123121         */ 
    124122        public List<Status> getPublicTimeline(int page) throws HatenaHaikuException { 
    125                 return getPublicTimeline(this.<Status>createCollectOp(), page); 
     123                return getPublicTimeline(EntityAPI.<Status>createCollectOp(), page); 
    126124        } 
    127125 
     
    242240         */ 
    243241        public List<Status> getFriendsTimeline(String userId, int page) throws HatenaHaikuException { 
    244                 return getFriendsTimeline(this.<Status>createCollectOp(), userId, page); 
     242                return getFriendsTimeline(EntityAPI.<Status>createCollectOp(), userId, page); 
    245243        } 
    246244 
     
    302300         */ 
    303301        public List<Status> getUserTimeline(String userId, int page) throws HatenaHaikuException { 
    304                 return getUserTimeline(this.<Status>createCollectOp(), userId, page); 
     302                return getUserTimeline(EntityAPI.<Status>createCollectOp(), userId, page); 
    305303        } 
    306304 
     
    344342         */ 
    345343        public List<Status> getHotUserTimeline(String userId, int page) throws HatenaHaikuException { 
    346                 return getHotUserTimeline(this.<Status>createCollectOp(), userId, page); 
     344                return getHotUserTimeline(EntityAPI.<Status>createCollectOp(), userId, page); 
    347345        } 
    348346 
     
    402400        /** 
    403401         * 指定したユーザのidページのタイムラインを取得します。最新ページを20件取得します。<br/> 
    404          * このタイムラインは "id:xxxx" のキーワードタイムラインと同じものです。 
    405          *  
    406          * @see HatenaHaikuAPIHTML#getKeywordTimeline(String) 
     402         * <i>http://h.hatena.ne.jp/target.body?word=id:【ID】&page=【ページ数】</i> 
     403         *  
    407404         * @param userId ユーザID 
    408405         * @return 指定したユーザのidページのタイムライン 
     
    416413        /** 
    417414         * 指定したユーザのidページのタイムラインを取得します。取得件数は20件です。<br/> 
    418          * このタイムラインは "id:xxxx" のキーワードタイムラインと同じものです。 
    419          *  
    420          * @see HatenaHaikuAPIHTML#getKeywordTimeline(String, int) 
     415         * <i>http://h.hatena.ne.jp/target.body?word=id:【ID】&page=【ページ数】</i> 
     416         *  
    421417         * @param userId ユーザID 
    422418         * @param page 取得するページです。 
     
    426422         */ 
    427423        public List<Status> getIdTimeline(String userId, int page) throws HatenaHaikuException { 
    428                 return getIdTimeline(this.<Status>createCollectOp(), userId, page); 
     424                return getIdTimeline(EntityAPI.<Status>createCollectOp(), userId, page); 
    429425        } 
    430426         
    431427        /** 
    432428         * 指定したユーザのidページのタイムラインを取得します。取得件数は20件です。<br/> 
    433          * このタイムラインは "id:xxxx" のキーワードタイムラインと同じものです。 
    434          *  
    435          * @see HatenaHaikuAPIHTML#getKeywordTimeline(ReduceOp, String, int) 
     429         * <i>http://h.hatena.ne.jp/target.body?word=id:【ID】&page=【ページ数】</i> 
     430         *  
    436431         * @param op 集合操作 
    437432         * @param userId ユーザID 
     
    445440        } 
    446441 
     442        // TODO #getHotIdTimelineはAPI版の方には要らないのか?? 
     443        /** 
     444         * 指定したユーザのidページの人気のタイムラインを取得します。最新ページを20件取得します。<br/> 
     445         * <i>http://h.hatena.ne.jp/target.body?mode=hot&word=id:【ID】&page=【ページ数】</i> 
     446         *  
     447         * @param userId ユーザID 
     448         * @return 指定したユーザのidページの人気のタイムライン 
     449         * @throws HatenaHaikuException 
     450         * @since v1.2.0 
     451         */ 
     452        public List<Status> getHotIdTimeline(String userId) throws HatenaHaikuException { 
     453                return getHotIdTimeline(userId, 0); 
     454        } 
     455 
     456        /** 
     457         * 指定したユーザのidページの人気のタイムラインを取得します。取得件数は20件です。<br/> 
     458         * <i>http://h.hatena.ne.jp/target.body?mode=hot&word=id:【ID】&page=【ページ数】</i> 
     459         *  
     460         * @param userId ユーザID 
     461         * @param page 取得するページです。 
     462         * @return 指定したユーザのidページの人気のタイムライン 
     463         * @throws HatenaHaikuException 
     464         * @since v1.2.0 
     465         */ 
     466        public List<Status> getHotIdTimeline(String userId, int page) throws HatenaHaikuException { 
     467                return getHotIdTimeline(EntityAPI.<Status>createCollectOp(), userId, page); 
     468        } 
     469         
     470        /** 
     471         * 指定したユーザのidページの人気のタイムラインを取得します。取得件数は20件です。<br/> 
     472         * <i>http://h.hatena.ne.jp/target.body?mode=hot&word=id:【ID】&page=【ページ数】</i> 
     473         *  
     474         * @param op 集合操作 
     475         * @param userId ユーザID 
     476         * @param page 取得するページです。 
     477         * @return 指定したユーザのidページの人気のタイムライン 
     478         * @throws HatenaHaikuException 
     479         * @since v1.2.0 
     480         */ 
     481        public <T> T getHotIdTimeline(ReduceOp<Status, T> op, String userId, int page) throws HatenaHaikuException { 
     482                return _getKeywordTimeline(op, userId, page, KeywordTimelineMode.HOT_ID); 
     483        } 
     484 
    447485        /** 
    448486         * 指定したキーワードのキーワードタイムラインを取得します。最新ページを20件取得します。<br/> 
     
    455493         */ 
    456494        public List<Status> getKeywordTimeline(String keyword) throws HatenaHaikuException { 
     495                /* 
     496                 * HTML版ではIDタイムラインと、キーワードタイムラインでリクエストURLの形式が 
     497                 * 異なるため、キーワードがid形式だった場合は、#getIdTimelineに処理を移譲する。 
     498                 */ 
     499                if (HatenaUtil.isIdNotation(keyword)) { 
     500                        return getIdTimeline(keyword.replaceFirst("^" + Const.ID_COLON, "")); 
     501                } 
    457502                return getKeywordTimeline(keyword, 0); 
    458503        } 
     
    469514         */ 
    470515        public List<Status> getKeywordTimeline(String keyword, int page) throws HatenaHaikuException { 
    471                 return getKeywordTimeline(this.<Status>createCollectOp(), keyword, page); 
     516                /* 
     517                 * HTML版ではIDタイムラインと、キーワードタイムラインでリクエストURLの形式が 
     518                 * 異なるため、キーワードがid形式だった場合は、#getIdTimelineに処理を移譲する。 
     519                 */ 
     520                if (HatenaUtil.isIdNotation(keyword)) { 
     521                        return getIdTimeline(keyword.replaceFirst("^" + Const.ID_COLON, ""), page); 
     522                } 
     523                return getKeywordTimeline(EntityAPI.<Status>createCollectOp(), keyword, page); 
    472524        } 
    473525 
     
    484536         */ 
    485537        public <T> T getKeywordTimeline(ReduceOp<Status, T> op, String keyword, int page) throws HatenaHaikuException { 
     538                /* 
     539                 * HTML版ではIDタイムラインと、キーワードタイムラインでリクエストURLの形式が 
     540                 * 異なるため、キーワードがid形式だった場合は、#getIdTimelineに処理を移譲する。 
     541                 */ 
     542                if (HatenaUtil.isIdNotation(keyword)) { 
     543                        return getIdTimeline(op, keyword.replaceFirst("^" + Const.ID_COLON, ""), page); 
     544                } 
    486545                return _getKeywordTimeline(op, keyword, page, KeywordTimelineMode.NONE); 
    487546        } 
     
    497556         */ 
    498557        public List<Status> getHotKeywordTimeline(String keyword) throws HatenaHaikuException { 
     558                /* 
     559                 * HTML版ではIDタイムラインと、キーワードタイムラインでリクエストURLの形式が 
     560                 * 異なるため、キーワードがid形式だった場合は、#getIdTimelineに処理を移譲する。 
     561                 */ 
     562                if (HatenaUtil.isIdNotation(keyword)) { 
     563                        return getHotIdTimeline(keyword.replaceFirst("^" + Const.ID_COLON, "")); 
     564                } 
    499565                return getHotKeywordTimeline(keyword, 0); 
    500566        } 
     
    511577         */ 
    512578        public List<Status> getHotKeywordTimeline(String keyword, int page) throws HatenaHaikuException { 
    513                 return getHotKeywordTimeline(this.<Status>createCollectOp(), keyword, page); 
     579                /* 
     580                 * HTML版ではIDタイムラインと、キーワードタイムラインでリクエストURLの形式が 
     581                 * 異なるため、キーワードがid形式だった場合は、#getIdTimelineに処理を移譲する。 
     582                 */ 
     583                if (HatenaUtil.isIdNotation(keyword)) { 
     584                        return getHotIdTimeline(keyword.replaceFirst("^" + Const.ID_COLON, ""), page); 
     585                } 
     586                return getHotKeywordTimeline(EntityAPI.<Status>createCollectOp(), keyword, page); 
    514587        } 
    515588 
     
    526599         */ 
    527600        public <T> T getHotKeywordTimeline(ReduceOp<Status, T> op, String keyword, int page) throws HatenaHaikuException { 
     601                /* 
     602                 * HTML版ではIDタイムラインと、キーワードタイムラインでリクエストURLの形式が 
     603                 * 異なるため、キーワードがid形式だった場合は、#getIdTimelineに処理を移譲する。 
     604                 */ 
     605                if (HatenaUtil.isIdNotation(keyword)) { 
     606                        return getHotIdTimeline(op, keyword.replaceFirst("^" + Const.ID_COLON, ""), page); 
     607                } 
    528608                return _getKeywordTimeline(op, keyword, page, KeywordTimelineMode.HOT); 
    529609        } 
     
    553633         */ 
    554634        public List<Status> getAlbumKeywordTimeline(String keyword, int page) throws HatenaHaikuException { 
    555                 return getAlbumKeywordTimeline(this.<Status>createCollectOp(), keyword, page); 
     635                return getAlbumKeywordTimeline(EntityAPI.<Status>createCollectOp(), keyword, page); 
    556636        } 
    557637 
     
    676756         */ 
    677757        public List<Keyword> getHotKeywordList() throws HatenaHaikuException { 
    678                 return getHotKeywordList(this.<Keyword>createCollectOp()); 
     758                return getHotKeywordList(EntityAPI.<Keyword>createCollectOp()); 
    679759        } 
    680760 
     
    773853         */ 
    774854        public List<Keyword> getKeywordList(String searchWord, int page) throws HatenaHaikuException { 
    775                 return getKeywordList(this.<Keyword>createCollectOp(), searchWord, page); 
     855                return getKeywordList(EntityAPI.<Keyword>createCollectOp(), searchWord, page); 
    776856        } 
    777857 
     
    10091089        } 
    10101090 
    1011         /** 
    1012          * ユーザエレメントをUser情報に変換します。 
    1013          *  
    1014          * @param elemUser ユーザエレメント 
    1015          * @return User情報 
    1016          * @since v1.2.0 
    1017          */ 
    1018         protected User toUser(Element elemUser) { 
    1019                 User user = createUser(); 
    1020                 // ユーザ名 
    1021                 user.setName(XmlUtil.getText(elemUser, "name")); 
    1022                 // フォロワー数 
    1023                 user.setFollowersCount(Integer.parseInt(XmlUtil.getText(elemUser, "followers_count"))); 
    1024                 // ユーザID 
    1025                 user.setUserId(XmlUtil.getText(elemUser, "id")); 
    1026                 // プロフィール画像URL 
    1027                 user.setProfileImageUrl(XmlUtil.getText(elemUser, "profile_image_url")); 
    1028                 // 表示名 
    1029                 user.setScreenName(XmlUtil.getText(elemUser, "screen_name")); 
    1030                 // ユーザのエントリページのURL 
    1031                 user.setUrl(XmlUtil.getText(elemUser, "url")); 
    1032                 return user; 
    1033         } 
    1034  
    1035         /** 
    1036          * ユーザエレメントルートをUser情報リストに変換します。 
    1037          *  
    1038          * @param op 集合操作 
    1039          * @param elemUsers ユーザエレメントルート 
    1040          * @return User情報リスト 
    1041          * @since v1.2.0 
    1042          */ 
    1043         protected <T> T toUserList(ReduceOp<User, T> op, Element elemUsers) throws HatenaHaikuException { 
    1044                 for (Element elemUser : XmlUtil.getChildElementsByTagName(elemUsers, "user")) { 
    1045                         op.add(toUser(elemUser)); 
    1046                 } 
    1047                 return op.value(); 
    1048         } 
     1091// TODO 今のところユーザを取得するメソッドは作成していない 
     1092//      /** 
     1093//       * ユーザエレメントをUser情報に変換します。 
     1094//       *  
     1095//       * @param elemUser ユーザエレメント 
     1096//       * @return User情報 
     1097//       * @since v1.2.0 
     1098//       */ 
     1099//      protected User toUser(Element elemUser) { 
     1100//              User user = createUser(); 
     1101//              // ユーザ名 
     1102//              user.setName(XmlUtil.getText(elemUser, "name")); 
     1103//              // フォロワー数 
     1104//              user.setFollowersCount(Integer.parseInt(XmlUtil.getText(elemUser, "followers_count"))); 
     1105//              // ユーザID 
     1106//              user.setUserId(XmlUtil.getText(elemUser, "id")); 
     1107//              // プロフィール画像URL 
     1108//              user.setProfileImageUrl(XmlUtil.getText(elemUser, "profile_image_url")); 
     1109//              // 表示名 
     1110//              user.setScreenName(XmlUtil.getText(elemUser, "screen_name")); 
     1111//              // ユーザのエントリページのURL 
     1112//              user.setUrl(XmlUtil.getText(elemUser, "url")); 
     1113//              return user; 
     1114//      } 
     1115 
     1116// TODO 今のところユーザを取得するメソッドは作成していない 
     1117//      /** 
     1118//       * ユーザエレメントルートをUser情報リストに変換します。 
     1119//       *  
     1120//       * @param op 集合操作 
     1121//       * @param elemUsers ユーザエレメントルート 
     1122//       * @return User情報リスト 
     1123//       * @since v1.2.0 
     1124//       */ 
     1125//      protected <T> T toUserList(ReduceOp<User, T> op, Element elemUsers) throws HatenaHaikuException { 
     1126//              for (Element elemUser : XmlUtil.getChildElementsByTagName(elemUsers, "user")) { 
     1127//                      op.add(toUser(elemUser)); 
     1128//              } 
     1129//              return op.value(); 
     1130//      } 
    10491131 
    10501132        /** 
     
    11131195 
    11141196        /** 
    1115          * 標準の集合操作を返却します。<br/> 
    1116          * {@link java.util.ArrayList}にaddしていく。 
    1117          *  
    1118          * @param <E> 集めるEntity 
    1119          * @return 指定したEntityのArrayListによる集合操作 
    1120          * @since v1.2.0 
    1121          */ 
    1122         protected <E extends Entity<E>> CollectOp<E, List<E>> createCollectOp() { 
    1123                 return new CollectOp<E, List<E>>(new ArrayList<E>()); 
    1124         } 
    1125          
    1126         /** 
    11271197         * キーワードタイムライン取得モード 
    11281198         *  
     
    11461216                /** 
    11471217                 * ステータスリスト 
     1218                 * @see HatenaHaikuAPIHTML#getPublicTimeline() 
     1219                 * @see HatenaHaikuAPIHTML#getFriendsTimeline() 
     1220                 * @see HatenaHaikuAPIHTML#_getUserTimeline() 
     1221                 * @see HatenaHaikuAPIHTML#_getKeywordTimeline() 
    11481222                 */ 
    11491223                STATUS_LIST, 
  • lang/java/misc/hatenahaiku4j/branches/for-HTML-scraping/src/hatenahaiku4j/HatenaHaikuAPILight.java

    r36056 r36080  
    11package hatenahaiku4j; 
    22 
    3 import hatenahaiku4j.op.CollectOp; 
    43import hatenahaiku4j.op.ReduceOp; 
    54import hatenahaiku4j.util.DateUtil; 
     
    177176         */ 
    178177        public List<Status> getPublicTimeline(int page, Date since) throws HatenaHaikuException { 
    179                 return getPublicTimeline(this.<Status>createCollectOp(), page, since); 
     178                return getPublicTimeline(EntityAPI.<Status>createCollectOp(), page, since); 
    180179        } 
    181180 
     
    271270         */ 
    272271        public List<Status> getFriendsTimeline(String userId, int page, int count, Date since) throws HatenaHaikuException { 
    273                 return getFriendsTimeline(this.<Status>createCollectOp(), userId, page, count, since); 
     272                return getFriendsTimeline(EntityAPI.<Status>createCollectOp(), userId, page, count, since); 
    274273        } 
    275274         
     
    367366         */ 
    368367        public List<Status> getUserTimeline(String userId, int page, int count, Date since) throws HatenaHaikuException { 
    369                 return getUserTimeline(this.<Status>createCollectOp(), userId, page, count, since); 
     368                return getUserTimeline(EntityAPI.<Status>createCollectOp(), userId, page, count, since); 
    370369        } 
    371370         
     
    447446         */ 
    448447        public List<Status> getHotUserTimeline(String userId, int page, int count, Date since) throws HatenaHaikuException { 
    449                 return getHotUserTimeline(this.<Status>createCollectOp(), userId, page, count, since); 
     448                return getHotUserTimeline(EntityAPI.<Status>createCollectOp(), userId, page, count, since); 
    450449        } 
    451450         
     
    565564         */ 
    566565        public List<Status> getIdTimeline(String userId, int page, int count, Date since) throws HatenaHaikuException { 
    567                 return getIdTimeline(this.<Status>createCollectOp(), userId, page, count, since); 
     566                return getIdTimeline(EntityAPI.<Status>createCollectOp(), userId, page, count, since); 
    568567        } 
    569568         
     
    645644         */ 
    646645        public List<Status> getKeywordTimeline(String keyword, int page, int count, Date since) throws HatenaHaikuException { 
    647                 return getKeywordTimeline(this.<Status>createCollectOp(), keyword, page, count, since); 
     646                return getKeywordTimeline(EntityAPI.<Status>createCollectOp(), keyword, page, count, since); 
    648647        } 
    649648         
     
    725724         */ 
    726725        public List<Status> getHotKeywordTimeline(String keyword, int page, int count, Date since) throws HatenaHaikuException { 
    727                 return getHotKeywordTimeline(this.<Status>createCollectOp(), keyword, page, count, since); 
     726                return getHotKeywordTimeline(EntityAPI.<Status>createCollectOp(), keyword, page, count, since); 
    728727        } 
    729728 
     
    839838         */ 
    840839        public List<Status> getAlbumTimeline(int page, int count, Date since) throws HatenaHaikuException { 
    841                 return getAlbumTimeline(this.<Status>createCollectOp(), page, count, since); 
     840                return getAlbumTimeline(EntityAPI.<Status>createCollectOp(), page, count, since); 
    842841        } 
    843842 
     
    934933         */ 
    935934        public List<Status> getAlbumKeywordTimeline(String keyword, int page, int count, Date since) throws HatenaHaikuException { 
    936                 return getAlbumKeywordTimeline(this.<Status>createCollectOp(), keyword, page, count, since); 
     935                return getAlbumKeywordTimeline(EntityAPI.<Status>createCollectOp(), keyword, page, count, since); 
    937936        } 
    938937         
     
    10351034         */ 
    10361035        public List<User> getFollowingList(String userId, int page) throws HatenaHaikuException { 
    1037                 return getFollowingList(this.<User>createCollectOp(), userId, page); 
     1036                return getFollowingList(EntityAPI.<User>createCollectOp(), userId, page); 
    10381037        } 
    10391038 
     
    10801079         */ 
    10811080        public List<User> getFollowersList(String userId) throws HatenaHaikuException { 
    1082                 return getFollowersList(this.<User>createCollectOp(), userId); 
     1081                return getFollowersList(EntityAPI.<User>createCollectOp(), userId); 
    10831082        } 
    10841083 
     
    11521151         */ 
    11531152        public List<Keyword> getHotKeywordList() throws HatenaHaikuException { 
    1154                 return getHotKeywordList(this.<Keyword>createCollectOp()); 
     1153                return getHotKeywordList(EntityAPI.<Keyword>createCollectOp()); 
    11551154        } 
    11561155 
     
    12251224         */ 
    12261225        public List<Keyword> getKeywordList(String searchWord, int page) throws HatenaHaikuException { 
    1227                 return getKeywordList(this.<Keyword>createCollectOp(), searchWord, page); 
     1226                return getKeywordList(EntityAPI.<Keyword>createCollectOp(), searchWord, page); 
    12281227        } 
    12291228 
     
    12721271         */ 
    12731272        public List<Keyword> getFollowingKeywordList(String userId) throws HatenaHaikuException { 
    1274                 return getFollowingKeywordList(this.<Keyword>createCollectOp(), userId); 
     1273                return getFollowingKeywordList(EntityAPI.<Keyword>createCollectOp(), userId); 
    12751274        } 
    12761275 
     
    15041503        } 
    15051504 
    1506         /** 
    1507          * 標準の集合操作を返却します。<br/> 
    1508          * {@link java.util.ArrayList}にaddしていく。 
    1509          *  
    1510          * @param <E> 集めるEntity 
    1511          * @return 指定したEntityのArrayListによる集合操作 
    1512          * @since v1.1.0 
    1513          */ 
    1514         protected <E extends Entity<E>> CollectOp<E, List<E>> createCollectOp() { 
    1515                 return new CollectOp<E, List<E>>(new ArrayList<E>()); 
    1516         } 
    1517          
    15181505} 
  • lang/java/misc/hatenahaiku4j/branches/for-HTML-scraping/src/hatenahaiku4j/sample/Sample001.java

    r35715 r36080  
    8989                sb.append(HatenaUtil.formatDate(status.getCreatedAt())); 
    9090                sb.append("〔☆×").append(status.getFavorited()).append("〕"); 
    91                 sb.append(status.getText()); 
    9291                if (!StringUtil.isEmpty(status.getInReplyToStatusId())) { 
    93                         sb.append(" reply to ").append(status.getInReplyToUserId()); 
     92                        sb.append(" @").append(status.getInReplyToUserId()) 
     93                        .append("(").append(status.getInReplyToStatusId()).append(")"); 
    9494                } 
     95                sb.append(" ").append(status.getText()); 
    9596                sb.append(" by ").append(status.getUserId()); 
    9697                sb.append(" from ").append(status.getSource()); 
     
    102103                                } 
    103104                                replies.append(reply.getUserId()); 
     105                                replies.append("(").append(reply.getStatusId()).append(")"); 
    104106                        } 
    105107                        sb.append(" replied from ").append(replies);