src/org/ohmage/validator/ObserverValidators.java
public static final ColumnNode<String> validateColumnList(
			final String value)
			throws ValidationException {
		
		ColumnNode<String> result = new ColumnNode<String>();
		
		if(StringUtils.isEmptyOrWhitespaceOnly(value)) {
			return result;
		}
		
		String[] items = value.split(InputKeys.LIST_ITEM_SEPARATOR);
		for(int currColumn = 0; currColumn < items.length; currColumn++) {
			String column = items[currColumn];
			
			if(column == null) {
				continue;
			}
			
			String trimmedColumn = column.trim();
			if(trimmedColumn.length() == 0) {
				continue;
			}
			
			ColumnNode<String> currNode = result;
			String[] parts = trimmedColumn.split(":");
			for(int currPart = 0; currPart < parts.length; currPart++) {
				String part = parts[currPart];
				
				if(part == null) {
					throw new ValidationException(
						ErrorCode.OBSERVER_INVALID_COLUMN_LIST,
						"Two ':'s were given in sequence: " + trimmedColumn);
				}
				
				String trimmedPart = part.trim();
				if(trimmedPart.length() == 0) {
					throw new ValidationException(
						ErrorCode.OBSERVER_INVALID_COLUMN_LIST,
						"Two ':'s were given in sequence: " + trimmedColumn);
				}
				
				if(! currNode.hasChild(trimmedPart)) {
					currNode.addChild(trimmedPart);
				}
				
				currNode = currNode.getChild(trimmedPart);
			}
		}
		
		return result;
	}
/**
	 * Converts a string of comma-separated columns into a set of strings and
	 * removes all empty strings.
	 * 
	 * @param value The comma-separated string.
	 * 
	 * @return A set of column strings.
	 * 
	 * @throws ValidationException A column value was invalid.
	 */
Converts a string of comma-separated columns into a set of strings and
removes all empty strings.

@param value The comma-separated string.

@return A set of column strings.

@throws ValidationException A column value was invalid.
Converts a string of comma - separated columns into a set of strings and removes all empty strings . @param value The comma - separated string . @return A set of column strings . @throws ValidationException A column value was invalid .
public static final ColumnNode<String> validateColumnList(
			final String value)
			throws ValidationException {
		ColumnNode<String> result = new ColumnNode<String>();
		if(StringUtils.isEmptyOrWhitespaceOnly(value)) {
			return result;
		}
		String[] items = value.split(InputKeys.LIST_ITEM_SEPARATOR);
		for(int currColumn = 0; currColumn < items.length; currColumn++) {
			String column = items[currColumn];
			if(column == null) {
				continue;
			}
			String trimmedColumn = column.trim();
			if(trimmedColumn.length() == 0) {
				continue;
			}
			ColumnNode<String> currNode = result;
			String[] parts = trimmedColumn.split(":");
			for(int currPart = 0; currPart < parts.length; currPart++) {
				String part = parts[currPart];
				if(part == null) {
					throw new ValidationException(
						ErrorCode.OBSERVER_INVALID_COLUMN_LIST,
						"Two ':'s were given in sequence: " + trimmedColumn);
				}
				String trimmedPart = part.trim();
				if(trimmedPart.length() == 0) {
					throw new ValidationException(
						ErrorCode.OBSERVER_INVALID_COLUMN_LIST,
						"Two ':'s were given in sequence: " + trimmedColumn);
				}
				if(! currNode.hasChild(trimmedPart)) {
					currNode.addChild(trimmedPart);
				}
				currNode = currNode.getChild(trimmedPart);
			}
		}
		return result;
	}
public static final ColumnNode < String > validateColumnList ( final String value ) throws ValidationException { ColumnNode < String > result = new ColumnNode < String > ( ) ; if ( StringUtils . isEmptyOrWhitespaceOnly ( value ) ) { return result ; } String [ ] items = value . split ( InputKeys . LIST_ITEM_SEPARATOR ) ; for ( int currColumn = 0 ; currColumn < items . length ; currColumn ++ ) { String column = items [ currColumn ] ; if ( column == null ) { continue ; } String trimmedColumn = column . trim ( ) ; if ( trimmedColumn . length ( ) == 0 ) { continue ; } ColumnNode < String > currNode = result ; String [ ] parts = trimmedColumn . split ( ":" ) ; for ( int currPart = 0 ; currPart < parts . length ; currPart ++ ) { String part = parts [ currPart ] ; if ( part == null ) { throw new ValidationException ( ErrorCode . OBSERVER_INVALID_COLUMN_LIST , "Two ':'s were given in sequence: " + trimmedColumn ) ; } String trimmedPart = part . trim ( ) ; if ( trimmedPart . length ( ) == 0 ) { throw new ValidationException ( ErrorCode . OBSERVER_INVALID_COLUMN_LIST , "Two ':'s were given in sequence: " + trimmedColumn ) ; } if ( ! currNode . hasChild ( trimmedPart ) ) { currNode . addChild ( trimmedPart ) ; } currNode = currNode . getChild ( trimmedPart ) ; } } return result ; }
Converts a string of comma-separated columns into a set of strings and
 removes all empty strings.
Converts a string of comma - separated columns into a set of strings and removes all empty strings .