<commit_before>package ds.server;

import java.util.*;

import org.kchine.r.*;

/**
 * 
 * Represents a Similarity Result
 * 
 * @author hugo
 *
 */

public class SimilarityResultSet {

	private Vector<SimilarityResult> results; // Similarity results, a vector where each row is a similarity result
	private String[] colNames = null;  // Description of the different columns making the vector
	private String methodUsed; // Similarity method used
	private String sourceNetCDF; // NetCDF file from which the analysis come
	private String targetDesignElementId; // Id of the target gene
	private String targetArrayDesignId; // Id of the target ArrayDesign
	private String targetExperimentId;
	private String netCDFsPath;
	private HashMap<String, Double> scores = new HashMap<String, Double>();
	
	public SimilarityResultSet(){
		results = new Vector<SimilarityResult>();
	}
	public SimilarityResultSet(String eid, String deid, String adid) {
		targetExperimentId = eid;
		targetArrayDesignId = adid;
		targetDesignElementId = deid;
		netCDFsPath = "/ebi/ArrayExpress-files/NetCDFs.DWDEV";//DataServerAPI.getNetCDFPath();
		if(eid!=""&&deid!=""&&adid!="")
			sourceNetCDF = netCDFsPath+"/"+targetExperimentId+"_"+targetArrayDesignId+".nc";
		results = new Vector<SimilarityResult>();

	}
	
	/**
	 * 
	 * Get a specific similarity result
	 * 
	 * @param it the position number to be returned
	 * @return SimilarityResult as the given position
	 */
	public SimilarityResult getResult(int it){
		
		if (results.size() >= it)
			return results.get(it);
		else
			return null;
		
	}
	
	/**
	 * 
	 * Get size of the SimilarityResultSet
	 * 
	 * @return
	 */<commit_msg>New NetCDF path<commit_after>package ds.server;

import java.util.*;

import org.kchine.r.*;

/**
 * 
 * Represents a Similarity Result
 * 
 * @author hugo
 *
 */

public class SimilarityResultSet {

	private Vector<SimilarityResult> results; // Similarity results, a vector where each row is a similarity result
	private String[] colNames = null;  // Description of the different columns making the vector
	private String methodUsed; // Similarity method used
	private String sourceNetCDF; // NetCDF file from which the analysis come
	private String targetDesignElementId; // Id of the target gene
	private String targetArrayDesignId; // Id of the target ArrayDesign
	private String targetExperimentId;
	private String netCDFsPath;
	private HashMap<String, Double> scores = new HashMap<String, Double>();
	
	public SimilarityResultSet(){
		results = new Vector<SimilarityResult>();
	}
	public SimilarityResultSet(String eid, String deid, String adid) {
		targetExperimentId = eid;
		targetArrayDesignId = adid;
		targetDesignElementId = deid;
		netCDFsPath = "/ebi/ArrayExpress-files/NetCDFs.ATLAS";//DataServerAPI.getNetCDFPath();
		if(eid!=""&&deid!=""&&adid!="")
			sourceNetCDF = netCDFsPath+"/"+targetExperimentId+"_"+targetArrayDesignId+".nc";
		results = new Vector<SimilarityResult>();

	}
	
	/**
	 * 
	 * Get a specific similarity result
	 * 
	 * @param it the position number to be returned
	 * @return SimilarityResult as the given position
	 */
	public SimilarityResult getResult(int it){
		
		if (results.size() >= it)
			return results.get(it);
		else
			return null;
		
	}
	
	/**
	 * 
	 * Get size of the SimilarityResultSet
	 * 
	 * @return
	 */
{'fraction_non_alphanumeric': 0.10596026490066225, 'fraction_numerical': 0.0, 'mean_word_length': 4.1360123647604325, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3313049', 'n_tokens_mistral': 1079, 'n_tokens_neox': 968, 'n_words': 300}