package reciter.algorithm.evidence.article.standardizedscore.strategy;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import reciter.algorithm.evidence.article.AbstractReCiterArticleStrategy;
import reciter.algorithm.evidence.article.acceptedrejected.strategy.AcceptedRejectedStrategy;
import reciter.model.article.ReCiterArticle;

public class StandardScoreStrategy extends AbstractReCiterArticleStrategy {
	
	private static final Logger slf4jLogger = LoggerFactory.getLogger(AcceptedRejectedStrategy.class);

	@Override
	public double executeStrategy(ReCiterArticle reCiterArticle, ReCiterArticle otherReCiterArticle) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public double executeStrategy(List<ReCiterArticle> reCiterArticles, ReCiterArticle otherReCiterArticle) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public double executeStrategy(List<ReCiterArticle> reCiterArticles) {
		reCiterArticles.stream().forEach(reCiterArticle -> {
			
		});
		return 0;
	}

}

@@ -61,24 +61,49 @@
 .strategy;%0A%0A
+import java.util.Arrays;%0A
 import java.
@@ -113,16 +113,16 @@
 l.List;%0A
-
 %0Aimport 
@@ -168,24 +168,94 @@
 erFactory;%0A%0A
+import reciter.algorithm.cluster.article.scorer.ReCiterArticleScorer;%0A
 import recit
@@ -633,16 +633,308 @@
 .class);
+%0A%09%0A%09private final String%5B%5D standardizedScoreMapping = ReCiterArticleScorer.strategyParameters.getStandardizedScoreMapping().trim().split(%22,%22);%0A%09private List%3CString%3E standardizedScores;%0A%09%0A%09public StandardScoreStrategy() %7B%0A%09%09this.standardizedScores = Arrays.asList(standardizedScoreMapping);%0A%09%7D
 %0A%0A%09@Over
@@ -1344,16 +1344,16 @@
 cles) %7B%0A
-
 %09%09reCite
@@ -1399,16 +1399,1184 @@
 le -%3E %7B%0A
+%09%09%09double standardizedScore = 1;%0A%09%09%09double totalArticleScoreNonStandardizedExcludingFeedbackScore = reCiterArticle.getTotalArticleScoreNonStandardized() -%0A%09%09%09%09%09((reCiterArticle.getAcceptedRejectedEvidence().getFeedbackScoreAccepted() !=null)?reCiterArticle.getAcceptedRejectedEvidence().getFeedbackScoreAccepted():0) - %0A%09%09%09%09%09((reCiterArticle.getAcceptedRejectedEvidence().getFeedbackScoreRejected() !=null)?reCiterArticle.getAcceptedRejectedEvidence().getFeedbackScoreRejected():0);%0A%09%09%09for(int i = 0; i %3C this.standardizedScores.size(); i++) %7B%0A%09%09%09%09%09if(i == this.standardizedScores.size() - 1) %7B%0A%09%09%09%09%09%09if(totalArticleScoreNonStandardizedExcludingFeedbackScore %3E= Double.parseDouble(this.standardizedScores.get(i))) %7B%0A%09%09%09%09%09%09%09reCiterArticle.setTotalArticleScoreStandardized(standardizedScore);%0A%09%09%09%09%09%09%7D%0A%09%09%09%09%09%7D else if(totalArticleScoreNonStandardizedExcludingFeedbackScore %3E= Double.parseDouble(this.standardizedScores.get(i)) %0A%09%09%09%09%09%09%09&&%0A%09%09%09%09%09%09%09totalArticleScoreNonStandardizedExcludingFeedbackScore %3C Double.parseDouble(this.standardizedScores.get(i + 1))) %7B%0A%09%09%09%09%09%09reCiterArticle.setTotalArticleScoreStandardized(standardizedScore);%0A%09%09%09%09%09%7D%0A%09%09%09%09%09standardizedScore++;%0A%09%09%09%7D%0A
 %09%09%09%0A%09%09%7D)

round of all the scores to upto 2 decimal places