src/org/ohmage/validator/SurveyResponseValidators.java
public static Set<String> validateSurveyIds( final String surveyIds) 
			throws ValidationException {
		
		if(StringUtils.isEmptyOrWhitespaceOnly(surveyIds)) {
			return null;
		}
		
		Set<String> result = new HashSet<String>();
		String[] surveyIdsArray = surveyIds.split(InputKeys.LIST_ITEM_SEPARATOR);
		
		for(int i = 0; i < surveyIdsArray.length; i++) {
			String currSurveyId = surveyIdsArray[i].trim();
			
			if(! StringUtils.isEmptyOrWhitespaceOnly(currSurveyId)) {
				result.add(currSurveyId);
			}
		}
		
		return result;
	}
/**
	 * Validates a string representing a list of survey IDs.
	 * 
	 * @param surveyIds The string list of survey IDs.
	 * 
	 * @return A Set of unique survey IDs.
	 */
Validates a string representing a list of survey IDs.

@param surveyIds The string list of survey IDs.

@return A Set of unique survey IDs.
Validates a string representing a list of survey IDs . @param surveyIds The string list of survey IDs . @return A Set of unique survey IDs .
public static Set<String> validateSurveyIds( final String surveyIds) 
			throws ValidationException {
		if(StringUtils.isEmptyOrWhitespaceOnly(surveyIds)) {
			return null;
		}
		Set<String> result = new HashSet<String>();
		String[] surveyIdsArray = surveyIds.split(InputKeys.LIST_ITEM_SEPARATOR);
		for(int i = 0; i < surveyIdsArray.length; i++) {
			String currSurveyId = surveyIdsArray[i].trim();
			if(! StringUtils.isEmptyOrWhitespaceOnly(currSurveyId)) {
				result.add(currSurveyId);
			}
		}
		return result;
	}
public static Set < String > validateSurveyIds ( final String surveyIds ) throws ValidationException { if ( StringUtils . isEmptyOrWhitespaceOnly ( surveyIds ) ) { return null ; } Set < String > result = new HashSet < String > ( ) ; String [ ] surveyIdsArray = surveyIds . split ( InputKeys . LIST_ITEM_SEPARATOR ) ; for ( int i = 0 ; i < surveyIdsArray . length ; i ++ ) { String currSurveyId = surveyIdsArray [ i ] . trim ( ) ; if ( ! StringUtils . isEmptyOrWhitespaceOnly ( currSurveyId ) ) { result . add ( currSurveyId ) ; } } return result ; }
Validates a string representing a list of survey IDs.
Validates a string representing a list of survey IDs .