Subversion Repositories SmartDukaan

Rev

Rev 7962 | Rev 7964 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7962 Rev 7963
Line 1632... Line 1632...
1632
    public String getFormattedDate(Date date){
1632
    public String getFormattedDate(Date date){
1633
    	return sdf.format(date);
1633
    	return sdf.format(date);
1634
    }
1634
    }
1635
    
1635
    
1636
    public Map<Long, Double> getScores(){
1636
    public Map<Long, Double> getScores(){
-
 
1637
    	if(this.expEntity.getCategory().isComparable()){
1637
    	NewCMP cmp = new NewCMP(Arrays.asList(this.entity));
1638
	    	NewCMP cmp = new NewCMP(Arrays.asList(this.entity));
1638
    	Map<Long, Double> score = null;
1639
	    	Map<Long, Double> score = null;
1639
		try {
1640
			try {
1640
			Map<Long, Map<Long, Double>> scoreMap = cmp.getSlideScores();
1641
				Map<Long, Map<Long, Double>> scoreMap = cmp.getSlideScores();
1641
			score = scoreMap.get(Long.parseLong(this.id));
1642
				score = scoreMap.get(Long.parseLong(this.id));
1642
			score.put(130054L, cmp.getFinalScores(scoreMap).get(Long.parseLong(this.id))/10);
1643
				score.put(130054L, cmp.getFinalScores(scoreMap).get(Long.parseLong(this.id))/10);
1643
			
1644
				
1644
		} catch (Exception e) {
1645
			} catch (Exception e) {
1645
			System.out.println("Some error occurred");
1646
				System.out.println("Some error occurred");
1646
			e.printStackTrace();
1647
				e.printStackTrace();
1647
		}
1648
			}
1648
		DecimalFormat oneDForm = new DecimalFormat("#.#");
1649
			DecimalFormat oneDForm = new DecimalFormat("#.#");
1649
		for(Map.Entry<Long, Double> scoreEntry : score.entrySet()){
1650
			for(Map.Entry<Long, Double> scoreEntry : score.entrySet()){
1650
			scoreEntry.setValue(Double.valueOf(oneDForm.format(scoreEntry.getValue())));
1651
				scoreEntry.setValue(Double.valueOf(oneDForm.format(scoreEntry.getValue())));
1651
		}
1652
			}
1652
		return score;
1653
			return score;
-
 
1654
    	} else {
-
 
1655
    		return new HashMap<Long, Double>();
-
 
1656
    	}
1653
    }
1657
    }
1654
    
1658
    
1655
	
1659
	
1656
}
1660
}
1657
 
1661