Beispiel #1
0
 /**
  * This method is used to get details of Principal Investigator for Organization Contact
  *
  * @return OrganizationContactPersonDataType Principal investigator details.
  */
 private OrganizationContactPersonDataType getPDPI() {
   OrganizationContactPersonDataType PDPI =
       OrganizationContactPersonDataType.Factory.newInstance();
   ProposalPerson PI = null;
   for (ProposalPerson proposalPerson : pdDoc.getDevelopmentProposal().getProposalPersons()) {
     if (PRINCIPAL_INVESTIGATOR.equals(proposalPerson.getProposalPersonRoleId())) {
       PI = proposalPerson;
       ProposalSite applicantOrganization =
           pdDoc.getDevelopmentProposal().getApplicantOrganization();
       PDPI.setName(globLibV20Generator.getHumanNameDataType(PI));
       PDPI.setPhone(PI.getOfficePhone());
       PDPI.setEmail(PI.getEmailAddress());
       if (PI.getFaxNumber() != null) {
         PDPI.setFax(PI.getFaxNumber());
       }
       PDPI.setAddress(globLibV20Generator.getAddressDataType(PI));
       if (PI.getDirectoryTitle() != null) {
         if (PI.getDirectoryTitle().length() > DIRECTORY_TITLE_MAX_LENGTH) {
           PDPI.setTitle(PI.getDirectoryTitle().substring(0, DIRECTORY_TITLE_MAX_LENGTH));
         } else {
           PDPI.setTitle(PI.getDirectoryTitle());
         }
       }
       if (PI.getHomeUnit() != null) {
         KcPerson kcPerson = PI.getPerson();
         String departmentName = kcPerson.getOrganizationIdentifier();
         PDPI.setDepartmentName(departmentName);
       } else {
         DevelopmentProposal developmentProposal = pdDoc.getDevelopmentProposal();
         PDPI.setDepartmentName(developmentProposal.getOwnedByUnit().getUnitName());
       }
       // divisionName
       String divisionName = proposalPerson.getDivision();
       if (divisionName != null) {
         PDPI.setDivisionName(divisionName);
       }
       if (applicantOrganization != null) {
         PDPI.setOrganizationName(applicantOrganization.getLocationName());
       }
     }
   }
   return PDPI;
 }
Beispiel #2
0
 /**
  * This method is used to get AOR Information for RRSf424
  *
  * @return aorInfoType(AORInfoType) Authorized representative information.
  */
 private AORInfoType getAORInfoType() {
   ProposalSite applicantOrganization = pdDoc.getDevelopmentProposal().getApplicantOrganization();
   AORInfoType aorInfoType = AORInfoType.Factory.newInstance();
   if (departmentalPerson != null) {
     aorInfoType.setName(globLibV20Generator.getHumanNameDataType(departmentalPerson));
     if (departmentalPerson.getPrimaryTitle() != null) {
       if (departmentalPerson.getPrimaryTitle().length() > PRIMARY_TITLE_MAX_LENGTH) {
         aorInfoType.setTitle(
             departmentalPerson.getPrimaryTitle().substring(0, PRIMARY_TITLE_MAX_LENGTH));
       } else {
         aorInfoType.setTitle(departmentalPerson.getPrimaryTitle());
       }
     } else {
       aorInfoType.setTitle("");
     }
     AddressDataType address = AddressDataType.Factory.newInstance();
     address.setStreet1(departmentalPerson.getAddress1());
     address.setStreet2(departmentalPerson.getAddress2());
     address.setCity(departmentalPerson.getCity());
     if (departmentalPerson.getState() != null) {
       address.setState(
           globLibV20Generator.getStateCodeDataType(
               departmentalPerson.getCountryCode(), departmentalPerson.getState()));
     }
     address.setZipPostalCode(departmentalPerson.getPostalCode());
     if (departmentalPerson.getCountryCode() != null) {
       address.setCountry(
           globLibV20Generator.getCountryCodeDataType(departmentalPerson.getCountryCode()));
     }
     aorInfoType.setAddress(address);
     aorInfoType.setPhone(departmentalPerson.getOfficePhone());
     aorInfoType.setFax(departmentalPerson.getFaxNumber());
     aorInfoType.setDepartmentName(departmentalPerson.getDirDept());
     aorInfoType.setEmail(departmentalPerson.getEmailAddress());
     if (departmentalPerson.getHomeUnit() != null) {
       aorInfoType.setDivisionName(departmentalPerson.getHomeUnit());
     }
   }
   if (applicantOrganization != null) {
     aorInfoType.setOrganizationName(applicantOrganization.getLocationName());
   }
   return aorInfoType;
 }
Beispiel #3
0
 /**
  * This method is used to get Congressional District for RRSF424
  *
  * @return CongressionalDistrict congressional district for the Applicant and Project.
  */
 private RRSF424.CongressionalDistrict getCongDistrict() {
   ProposalSite applicantOrganization = pdDoc.getDevelopmentProposal().getApplicantOrganization();
   ProposalSite performOrganization = pdDoc.getDevelopmentProposal().getPerformingOrganization();
   RRSF424.CongressionalDistrict congressionalDistrict =
       RRSF424.CongressionalDistrict.Factory.newInstance();
   if (applicantOrganization != null) {
     congressionalDistrict.setApplicantCongressionalDistrict(
         applicantOrganization.getFirstCongressionalDistrictName());
   } else {
     congressionalDistrict.setApplicantCongressionalDistrict("");
   }
   if (performOrganization != null) {
     congressionalDistrict.setProjectCongressionalDistrict(
         performOrganization.getFirstCongressionalDistrictName());
   } else {
     congressionalDistrict.setProjectCongressionalDistrict("");
   }
   return congressionalDistrict;
 }