@@ -0,0 +1,1956 @@
+package reciter.algorithm.cluster.similarity.clusteringstrategy.article;%0A%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.Set;%0A%0Aimport reciter.algorithm.cluster.ReCiterClusterer;%0Aimport reciter.algorithm.cluster.clusteringstrategy.article.AbstractClusteringStrategy;%0Aimport reciter.algorithm.cluster.model.ReCiterCluster;%0Aimport reciter.model.article.ReCiterArticle;%0A%0A/**%0A * @author szd2013%0A *%0A */%0Apublic class CitesFeatureClusteringStrategy extends AbstractClusteringStrategy %7B%0A%09%0A%09//private static final Logger slf4jLogger = LoggerFactory.getLogger(CitesFeatureClusteringStrategy.class);%0A%0A%09@Override%0A%09public Map%3CLong, ReCiterCluster%3E cluster(List%3CReCiterArticle%3E reCiterArticles) %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09return null;%0A%09%7D%0A%0A%09@Override%0A%09public Map%3CLong, ReCiterCluster%3E cluster(List%3CReCiterArticle%3E reCiterArticles, Set%3CLong%3E seedPmids) %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09return null;%0A%09%7D%0A%09%0A%09/**%0A%09 * This function will group from the grant clusters with articles citation matches. If article A cites article B or vice versa they should be inthe same cluster.%0A%09 * @param clusters List of clusters from initial clustering%0A%09 * @return list of clusters%0A%09 */%0A%09@Override%0A%09public Map%3CLong, ReCiterCluster%3E cluster(Map%3CLong, ReCiterCluster%3E clusters) %7B%0A%09%09%0A%09%09//Compare each clusters with all other for matching email%0A%09%09long mapSize = ReCiterClusterer.baselineClusterSize;%0A%09%09for(long i = 1 ; i %3C= mapSize ; i++) %7B%0A%09%09%09for(long j = 1; j %3C= mapSize; j++) %7B // The iteration can be reduced since citation check both ways is done in the compareTo function. Possibly with i+1 for start. Need to test more%0A%09%09%09%09if(i==j) %7B%0A%09%09%09%09%09continue;%0A%09%09%09%09%7D%0A%09%09%09%09else %7B%0A%09%09%09%09%09if(clusters.get(j) != null && clusters.get(i) != null) %7B%0A%09%09%09%09%09%09%0A%09%09%09%09%09%09if(clusters.get(i).compareTo(clusters.get(j),%22cites%22) == 1) %7B%0A%09%09%09%09%09%09%09clusters.get(i).addAll(clusters.get(j).getArticleCluster());%0A%09%09%09%09%09%09%09clusters.remove(j);%0A%09%09%09%09%09%09%7D%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return clusters;%0A%09%7D%0A%0A%7D%0A

Implement cites clustering strategy