/* * This method gets reportType for BudgetCumulativeNonPersonnel by setting * parameters data to reportType */ private ReportType getReportTypeForBudgetCumulativeNonPersonnel( ScaleTwoDecimal calculatedCost, ReportTypeVO reportTypeVO) { ReportType reportType = ReportType.Factory.newInstance(); reportType.setBudgetCategoryDescription(reportTypeVO.getBudgetCategoryDesc()); reportType.setCostElementDescription(reportTypeVO.getCostElementDesc()); reportType.setCalculatedCost(calculatedCost.doubleValue()); return reportType; }
/* * This method gets reportType for CumulativeBudgetSalary by setting data to * reportType from passed parameters */ private ReportType getReportTypeForCumulativeBudgetSalary( ScaleTwoDecimal vacationRate, ScaleTwoDecimal empBenefitRate, ScaleTwoDecimal fringe, ReportTypeVO reportTypeVO) { ReportType reportType = ReportType.Factory.newInstance(); reportType.setStartDate(reportTypeVO.getStartDate().toString()); reportType.setEndDate(reportTypeVO.getEndDate().toString()); reportType.setBudgetCategoryDescription(reportTypeVO.getBudgetCategoryDesc()); reportType.setPersonName(reportTypeVO.getPersonName()); reportType.setVacationRate(vacationRate.toString().concat(PERCENTAGE)); reportType.setEmployeeBenefitRate(empBenefitRate.toString().concat(PERCENTAGE)); reportType.setFringe(fringe.doubleValue()); reportType.setCostElementDescription(reportTypeVO.getCostElementDesc()); reportType.setInvestigatorFlag(reportTypeVO.getInvestigatorFlag()); if (reportTypeVO.getBudgetCategoryCode() != null) { reportType.setBudgetCategoryCode(Integer.parseInt(reportTypeVO.getBudgetCategoryCode())); } reportType.setSalaryRequested(reportTypeVO.getSalaryRequested().doubleValue()); return reportType; }
/** * Marshalls the additional parameters and returns them as a string. * * @return A string holding the marshalled parameters */ private String marshallAdditionalParameters() { String parameters = ""; if (accessions != null && accessions.size() > 0) { parameters += "ACCESSION="; for (int i = 0; i < accessions.size(); i++) parameters += ((i > 0) ? "," : "") + "\"" + accessions.get(i) + "\""; parameters += "\n"; } if (charge != null) parameters += "CHARGE=" + charge + "\n"; if (enzyme != null) parameters += "CLE=" + enzyme + "\n"; if (searchTitle != null) parameters += "COM=" + searchTitle + "\n"; if (precursorRemoval != null) parameters += "CUTOUT=" + precursorRemoval + "\n"; if (database != null) parameters += "DB=" + database + "\n"; if (performDecoySearch != null) parameters += "DECOY=" + ((performDecoySearch) ? "1" : "0") + "\n"; if (isErrorTolerant != null) parameters += "ERRORTOLERANT=" + ((isErrorTolerant) ? "1" : "0") + "\n"; if (format != null) parameters += "FORMAT=" + format + "\n"; if (frames != null && frames.size() > 0) { parameters += "FRAMES="; for (int i = 0; i < frames.size(); i++) parameters += ((i > 0) ? "," : "") + frames.get(i).toString(); parameters += "\n"; } if (instrument != null) parameters += "INSTRUMENT=" + instrument + "\n"; if (variableModifications != null) parameters += "IT_MODS=" + variableModifications + "\n"; if (fragmentIonTolerance != null) parameters += "ITOL=" + fragmentIonTolerance.toString() + "\n"; if (fragmentIonToleranceUnit != null) parameters += "ITOLU=" + ((fragmentIonToleranceUnit == FragmentToleranceUnits.MMU) ? "mmu" : "Da") + "\n"; if (massType != null) parameters += "MASS=" + ((massType == MassType.AVERAGE) ? "Average" : "Monoisotopic") + "\n"; if (fixedMofications != null) parameters += "MODS=" + fixedMofications + "\n"; if (peptideIsotopeError != null) parameters += "PEP_ISOTOPE_ERROR=" + peptideIsotopeError.toString() + "\n"; if (partials != null) parameters += "PFA=" + partials.toString() + "\n"; if (precursor != null) parameters += "PRECURSOR=" + precursor.toString() + "\n"; if (quantitation != null) parameters += "QUANTITATION=" + quantitation + "\n"; if (maxHitsToReport != null) parameters += "REPORT=" + maxHitsToReport + "\n"; if (reportType != null) parameters += "REPTYPE=" + reportType.toString() + "\n"; if (searchType != null) parameters += "SEARCH=" + searchType.toString() + "\n"; if (proteinMass != null) parameters += "SEG=" + proteinMass + "\n"; if (taxonomy != null) parameters += "TAXONOMY=" + taxonomy + "\n"; if (peptideMassTolerance != null) parameters += "TOL=" + peptideMassTolerance.toString() + "\n"; if (peptideMassToleranceUnit != null) parameters += "TOLU=" + peptideMassToleranceUnit.toString() + "\n"; if (userMail != null) parameters += "USEREMAIL=" + userMail + "\n"; if (userName != null) parameters += "USERNAME="******"\n"; if (userParameter != null) { for (Integer i = 0; i < userParameter.size(); i++) { parameters += "USER" + ((i < 10) ? "0" : "") + i.toString() + "=" + userParameter.get(i) + "\n"; } } return parameters; }