class PublicContentItemViewModelMapper {

    public PublicContentItemViewModel mapToViewModel(PublicContentItemResource publicContentItemResource) {
        PublicContentItemViewModel publicContentItemViewModel = new PublicContentItemViewModel();

        publicContentItemViewModel.setCompetitionTitle(publicContentItemResource.getCompetitionTitle());
        publicContentItemViewModel.setCompetitionCloseDate(publicContentItemResource.getCompetitionCloseDate());
        publicContentItemViewModel.setCompetitionOpenDate(publicContentItemResource.getCompetitionOpenDate());
        publicContentItemViewModel.setRegistrationCloseDate(publicContentItemResource.getRegistrationCloseDate());

        PublicContentResource publicContentResource = publicContentItemResource.getPublicContentResource();
        publicContentItemViewModel.setEligibilitySummary(publicContentResource.getEligibilitySummary());
        publicContentItemViewModel.setShortDescription(publicContentResource.getShortDescription());
        publicContentItemViewModel.setCompetitionId(publicContentResource.getCompetitionId());

        return publicContentItemViewModel;
    }

}