src/org/ohmage/domain/campaign/SurveyResponse.java
private PromptResponse processPromptResponse(
			final Prompt prompt,
			final JSONObject response, 
			final Integer repeatableSetIteration) 
			throws DomainException {
		
		try {
			return prompt.createResponse(
					repeatableSetIteration, 
					response.get(JSON_KEY_PROMPT_VALUE));
		}
		catch(JSONException e) {
			throw new DomainException(
					ErrorCode.SURVEY_INVALID_RESPONSES, 
					"The response value was missing.", 
					e);
		}
		catch(DomainException e) {
			throw new DomainException(
					ErrorCode.SURVEY_INVALID_RESPONSES, 
					"The response value was invalid.", 
					e);
		}
	}
/**
	 * Creates a PromptResponse object from a Prompt and the JSONObject that
	 * represents the response to the prompt.
	 * 
	 * @param prompt The Prompt from which the response was generated.
	 *  
	 * @param response The response from the user as a JSONObject.
	 * 
	 * @param repeatableSetIteration If the prompt was part of a repeatable 
	 * 								 set, this is the iteration of that 
	 * 								 repeatable set.
	 * 
	 * @return A PromptResponse generated by the 'prompt' based on the value in 
	 * 		   the 'response'.
	 * 
	 * @throws DomainException Thrown if the JSONObject is invalid for getting 
	 * 						   a response value.
	 */
Creates a PromptResponse object from a Prompt and the JSONObject that
represents the response to the prompt.

@param prompt The Prompt from which the response was generated.

@param response The response from the user as a JSONObject.

@param repeatableSetIteration If the prompt was part of a repeatable
set, this is the iteration of that
repeatable set.

@return A PromptResponse generated by the 'prompt' based on the value in
the 'response'.

@throws DomainException Thrown if the JSONObject is invalid for getting
a response value.
Creates a PromptResponse object from a Prompt and the JSONObject that represents the response to the prompt . @param prompt The Prompt from which the response was generated . @param response The response from the user as a JSONObject . @param repeatableSetIteration If the prompt was part of a repeatable set this is the iteration of that repeatable set . @return A PromptResponse generated by the ' prompt ' based on the value in the ' response ' . @throws DomainException Thrown if the JSONObject is invalid for getting a response value .
private PromptResponse processPromptResponse(
			final Prompt prompt,
			final JSONObject response, 
			final Integer repeatableSetIteration) 
			throws DomainException {
		try {
			return prompt.createResponse(
					repeatableSetIteration, 
					response.get(JSON_KEY_PROMPT_VALUE));
		}
		catch(JSONException e) {
			throw new DomainException(
					ErrorCode.SURVEY_INVALID_RESPONSES, 
					"The response value was missing.", 
					e);
		}
		catch(DomainException e) {
			throw new DomainException(
					ErrorCode.SURVEY_INVALID_RESPONSES, 
					"The response value was invalid.", 
					e);
		}
	}
private PromptResponse processPromptResponse ( final Prompt prompt , final JSONObject response , final Integer repeatableSetIteration ) throws DomainException { try { return prompt . createResponse ( repeatableSetIteration , response . get ( JSON_KEY_PROMPT_VALUE ) ) ; } catch ( JSONException e ) { throw new DomainException ( ErrorCode . SURVEY_INVALID_RESPONSES , "The response value was missing." , e ) ; } catch ( DomainException e ) { throw new DomainException ( ErrorCode . SURVEY_INVALID_RESPONSES , "The response value was invalid." , e ) ; } }
Creates a PromptResponse object from a Prompt and the JSONObject that
 represents the response to the prompt.
Creates a PromptResponse object from a Prompt and the JSONObject that represents the response to the prompt .