/** * This method returns CoverSheet,Renewal,Full Application,Type of application and Application * certification information for the CoverSheet type. * * @return CoverSheet object containing cover sheet information details. */ private CoverSheet getCoverSheet() { CoverSheet coverSheet = CoverSheet.Factory.newInstance(); coverSheet.setCheckCoverSheet(YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_1))); coverSheet.setCheckRenewal( YesNoNotApplicableDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_2))); coverSheet.setCheckTypeApp(YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_4))); coverSheet.setCheckAppCert(YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_5))); return coverSheet; }
/** * This method returns CurrentPendingSupport, BioSketch and RRSeniorProfile information for the * the RRSrProfile type. * * @return RRSrProfile object containing profile details. */ private RRSrProfile getRRSrProfile() { RRSrProfile rrSrProfile = RRSrProfile.Factory.newInstance(); rrSrProfile.setCheckRRSrProfile( YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_CURRENT_SERVING_PI))); rrSrProfile.setCheckBioSketch( YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_HIGH_RESOLUTION))); rrSrProfile.setCheckCurrentPendingSupport( YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_FULL_APPLICATION))); return rrSrProfile; }
/** * This method checks for the informations like Does narrative include merit review criteria, * URL's should not be included in the narrative Does narrative include info regarding prior * support,HR Info that is mandatory for renewals from academic institutions * * @return ProjectNarrative object containing project narrative information details. */ private ProjectNarrative getProjectNarrative() { ProjectNarrative projectNarrative = ProjectNarrative.Factory.newInstance(); projectNarrative.setCheckProjectNarrative( YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_9))); projectNarrative.setCheckURL( YesNoNotApplicableDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_SPACE_CHANGE))); return projectNarrative; }
/** * This method gets NSF Cover information such as NSF Deviation authorization, Do not include, NSF * FLL, NSF unit. * * @return NSFCover object containing nsf cover details. */ private NSFCover getNSFCover() { NSFCover nsfCover = NSFCover.Factory.newInstance(); nsfCover.setCheckNSFCover( YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_EDUCATION_DEPT))); nsfCover.setCheckNSFUnit( YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_ENVIRINMENT_IMPACT))); nsfCover.setCheckNSFOtherInfo( YesNoNotApplicableDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_28))); nsfCover.setCheckNSFSFLLL( YesNoNotApplicableDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_29))); nsfCover.setCheckNSFDevAuth( YesNoNotApplicableDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_30))); nsfCover.setCheckNSFReg( YesNoNotApplicableDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_31))); nsfCover.setCheckDoNotInclude( YesNoNotApplicableDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_32))); return nsfCover; }
/** * This method returns RRBudget,RRBudgetJustification and Cost sharing information for the * RRBudget type. * * @return RRBudget object containing RRbudget related information. */ private RRBudget getRRBudget() { RRBudget rrBudget = RRBudget.Factory.newInstance(); rrBudget.setCheckRRBudget( YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_GRANTEE_INSTITUTION_CHANGE))); rrBudget.setCheckRRBudgetJustification( YesNoNotApplicableDataType.Enum.forInt( getChecklistAnswer(QUESTION_ID_PI_PARTICIPATION_US))); return rrBudget; }
/** * This method gets informations like attachment of Equipments,Supplementary * information,Additional items relevant to NSF Program complete. * * @return Equipment object containing equipment information details. */ private Equipment getEquipment() { Equipment equipment = Equipment.Factory.newInstance(); equipment.setCheckEquipment( YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_INVENTION_PATENT))); equipment.setCheckSuppDoc( YesNoNotApplicableDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_CLINICAL_TRIAL))); equipment.setCheckAdditionalItems( YesNoNotApplicableDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_STEM_CELL))); return equipment; }
/** * This method returns NSFApplicationChecklist13Document object based on proposal development * document which contains the NSFApplicationChecklist13Document information for a particular * proposal * * @return nsfChecklistDocument {@link XmlObject} of type NSFApplicationChecklist13Document. */ private NSFApplicationChecklist13Document getNSFApplicationChecklist13() { NSFApplicationChecklist13Document nsfChecklistDocument = NSFApplicationChecklist13Document.Factory.newInstance(); NSFApplicationChecklist13 nsfChecklist = NSFApplicationChecklist13.Factory.newInstance(); nsfChecklist.setFormVersion(S2SConstants.FORMVERSION_1_3); CoverSheet coverSheet = getCoverSheet(); ProjectNarrative projectNarrative = getProjectNarrative(); setQuestionnaireAnswers(coverSheet, projectNarrative); nsfChecklist.setCoverSheet(coverSheet); nsfChecklist.setCheckRRSite(YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_6))); nsfChecklist.setCheckRROtherInfo(YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_7))); nsfChecklist.setCheckProjectSummary( YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_8))); nsfChecklist.setProjectNarrative(projectNarrative); nsfChecklist.setCheckBiblio( YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_NSF_SMALL_GRANT))); nsfChecklist.setCheckFacilities( YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_OTHER_AGENCY))); nsfChecklist.setEquipment(getEquipment()); nsfChecklist.setRRSrProfile(getRRSrProfile()); nsfChecklist.setCheckRRPersonalData( YesNoDataType.Enum.forInt(getChecklistAnswer(QUESTION_ID_PI_CHANGE))); nsfChecklist.setRRBudget(getRRBudget()); nsfChecklist.setNSFCover(getNSFCover()); nsfChecklistDocument.setNSFApplicationChecklist13(nsfChecklist); return nsfChecklistDocument; }
/** * This method is used to get ApplicationType for the form RRSF424 * * @return ApplicationType corresponding to the proposal type code. */ private ApplicationType getApplicationType() { ApplicationType applicationType = ApplicationType.Factory.newInstance(); Map<String, String> submissionInfo = s2sUtilService.getSubmissionType(pdDoc); if (pdDoc.getDevelopmentProposal().getProposalTypeCode() != null && Integer.parseInt(pdDoc.getDevelopmentProposal().getProposalTypeCode()) < PROPOSAL_TYPE_CODE_6) { // Check <6 to ensure that if proposalType='TASk ORDER", it must not // set. THis is because enum ApplicationType has no // entry for TASK ORDER ApplicationTypeCodeDataType.Enum applicationTypeCodeDataType = ApplicationTypeCodeDataType.Enum.forInt( Integer.parseInt(pdDoc.getDevelopmentProposal().getProposalTypeCode())); applicationType.setApplicationTypeCode(applicationTypeCodeDataType); if (Integer.parseInt(pdDoc.getDevelopmentProposal().getProposalTypeCode()) == ApplicationTypeCodeDataType.INT_REVISION) { String revisionCode = null; if (submissionInfo.get(S2SConstants.KEY_REVISION_CODE) != null) { revisionCode = submissionInfo.get(S2SConstants.KEY_REVISION_CODE); RevisionTypeCodeDataType.Enum revisionCodeApplication = RevisionTypeCodeDataType.Enum.forString(revisionCode); applicationType.setRevisionCode(revisionCodeApplication); } String revisionCodeOtherDesc = null; if (submissionInfo.get(S2SConstants.KEY_REVISION_OTHER_DESCRIPTION) != null) { revisionCodeOtherDesc = submissionInfo.get(S2SConstants.KEY_REVISION_OTHER_DESCRIPTION); applicationType.setRevisionCodeOtherExplanation(revisionCodeOtherDesc); } } } YesNoDataType.Enum answer = null; String answerdetails = getAnswer(ANSWER_128); if (answerdetails != null && !answerdetails.equals(NOT_ANSWERED)) { answer = answerdetails.equals(S2SConstants.PROPOSAL_YNQ_ANSWER_Y) ? YesNoDataType.Y_YES : YesNoDataType.N_NO; applicationType.setIsOtherAgencySubmission(answer); } else { applicationType.setIsOtherAgencySubmission(null); } if (answer != null && answer.equals(YesNoDataType.Y_YES)) { String answerExplanation = getAnswer(ANSWER_111); if (answerExplanation != null) { Collection<ArgValueLookup> argDescription = KcServiceLocator.getService(ArgValueLookupService.class).findAllArgValueLookups(); if (argDescription != null) { for (ArgValueLookup argValue : argDescription) { if (argValue.getValue().equals(answerExplanation)) { String description = argValue.getDescription(); String submissionExplanation = description.substring(5); if (submissionExplanation.length() > ANSWER_EXPLANATION_MAX_LENGTH) { applicationType.setOtherAgencySubmissionExplanation( submissionExplanation.substring(0, ANSWER_EXPLANATION_MAX_LENGTH)); } else { applicationType.setOtherAgencySubmissionExplanation(submissionExplanation); } } } } } } return applicationType; }