src/org/ohmage/domain/Location.java
public final void streamJson(
			final JsonGenerator generator,
			final boolean abbreviated,
			final Collection<ColumnKey> columns)
			throws JsonGenerationException, IOException, DomainException {
		
		if(generator == null) {
			throw new DomainException("The generator is null.");
		}
		else if(columns == null) {
			throw new DomainException("The list of columns cannot be null.");
		}
		
		if(columns.contains(LocationColumnKey.TIME)) {
			generator.writeNumberField(
				LocationColumnKey.TIME.toString(abbreviated), 
				getTime());
		}
			
		if(columns.contains(LocationColumnKey.TIMEZONE)) {
			generator.writeStringField(
				LocationColumnKey.TIMEZONE.toString(abbreviated), 
				getTimeZone().getID());
		}
			
		if(columns.contains(LocationColumnKey.LATITUDE)) {
			generator.writeNumberField(
				LocationColumnKey.LATITUDE.toString(abbreviated),  
				latitude);
		}
			
		if(columns.contains(LocationColumnKey.LONGITUDE)) {
			generator.writeNumberField(
				LocationColumnKey.LONGITUDE.toString(abbreviated), 
				longitude);
		}
			
		if(columns.contains(LocationColumnKey.ACCURACY)) {
			generator.writeNumberField(
				LocationColumnKey.ACCURACY.toString(abbreviated), 
				accuracy);
		}
			
		if(columns.contains(LocationColumnKey.PROVIDER)) {
			generator.writeStringField(
				LocationColumnKey.PROVIDER.toString(abbreviated), 
				provider);
		}
	}
/**
	 * Streams this object to the output.
	 * 
	 * @param generator The generator that will generate the result.
	 * 
	 * @param abbreviated Whether or not to stream the abbreviated keys.
	 * 
	 * @param columns The columns indicating which fields to include.
	 * 
	 * @throws JsonGenerationException There was a problem generating the JSON.
	 * 
	 * @throws IOException There was a problem writing to the stream.
	 * 
	 * @throws DomainException A required parameter was missing.
	 */
Streams this object to the output.

@param generator The generator that will generate the result.

@param abbreviated Whether or not to stream the abbreviated keys.

@param columns The columns indicating which fields to include.

@throws JsonGenerationException There was a problem generating the JSON.

@throws IOException There was a problem writing to the stream.

@throws DomainException A required parameter was missing.
Streams this object to the output . @param generator The generator that will generate the result . @param abbreviated Whether or not to stream the abbreviated keys . @param columns The columns indicating which fields to include . @throws JsonGenerationException There was a problem generating the JSON . @throws IOException There was a problem writing to the stream . @throws DomainException A required parameter was missing .
public final void streamJson(
			final JsonGenerator generator,
			final boolean abbreviated,
			final Collection<ColumnKey> columns)
			throws JsonGenerationException, IOException, DomainException {
		if(generator == null) {
			throw new DomainException("The generator is null.");
		}
		else if(columns == null) {
			throw new DomainException("The list of columns cannot be null.");
		}
		if(columns.contains(LocationColumnKey.TIME)) {
			generator.writeNumberField(
				LocationColumnKey.TIME.toString(abbreviated), 
				getTime());
		}
		if(columns.contains(LocationColumnKey.TIMEZONE)) {
			generator.writeStringField(
				LocationColumnKey.TIMEZONE.toString(abbreviated), 
				getTimeZone().getID());
		}
		if(columns.contains(LocationColumnKey.LATITUDE)) {
			generator.writeNumberField(
				LocationColumnKey.LATITUDE.toString(abbreviated),  
				latitude);
		}
		if(columns.contains(LocationColumnKey.LONGITUDE)) {
			generator.writeNumberField(
				LocationColumnKey.LONGITUDE.toString(abbreviated), 
				longitude);
		}
		if(columns.contains(LocationColumnKey.ACCURACY)) {
			generator.writeNumberField(
				LocationColumnKey.ACCURACY.toString(abbreviated), 
				accuracy);
		}
		if(columns.contains(LocationColumnKey.PROVIDER)) {
			generator.writeStringField(
				LocationColumnKey.PROVIDER.toString(abbreviated), 
				provider);
		}
	}
public final void streamJson ( final JsonGenerator generator , final boolean abbreviated , final Collection < ColumnKey > columns ) throws JsonGenerationException , IOException , DomainException { if ( generator == null ) { throw new DomainException ( "The generator is null." ) ; } else if ( columns == null ) { throw new DomainException ( "The list of columns cannot be null." ) ; } if ( columns . contains ( LocationColumnKey . TIME ) ) { generator . writeNumberField ( LocationColumnKey . TIME . toString ( abbreviated ) , getTime ( ) ) ; } if ( columns . contains ( LocationColumnKey . TIMEZONE ) ) { generator . writeStringField ( LocationColumnKey . TIMEZONE . toString ( abbreviated ) , getTimeZone ( ) . getID ( ) ) ; } if ( columns . contains ( LocationColumnKey . LATITUDE ) ) { generator . writeNumberField ( LocationColumnKey . LATITUDE . toString ( abbreviated ) , latitude ) ; } if ( columns . contains ( LocationColumnKey . LONGITUDE ) ) { generator . writeNumberField ( LocationColumnKey . LONGITUDE . toString ( abbreviated ) , longitude ) ; } if ( columns . contains ( LocationColumnKey . ACCURACY ) ) { generator . writeNumberField ( LocationColumnKey . ACCURACY . toString ( abbreviated ) , accuracy ) ; } if ( columns . contains ( LocationColumnKey . PROVIDER ) ) { generator . writeStringField ( LocationColumnKey . PROVIDER . toString ( abbreviated ) , provider ) ; } }
Streams this object to the output.
Streams this object to the output .