/** '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); }
/** 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); }
/** * 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); }
public static ResultSet getKeywords() { DataOperator dataOperator = DOFactory.getInstance(); String sql = "select * from keywords"; return (ResultSet) dataOperator.findResult(sql); }
private static ResultSet getViewed() { DataOperator dataOperator = DOFactory.getInstance(); String sql = "SELECT userid,newsid FROM concepts"; return (ResultSet) dataOperator.findResult(sql); }
/** Stage-7 recommend estimating */ private static ResultSet getRecommend() { DataOperator dataOperator = DOFactory.getInstance(); String sql = "SELECT * FROM recommend"; return (ResultSet) dataOperator.findResult(sql); }
/** Stage-1 dividing words */ public static ResultSet getUserNew() { DataOperator dataOperator = DOFactory.getInstance(); String sql = "select * from user_new"; return (ResultSet) dataOperator.findResult(sql); }
/** Stage-5 clustering users */ private static ResultSet getPreference() { DataOperator dataOperator = DOFactory.getInstance(); String sql = "SELECT * FROM preference"; return (ResultSet) dataOperator.findResult(sql); }