Java Code Examples for ims.core.vo.QuestionAnswerTypeVo.getOptions()

The following are Jave code examples for showing how to use getOptions() of the ims.core.vo.QuestionAnswerTypeVo class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void cloneQuestion(QuestionInformationShortVo voQInfoShort) 
{
	clearQuestionControls();
	initialiseNewQuestion();
	enableTabNewQuestion(true);
	enableTabListQuestion(false);
	showClassificationTree(true);	
	form.getGlobalContext().Core.setQuestionType(QuestionType.PRIMARY);
	form.lyrTabs().tabNewQuestion().setCaption(ADD_QUESTION);
			
	QuestionInformationVo voQInfo = null;
	if (voQInfoShort != null && voQInfoShort.getID_QuestionInformationIsNotNull())
	{
		voQInfo = domain.getQuestion(voQInfoShort.getID_QuestionInformation());
		voQInfo.clearIDAndVersion();
		//WDEV-17026 
		if (voQInfo.getTaxonomyMap() == null)
		{	
		voQInfo.setTaxonomyMap(new TaxonomyMapCollection());
		}
		voQInfo.setKeywords(new KeywordVoCollection());
		if (voQInfo.getKeywords() == null)
		{	
		voQInfo.setTaxonomyMap(new TaxonomyMapCollection());
		}
		if(voQInfo.getAnswerTypes() != null)
		{
			QuestionAnswerTypeVoCollection answers = new QuestionAnswerTypeVoCollection();
			for(int x = 0; x < voQInfo.getAnswerTypes().size(); x++)
			{
				QuestionAnswerTypeVo answer = voQInfo.getAnswerTypes().get(x);
				answer.clearIDAndVersion();
				
				if(answer.getOptions() != null)
				{
					AnswerOptionVoCollection options = new AnswerOptionVoCollection();
					for(int y = 0; y < answer.getOptions().size(); y++)
					{
						AnswerOptionVo option = answer.getOptions().get(y);
						if(option != null)
						{
							option.clearIDAndVersion();
							options.add(option);
						}
					}						
					answer.setOptions(options);
				}
				
				answers.add(answer);					
			}
			voQInfo.setAnswerTypes(answers);
		}
			
		voQInfo.setID_QuestionInformation(-1);
		voQInfo.setStatus(PreActiveActiveInactiveStatus.PREACTIVE);
		form.getLocalContext().setVoQuestionInformation(voQInfo);
		populateControlsFromData(voQInfo);
		this.form.lyrTabs().tabNewQuestion().cmbStatus().setValue(PreActiveActiveInactiveStatus.PREACTIVE);
	}
	
	enableContextMenu();
}
 
Example 2
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private void cloneQuestion(QuestionInformationShortVo voQInfoShort) 
{
	clearQuestionControls();
	initialiseNewQuestion();
	enableTabNewQuestion(true);
	enableTabListQuestion(false);
	showClassificationTree(true);	
	form.getGlobalContext().Core.setQuestionType(QuestionType.PRIMARY);
	form.lyrTabs().tabNewQuestion().setCaption(ADD_QUESTION);
			
	QuestionInformationVo voQInfo = null;
	if (voQInfoShort != null && voQInfoShort.getID_QuestionInformationIsNotNull())
	{
		voQInfo = domain.getQuestion(voQInfoShort.getID_QuestionInformation());
		voQInfo.clearIDAndVersion();
		//WDEV-17026 
		if (voQInfo.getTaxonomyMap() == null)
		{	
		voQInfo.setTaxonomyMap(new TaxonomyMapCollection());
		}
		voQInfo.setKeywords(new KeywordVoCollection());
		if (voQInfo.getKeywords() == null)
		{	
		voQInfo.setTaxonomyMap(new TaxonomyMapCollection());
		}
		if(voQInfo.getAnswerTypes() != null)
		{
			QuestionAnswerTypeVoCollection answers = new QuestionAnswerTypeVoCollection();
			for(int x = 0; x < voQInfo.getAnswerTypes().size(); x++)
			{
				QuestionAnswerTypeVo answer = voQInfo.getAnswerTypes().get(x);
				answer.clearIDAndVersion();
				
				if(answer.getOptions() != null)
				{
					AnswerOptionVoCollection options = new AnswerOptionVoCollection();
					for(int y = 0; y < answer.getOptions().size(); y++)
					{
						AnswerOptionVo option = answer.getOptions().get(y);
						if(option != null)
						{
							option.clearIDAndVersion();
							options.add(option);
						}
					}						
					answer.setOptions(options);
				}
				
				answers.add(answer);					
			}
			voQInfo.setAnswerTypes(answers);
		}
			
		voQInfo.setID_QuestionInformation(-1);
		voQInfo.setStatus(PreActiveActiveInactiveStatus.PREACTIVE);
		form.getLocalContext().setVoQuestionInformation(voQInfo);
		populateControlsFromData(voQInfo);
		this.form.lyrTabs().tabNewQuestion().cmbStatus().setValue(PreActiveActiveInactiveStatus.PREACTIVE);
	}
	
	enableContextMenu();
}
 
Example 3
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
private void cloneQuestion(QuestionInformationShortVo voQInfoShort) 
{
	clearQuestionControls();
	initialiseNewQuestion();
	enableTabNewQuestion(true);
	enableTabListQuestion(false);
	showClassificationTree(true);	
	form.getGlobalContext().Core.setQuestionType(QuestionType.PRIMARY);
	form.lyrTabs().tabNewQuestion().setCaption(ADD_QUESTION);
			
	QuestionInformationVo voQInfo = null;
	if (voQInfoShort != null && voQInfoShort.getID_QuestionInformationIsNotNull())
	{
		voQInfo = domain.getQuestion(voQInfoShort.getID_QuestionInformation());
		voQInfo.clearIDAndVersion();
		//WDEV-17026 
		if (voQInfo.getTaxonomyMap() == null)
		{	
		voQInfo.setTaxonomyMap(new TaxonomyMapCollection());
		}
		voQInfo.setKeywords(new KeywordVoCollection());
		if (voQInfo.getKeywords() == null)
		{	
		voQInfo.setTaxonomyMap(new TaxonomyMapCollection());
		}
		if(voQInfo.getAnswerTypes() != null)
		{
			QuestionAnswerTypeVoCollection answers = new QuestionAnswerTypeVoCollection();
			for(int x = 0; x < voQInfo.getAnswerTypes().size(); x++)
			{
				QuestionAnswerTypeVo answer = voQInfo.getAnswerTypes().get(x);
				answer.clearIDAndVersion();
				
				if(answer.getOptions() != null)
				{
					AnswerOptionVoCollection options = new AnswerOptionVoCollection();
					for(int y = 0; y < answer.getOptions().size(); y++)
					{
						AnswerOptionVo option = answer.getOptions().get(y);
						if(option != null)
						{
							option.clearIDAndVersion();
							options.add(option);
						}
					}						
					answer.setOptions(options);
				}
				
				answers.add(answer);					
			}
			voQInfo.setAnswerTypes(answers);
		}
			
		voQInfo.setID_QuestionInformation(-1);
		voQInfo.setStatus(PreActiveActiveInactiveStatus.PREACTIVE);
		form.getLocalContext().setVoQuestionInformation(voQInfo);
		populateControlsFromData(voQInfo);
		this.form.lyrTabs().tabNewQuestion().cmbStatus().setValue(PreActiveActiveInactiveStatus.PREACTIVE);
	}
	
	enableContextMenu();
}
 
Example 4
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 4 votes
private void cloneQuestion(QuestionInformationShortVo voQInfoShort) 
{
	clearQuestionControls();
	initialiseNewQuestion();
	enableTabNewQuestion(true);
	enableTabListQuestion(false);
	showClassificationTree(true);	
	form.getGlobalContext().Core.setQuestionType(QuestionType.PRIMARY);
	form.lyrTabs().tabNewQuestion().setCaption(ADD_QUESTION);
			
	QuestionInformationVo voQInfo = null;
	if (voQInfoShort != null && voQInfoShort.getID_QuestionInformationIsNotNull())
	{
		voQInfo = domain.getQuestion(voQInfoShort.getID_QuestionInformation());
		voQInfo.clearIDAndVersion();
		//WDEV-17026 
		if (voQInfo.getTaxonomyMap() == null)
		{	
		voQInfo.setTaxonomyMap(new TaxonomyMapCollection());
		}
		voQInfo.setKeywords(new KeywordVoCollection());
		if (voQInfo.getKeywords() == null)
		{	
		voQInfo.setTaxonomyMap(new TaxonomyMapCollection());
		}
		if(voQInfo.getAnswerTypes() != null)
		{
			QuestionAnswerTypeVoCollection answers = new QuestionAnswerTypeVoCollection();
			for(int x = 0; x < voQInfo.getAnswerTypes().size(); x++)
			{
				QuestionAnswerTypeVo answer = voQInfo.getAnswerTypes().get(x);
				answer.clearIDAndVersion();
				
				if(answer.getOptions() != null)
				{
					AnswerOptionVoCollection options = new AnswerOptionVoCollection();
					for(int y = 0; y < answer.getOptions().size(); y++)
					{
						AnswerOptionVo option = answer.getOptions().get(y);
						if(option != null)
						{
							option.clearIDAndVersion();
							options.add(option);
						}
					}						
					answer.setOptions(options);
				}
				
				answers.add(answer);					
			}
			voQInfo.setAnswerTypes(answers);
		}
			
		voQInfo.setID_QuestionInformation(-1);
		voQInfo.setStatus(PreActiveActiveInactiveStatus.PREACTIVE);
		form.getLocalContext().setVoQuestionInformation(voQInfo);
		populateControlsFromData(voQInfo);
		this.form.lyrTabs().tabNewQuestion().cmbStatus().setValue(PreActiveActiveInactiveStatus.PREACTIVE);
	}
	
	enableContextMenu();
}