<commit_before>package gov.nih.nci.calab.dto.characterization.physical;

import gov.nih.nci.calab.domain.Measurement;
import gov.nih.nci.calab.domain.nano.characterization.physical.Solubility;
import gov.nih.nci.calab.dto.characterization.CharacterizationBean;
import gov.nih.nci.calab.dto.characterization.DerivedBioAssayDataBean;
import gov.nih.nci.calab.service.util.CananoConstants;

import java.util.List;


/**
 * This class represents the Solubility characterization information to be shown in
 * the view page.
 * 
 * @author chande
 * 
 */
public class SolubilityBean extends CharacterizationBean {
	private String solvent;
	private String criticalConcentration;
	private String criticalConcentrationUnit;
	private String isSoluble;
	
	
	public SolubilityBean() {
		super();
		initSetup();
	}
	
	public SolubilityBean(Solubility aChar) {
		super(aChar);

		this.solvent = aChar.getSolvent();
		if (aChar.getCriticalConcentration() != null) {
			this.criticalConcentration = aChar.getCriticalConcentration().getValue();
			this.criticalConcentrationUnit = aChar.getCriticalConcentration().getUnitOfMeasurement();
		}
		this.isSoluble = aChar.getIsSoluble() ? "true" : "false";
	}
	
	public void setDerivedBioAssayDataList(
			List<DerivedBioAssayDataBean> derivedBioAssayData) {
		super.setDerivedBioAssayDataList(derivedBioAssayData);
		initSetup();
	}
	
	public void initSetup() {
		/*
		for (DerivedBioAssayDataBean table:getDerivedBioAssayData()) {
			DatumBean average=new DatumBean();
			average.setType("Average");
			average.setValueUnit("nm");
			DatumBean zaverage=new DatumBean();
			zaverage.setType("Z-Average");
			zaverage.setValueUnit("nm");
			DatumBean pdi=new DatumBean();
			pdi.setType("PDI");
			table.getDatumList().add(average);
			table.getDatumList().add(zaverage);
			table.getDatumList().add(pdi);
		}
		*/
	}
	
	public Solubility getDomainObj() {
		Solubility solubility = new Solubility();
		super.updateDomainObj(solubility);
		
		solubility.setSolvent(this.criticalConcentration);
		solubility.setCriticalConcentration(new Measurement(this.criticalConcentration, this.criticalConcentrationUnit));
		solubility.setIsSoluble((this.isSoluble.equalsIgnoreCase(CananoConstants.BOOLEAN_YES)) ? true : false);
		
		return solubility;
	}

	public String getCriticalConcentration() {
		return criticalConcentration;
	}

	public void setCriticalConcentration(String criticalConcentration) {
		this.criticalConcentration = criticalConcentration;
	}

	public String getIsSoluble() {
		return isSoluble;
	}

	public void setIsSoluble(String isSoluble) {
		this.isSoluble = isSoluble;
	}

	public String getSolvent() {
		return solvent;
	}

	public void setSolvent(String solvent) {
		this.solvent = solvent;
	}
<commit_msg>Correct the solvent value<commit_after>package gov.nih.nci.calab.dto.characterization.physical;

import gov.nih.nci.calab.domain.Measurement;
import gov.nih.nci.calab.domain.nano.characterization.physical.Solubility;
import gov.nih.nci.calab.dto.characterization.CharacterizationBean;
import gov.nih.nci.calab.dto.characterization.DerivedBioAssayDataBean;
import gov.nih.nci.calab.service.util.CananoConstants;

import java.util.List;


/**
 * This class represents the Solubility characterization information to be shown in
 * the view page.
 * 
 * @author chande
 * 
 */
public class SolubilityBean extends CharacterizationBean {
	private String solvent;
	private String criticalConcentration;
	private String criticalConcentrationUnit;
	private String isSoluble;
	
	
	public SolubilityBean() {
		super();
		initSetup();
	}
	
	public SolubilityBean(Solubility aChar) {
		super(aChar);

		this.solvent = aChar.getSolvent();
		if (aChar.getCriticalConcentration() != null) {
			this.criticalConcentration = aChar.getCriticalConcentration().getValue();
			this.criticalConcentrationUnit = aChar.getCriticalConcentration().getUnitOfMeasurement();
		}
		this.isSoluble = aChar.getIsSoluble() ? "true" : "false";
	}
	
	public void setDerivedBioAssayDataList(
			List<DerivedBioAssayDataBean> derivedBioAssayData) {
		super.setDerivedBioAssayDataList(derivedBioAssayData);
		initSetup();
	}
	
	public void initSetup() {
		/*
		for (DerivedBioAssayDataBean table:getDerivedBioAssayData()) {
			DatumBean average=new DatumBean();
			average.setType("Average");
			average.setValueUnit("nm");
			DatumBean zaverage=new DatumBean();
			zaverage.setType("Z-Average");
			zaverage.setValueUnit("nm");
			DatumBean pdi=new DatumBean();
			pdi.setType("PDI");
			table.getDatumList().add(average);
			table.getDatumList().add(zaverage);
			table.getDatumList().add(pdi);
		}
		*/
	}
	
	public Solubility getDomainObj() {
		Solubility solubility = new Solubility();
		super.updateDomainObj(solubility);
		
		solubility.setSolvent(this.solvent);
		solubility.setCriticalConcentration(new Measurement(this.criticalConcentration, this.criticalConcentrationUnit));
		solubility.setIsSoluble((this.isSoluble.equalsIgnoreCase(CananoConstants.BOOLEAN_YES)) ? true : false);
		
		return solubility;
	}

	public String getCriticalConcentration() {
		return criticalConcentration;
	}

	public void setCriticalConcentration(String criticalConcentration) {
		this.criticalConcentration = criticalConcentration;
	}

	public String getIsSoluble() {
		return isSoluble;
	}

	public void setIsSoluble(String isSoluble) {
		this.isSoluble = isSoluble;
	}

	public String getSolvent() {
		return solvent;
	}

	public void setSolvent(String solvent) {
		this.solvent = solvent;
	}

{'fraction_non_alphanumeric': 0.10767551837031648, 'fraction_numerical': 0.0, 'mean_word_length': 5.320689655172414, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5108536', 'n_tokens_mistral': 2120, 'n_tokens_neox': 1742, 'n_words': 299}