src/org/ohmage/domain/MobilityPoint.java
public final void toCsvRow(
					final List<ColumnKey> columns,
					final List<Object> result) 
					throws DomainException {
				
				if(columns == null) {
					throw new DomainException(
							"The list of columns cannot be null.");
				}
				else if(result == null) {
					throw new DomainException(
							"The list of results cannot be null.");
				}
				else if(columns.size() != result.size()) {
					throw new DomainException(
							"The columns list and the result list were different lengths.");
				}
				
				int index;
				
				if((index = columns.indexOf(WifiDataColumnKey.TIME)) != -1) {
					result.set(index, time);
				}
					
				if((index = columns.indexOf(WifiDataColumnKey.TIMESTAMP)) != -1) {
					DateTime dateTime = new DateTime(time, timezone);
					DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();
					builder.appendPattern(DATE_TIME_FORMAT);
					
					result.set(index, builder.toFormatter().print(dateTime));
				}
					
				if((index = columns.indexOf(WifiDataColumnKey.TIMEZONE)) != -1) {
					result.set(index, timezone.getID());
				}
				
				// If SCAN is present, we ignore it as it should have been, for
				// CSV output at least, broken down into SSID and STRENGTH.

				if(scan != null) {
					int ssidIndex = columns.indexOf(WifiDataColumnKey.SSID);
					Collection<String> ssids = 
							new ArrayList<String>(scan.size());
					
					int strengthIndex = 
							columns.indexOf(WifiDataColumnKey.STRENGTH);
					Collection<Double> strengths =
							new ArrayList<Double>(scan.size());
					
					for(AccessPoint accessPoint : scan) {
						if(ssidIndex != -1) {
							ssids.add(accessPoint.ssid);
						}
						
						if(strengthIndex != -1) {
							strengths.add(accessPoint.strength);
						}
					}
					
					if(ssidIndex != -1) {
						result.set(ssidIndex, ssids);
					}
					
					if(strengthIndex != -1) {
						result.set(strengthIndex, strengths);
					}
				}
			}
/**
			 * Populates the appropriate indices in the 'result' with values 
			 * based on the 'columns'. For example, if the first two columns 
			 * were not WifiData columns, they would be skipped. If the third 
			 * column was the WiFi data's time, the third index in the 'result' 
			 * would be populated with this WiFi data's time value.
			 * 
			 * @param columns All of the columns in the 'result' list to 
			 * 				  populate. This will skip all of those columns 
			 * 				  that are not WifiDataColumnKey columns.
			 * 
			 * @param result The result list whose values will be updated based
			 * 				 on the 'columns'.
			 * 
			 * @throws DomainException The columns or result list was null or 
			 * 						   had differing lengths.
			 */
Populates the appropriate indices in the 'result' with values
based on the 'columns'. For example, if the first two columns
were not WifiData columns, they would be skipped. If the third
column was the WiFi data's time, the third index in the 'result'
would be populated with this WiFi data's time value.

@param columns All of the columns in the 'result' list to
populate. This will skip all of those columns
that are not WifiDataColumnKey columns.

@param result The result list whose values will be updated based
on the 'columns'.

@throws DomainException The columns or result list was null or
had differing lengths.
Populates the appropriate indices in the ' result ' with values based on the ' columns ' . For example if the first two columns were not WifiData columns they would be skipped . If the third column was the WiFi data ' s time the third index in the ' result ' would be populated with this WiFi data ' s time value . @param columns All of the columns in the ' result ' list to populate . This will skip all of those columns that are not WifiDataColumnKey columns . @param result The result list whose values will be updated based on the ' columns ' . @throws DomainException The columns or result list was null or had differing lengths .
public final void toCsvRow(
					final List<ColumnKey> columns,
					final List<Object> result) 
					throws DomainException {
				if(columns == null) {
					throw new DomainException(
							"The list of columns cannot be null.");
				}
				else if(result == null) {
					throw new DomainException(
							"The list of results cannot be null.");
				}
				else if(columns.size() != result.size()) {
					throw new DomainException(
							"The columns list and the result list were different lengths.");
				}
				int index;
				if((index = columns.indexOf(WifiDataColumnKey.TIME)) != -1) {
					result.set(index, time);
				}
				if((index = columns.indexOf(WifiDataColumnKey.TIMESTAMP)) != -1) {
					DateTime dateTime = new DateTime(time, timezone);
					DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();
					builder.appendPattern(DATE_TIME_FORMAT);
					result.set(index, builder.toFormatter().print(dateTime));
				}
				if((index = columns.indexOf(WifiDataColumnKey.TIMEZONE)) != -1) {
					result.set(index, timezone.getID());
				}
				if(scan != null) {
					int ssidIndex = columns.indexOf(WifiDataColumnKey.SSID);
					Collection<String> ssids = 
							new ArrayList<String>(scan.size());
					int strengthIndex = 
							columns.indexOf(WifiDataColumnKey.STRENGTH);
					Collection<Double> strengths =
							new ArrayList<Double>(scan.size());
					for(AccessPoint accessPoint : scan) {
						if(ssidIndex != -1) {
							ssids.add(accessPoint.ssid);
						}
						if(strengthIndex != -1) {
							strengths.add(accessPoint.strength);
						}
					}
					if(ssidIndex != -1) {
						result.set(ssidIndex, ssids);
					}
					if(strengthIndex != -1) {
						result.set(strengthIndex, strengths);
					}
				}
			}
public final void toCsvRow ( final List < ColumnKey > columns , final List < Object > result ) throws DomainException { if ( columns == null ) { throw new DomainException ( "The list of columns cannot be null." ) ; } else if ( result == null ) { throw new DomainException ( "The list of results cannot be null." ) ; } else if ( columns . size ( ) != result . size ( ) ) { throw new DomainException ( "The columns list and the result list were different lengths." ) ; } int index ; if ( ( index = columns . indexOf ( WifiDataColumnKey . TIME ) ) != - 1 ) { result . set ( index , time ) ; } if ( ( index = columns . indexOf ( WifiDataColumnKey . TIMESTAMP ) ) != - 1 ) { DateTime dateTime = new DateTime ( time , timezone ) ; DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder ( ) ; builder . appendPattern ( DATE_TIME_FORMAT ) ; result . set ( index , builder . toFormatter ( ) . print ( dateTime ) ) ; } if ( ( index = columns . indexOf ( WifiDataColumnKey . TIMEZONE ) ) != - 1 ) { result . set ( index , timezone . getID ( ) ) ; } if ( scan != null ) { int ssidIndex = columns . indexOf ( WifiDataColumnKey . SSID ) ; Collection < String > ssids = new ArrayList < String > ( scan . size ( ) ) ; int strengthIndex = columns . indexOf ( WifiDataColumnKey . STRENGTH ) ; Collection < Double > strengths = new ArrayList < Double > ( scan . size ( ) ) ; for ( AccessPoint accessPoint : scan ) { if ( ssidIndex != - 1 ) { ssids . add ( accessPoint . ssid ) ; } if ( strengthIndex != - 1 ) { strengths . add ( accessPoint . strength ) ; } } if ( ssidIndex != - 1 ) { result . set ( ssidIndex , ssids ) ; } if ( strengthIndex != - 1 ) { result . set ( strengthIndex , strengths ) ; } } }
Populates the appropriate indices in the 'result' with values
 based on the 'columns'.
Populates the appropriate indices in the ' result ' with values based on the ' columns ' .
// If SCAN is present, we ignore it as it should have been, for // CSV output at least, broken down into SSID and STRENGTH.