Esempio n. 1
0
 /** 'order by' based on time model, remove to reduce query consumption */
 private static ResultSet getUserNClass() {
   DataOperator dataOperator = DOFactory.getInstance();
   String sql =
       "SELECT userid,class FROM concepts,clustered_news WHERE concepts.newsid = clustered_news.newsid ORDER BY viewtime";
   // String sql = "SELECT userid,class FROM concepts,clustered_news WHERE concepts.newsid =
   // clustered_news.newsid";
   return (ResultSet) dataOperator.findResult(sql);
 }
Esempio n. 2
0
 /** Stage-3 clustering news */
 private static ResultSet getConcepts() {
   DataOperator dataOperator = DOFactory.getInstance();
   String sql = "SELECT newsid, concepts FROM concepts GROUP BY newsid";
   return (ResultSet) dataOperator.findResult(sql);
 }
Esempio n. 3
0
 /**
  * Stage-4 user modeling
  *
  * @param user_model
  */
 private static ResultSet getConceptsNum() {
   DataOperator dataOperator = DOFactory.getInstance();
   String sql = "SELECT COUNT(*) FROM concepts";
   return (ResultSet) dataOperator.findResult(sql);
 }
Esempio n. 4
0
 public static ResultSet getKeywords() {
   DataOperator dataOperator = DOFactory.getInstance();
   String sql = "select * from keywords";
   return (ResultSet) dataOperator.findResult(sql);
 }
Esempio n. 5
0
 private static ResultSet getViewed() {
   DataOperator dataOperator = DOFactory.getInstance();
   String sql = "SELECT userid,newsid FROM concepts";
   return (ResultSet) dataOperator.findResult(sql);
 }
Esempio n. 6
0
 /** Stage-7 recommend estimating */
 private static ResultSet getRecommend() {
   DataOperator dataOperator = DOFactory.getInstance();
   String sql = "SELECT * FROM recommend";
   return (ResultSet) dataOperator.findResult(sql);
 }
Esempio n. 7
0
 /** Stage-1 dividing words */
 public static ResultSet getUserNew() {
   DataOperator dataOperator = DOFactory.getInstance();
   String sql = "select * from user_new";
   return (ResultSet) dataOperator.findResult(sql);
 }
Esempio n. 8
0
 /** Stage-5 clustering users */
 private static ResultSet getPreference() {
   DataOperator dataOperator = DOFactory.getInstance();
   String sql = "SELECT * FROM preference";
   return (ResultSet) dataOperator.findResult(sql);
 }