/**
   * This method returns Investigator
   * status,DisclosureLobbyingActivities,ExploratoryResearch,HistoricPlaces, HighResolutionGraphics
   * and AccomplishmentRenewal information for the OtherInfo type.
   *
   * @param nsfCoverPage13
   * @return OtherInfo object containing other informations about the principal investigator.
   */
  private void setOtherInfo(NSFCoverPage13 nsfCoverPage13) {
    OtherInfo otherInfo = OtherInfo.Factory.newInstance();
    PIInfo pInfo = PIInfo.Factory.newInstance();
    for (Answer questionnaireAnswer :
        s2sUtilService.getQuestionnaireAnswers(
            pdDoc.getDevelopmentProposal(), getNamespace(), getFormName())) {
      String answer = questionnaireAnswer.getAnswer();
      int questionId = questionnaireAnswer.getQuestionNumber();

      if (answer != null) {
        switch (questionId) {
          case QUESTION_CURRENT_PI:
            pInfo.setIsCurrentPI(
                answer.equals(S2SConstants.PROPOSAL_YNQ_ANSWER_Y)
                    ? YesNoDataType.Y_YES
                    : YesNoDataType.N_NO);
            break;
          case QUESTION_BEGIN_INVESTIGATOR:
            otherInfo.setIsBeginInvestigator(
                answer.equals(S2SConstants.PROPOSAL_YNQ_ANSWER_Y)
                    ? YesNoDataType.Y_YES
                    : YesNoDataType.N_NO);
            break;
          case QUESTION_EARLY_CONCEPT_GRANT:
            otherInfo.setIsEarlyConceptGrant(
                answer.equals(S2SConstants.PROPOSAL_YNQ_ANSWER_Y)
                    ? YesNoDataType.Y_YES
                    : YesNoDataType.N_NO);
            break;
          case QUESTION_RAPIDRESPONSE_GRANT:
            otherInfo.setIsRapidResponseGrant(
                answer.equals(S2SConstants.PROPOSAL_YNQ_ANSWER_Y)
                    ? YesNoDataType.Y_YES
                    : YesNoDataType.N_NO);
            break;
          case QUESTION_ACCOMPLISHMENT_RENEWAL:
            otherInfo.setIsAccomplishmentRenewal(
                answer.equals(S2SConstants.PROPOSAL_YNQ_ANSWER_Y)
                    ? YesNoDataType.Y_YES
                    : YesNoDataType.N_NO);
            break;
          case QUESTION_RESOLUTION_GRAPHICS:
            otherInfo.setIsHighResolutionGraphics(
                answer.equals(S2SConstants.PROPOSAL_YNQ_ANSWER_Y)
                    ? YesNoDataType.Y_YES
                    : YesNoDataType.N_NO);
            break;
          default:
            break;
        }
      }
    }
    nsfCoverPage13.setPIInfo(pInfo);
    otherInfo.setIsDisclosureLobbyingActivities(getLobbyingAnswer());
    nsfCoverPage13.setOtherInfo(otherInfo);
  }
 private void setFundingOpportunityNumber(NSFCoverPage13 nsfCoverPage13) {
   if (pdDoc.getDevelopmentProposal().getProgramAnnouncementNumber() != null) {
     if (pdDoc.getDevelopmentProposal().getProgramAnnouncementNumber().length()
         > PROGRAM_ANNOUNCEMENT_NUMBER_MAX_LENGTH) {
       nsfCoverPage13.setFundingOpportunityNumber(
           pdDoc
               .getDevelopmentProposal()
               .getProgramAnnouncementNumber()
               .substring(0, PROGRAM_ANNOUNCEMENT_NUMBER_MAX_LENGTH));
     } else {
       nsfCoverPage13.setFundingOpportunityNumber(
           pdDoc.getDevelopmentProposal().getProgramAnnouncementNumber());
     }
   }
 }
  /**
   * This method returns NSFCoverPage13Document object based on proposal development document which
   * contains the NSFCoverPage13Document informations
   * NSFUnitConsideration,FundingOpportunityNumber,PIInfo,CoPIInfo,OtherInfo,and SingleCopyDocuments
   * for a particular proposal
   *
   * @return nsfCoverPage13Document {@link XmlObject} of type NSFCoverPage13Document.
   */
  private NSFCoverPage13Document getNSFCoverPage13() {
    NSFCoverPage13Document nsfCoverPage13Document = NSFCoverPage13Document.Factory.newInstance();
    NSFCoverPage13 nsfCoverPage13 = NSFCoverPage13.Factory.newInstance();
    nsfCoverPage13.setFormVersion(S2SConstants.FORMVERSION_1_3);
    setFundingOpportunityNumber(nsfCoverPage13);
    if (pdDoc.getDevelopmentProposal().getS2sOpportunity() != null
        && pdDoc.getDevelopmentProposal().getS2sOpportunity().getClosingDate() != null) {
      nsfCoverPage13.setDueDate(
          pdDoc.getDevelopmentProposal().getS2sOpportunity().getClosingDate());
    }
    nsfCoverPage13.setNSFUnitConsideration(getNSFUnitConsideration());
    setOtherInfo(nsfCoverPage13);
    AttachmentGroupMin1Max100DataType attachmentGroup =
        AttachmentGroupMin1Max100DataType.Factory.newInstance();
    attachmentGroup.setAttachedFileArray(getAttachedFileDataTypes());
    if (attachmentGroup.getAttachedFileArray().length > 0)
      nsfCoverPage13.setSingleCopyDocuments(attachmentGroup);

    nsfCoverPage13Document.setNSFCoverPage13(nsfCoverPage13);
    return nsfCoverPage13Document;
  }