Exemplo n.º 1
0
  /**
   * 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;
  }
Exemplo n.º 2
0
 /**
  * This method typecasts the given {@link XmlObject} to the required generator type and returns
  * back the document of that generator type.
  *
  * @param xmlObject which needs to be converted to the document type of the required generator
  * @return {@link XmlObject} document of the required generator type
  */
 public XmlObject getFormObject(XmlObject xmlObject) {
   NSFCoverPage13 nsfCoverPage13 = (NSFCoverPage13) xmlObject;
   NSFCoverPage13Document nsfCoverPage13Document = NSFCoverPage13Document.Factory.newInstance();
   nsfCoverPage13Document.setNSFCoverPage13(nsfCoverPage13);
   return nsfCoverPage13Document;
 }