private PHS398ResearchPlan20Document getPHS398ResearchPlan() {
		PHS398ResearchPlan20Document phsResearchPlanDocument = PHS398ResearchPlan20Document.Factory
				.newInstance();
		PHS398ResearchPlan20 phsResearchPlan = PHS398ResearchPlan20.Factory
				.newInstance();
		phsResearchPlan.setFormVersion(FormVersion.v2_0.getVersion());
		ResearchPlanAttachments researchPlanAttachments = ResearchPlanAttachments.Factory
				.newInstance();
		getNarrativeAttachments(researchPlanAttachments);
		AttachmentGroupMin0Max100DataType attachmentGroupMin0Max100DataType = AttachmentGroupMin0Max100DataType.Factory
				.newInstance();
		attachmentGroupMin0Max100DataType
				.setAttachedFileArray(getAppendixAttachedFileDataTypes());
		researchPlanAttachments.setAppendix(attachmentGroupMin0Max100DataType);
		phsResearchPlan.setResearchPlanAttachments(researchPlanAttachments);
		phsResearchPlanDocument.setPHS398ResearchPlan20(phsResearchPlan);
		
		ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(phsResearchPlanDocument.toString().getBytes());            
		sortAttachments(byteArrayInputStream);		
		return phsResearchPlanDocument;
	}
private PHS398ResearchPlan20Document getPHS398ResearchPlan ( ) { PHS398ResearchPlan20Document phsResearchPlanDocument = PHS398ResearchPlan20Document . Factory . newInstance ( ) ; PHS398ResearchPlan20 phsResearchPlan = PHS398ResearchPlan20 . Factory . newInstance ( ) ; phsResearchPlan . setFormVersion ( FormVersion . v2_0 . getVersion ( ) ) ; ResearchPlanAttachments researchPlanAttachments = ResearchPlanAttachments . Factory . newInstance ( ) ; getNarrativeAttachments ( researchPlanAttachments ) ; AttachmentGroupMin0Max100DataType attachmentGroupMin0Max100DataType = AttachmentGroupMin0Max100DataType . Factory . newInstance ( ) ; attachmentGroupMin0Max100DataType . setAttachedFileArray ( getAppendixAttachedFileDataTypes ( ) ) ; researchPlanAttachments . setAppendix ( attachmentGroupMin0Max100DataType ) ; phsResearchPlan . setResearchPlanAttachments ( researchPlanAttachments ) ; phsResearchPlanDocument . setPHS398ResearchPlan20 ( phsResearchPlan ) ; ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream ( phsResearchPlanDocument . toString ( ) . getBytes ( ) ) ; sortAttachments ( byteArrayInputStream ) ; return phsResearchPlanDocument ; }
This method gives the list of attachments for PHS398ResearchPlan form

@return phsResearchPlanDocument {@link XmlObject} of type
PHS398ResearchPlan20Document.