* get a list of all Science Project Ideas from the DB
*/
public List<ScienceProjectIdeaVo> loadAllScienceProjectIdeas() {
List<ProjectIdea> ideas = projectIdeaDao.getAllScienceProjectIdeas();
List<ScienceProjectIdeaVo> projectIdeaVos = new ArrayList<ScienceProjectIdeaVo>();
ScienceProjectIdeaVo vo = null;
for (ProjectIdea spi : ideas) {
vo = new ScienceProjectIdeaVo();
vo.setTitle(spi.getTitle());
vo.setDescription(spi.getDescription());
vo.setProjectCategoryType(spi.getScienceProjectCategoryType()
.getLabel());
vo.setSuggestor(spi.getSuggestor().getFirstName()+ " "+spi.getSuggestor().getLastName());
projectIdeaVos.add(vo);
}
//Test. Will be removed for production
ScienceProjectIdeaVo vo1 = new ScienceProjectIdeaVo();
vo1.setTitle("Do you have a blind spot and if so, how can you determine your blind spot?");
vo1.setDescription("One of the most dramatic experiments to perform is the demonstration of the blind spot. The blind spot is the area on the retina without receptors that respond to light. Therefore an image that falls on this region will NOT be seen. It is in this region that the optic nerve exits the eye on its way to the brain. To find your blind spot, look at the image below or draw it on a piece of paper: ");
vo1.setSuggestor("John Smith");
projectIdeaVos.add(vo1);
ScienceProjectIdeaVo vo2 = new ScienceProjectIdeaVo();
vo2.setTitle("Can a neural network learn how to play a board game?");
vo2.setDescription("The goal of this project is to find if a neural network would be able to learn how to play Connect 4 (a board game where the goal is to get four tokens in a row) well enough that it could beat a human opponent. A neural network is an artificial intelligence program that uses a network of connections between input values and output values to eventually learn how to do something.");
vo2.setSuggestor("Jane Doe");
projectIdeaVos.add(vo2);
return projectIdeaVos;
}