/** * Does the document already have an abstract using the given abstract type? * * @param doc the Proposal Development Document. * @param abstractType the abstract type to look for. * @return true if the abstract type is found; otherwise false. */ private boolean hasAbstract(ProposalDevelopmentDocument doc, AbstractType abstractType) { if (doc != null) { List<ProposalAbstract> proposalAbstracts = doc.getDevelopmentProposal().getProposalAbstracts(); for (ProposalAbstract proposalAbstract : proposalAbstracts) { if (proposalAbstract.getAbstractTypeCode().equals(abstractType.getAbstractTypeCode())) { return true; } } } return false; }