// Path: gtfs-validator-json/src/main/java/com/conveyal/gtfs/validator/json/FeedValidationResultSet.java
// public class FeedValidationResultSet {
//     /** The name of this feedset. In the simplest case this is the name of the directory
//      * containing the first feed.
//      */
//     public String name;
// 
//     /**
//      * The date of this run
//      */
//     public Date date;
// 
//     // note: the following three fields are private because applications should not manipulate them
//     // directly, as they track internal state. We add a JsonProperty annotation to each so that it
//     // is exported in the JSON. While this theoretically embeds one format into code that is generally
//     // intended to be format-generic, it shouldn't be an issue because the annotation should simply have
//     // no effect outside of Jackson.
//     
//     /**
//      * The number of feeds validated.
//      */
//     @JsonProperty
//     private int feedCount;
// 
//     /**
//      * The number of feeds that were able to be loaded (they may have had validation errors,
//      * but nothing that makes them unusable, at least not from a technical standpoint).
//      */
//     @JsonProperty
//     private int loadCount;
// 
//     /**
//      * The validation results of all of the feeds.
//      */
//     @JsonProperty
//     private Set<FeedValidationResult> results;
// 
//     /**
//      * Add a feed validation result to this result set.
//      */
//     public void add(FeedValidationResult results) {
//         this.results.add(results);
//         feedCount++;
//         if (LoadStatus.SUCCESS.equals(results.loadStatus))
//             loadCount++;
//     }
//     
//     /**
//      * Create a new FeedValidationResultSet with the given initial capacity.
//      * @param capacity initial capacity
//      */
//     public FeedValidationResultSet (int capacity) {
//         this.results = new HashSet<FeedValidationResult>(capacity);
//         this.date = new Date();
//     }
//     
//     /**
//      * Create a new FeedValidationResultSet with a reasonable default initial capacity.
//      */
//     public FeedValidationResultSet () {
//         this(16);
//     }
// }


import java.awt.geom.Rectangle2D;
import java.io.File;
import java.io.IOException;
import com.conveyal.gtfs.validator.json.FeedValidationResultSet;
import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectWriter;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
package com.conveyal.gtfs.validator.json.serialization;



/**
 * Serialize validation results to JSON, using Jackson
 * @author mattwigway
 */
public class JsonSerializer extends Serializer {
	private ObjectMapper mapper;
	private ObjectWriter writer;

	
	/**
	 * Create a JSON serializer for these validation results.
	 * @param results
	 */
// Path: gtfs-validator-json/src/main/java/com/conveyal/gtfs/validator/json/FeedValidationResultSet.java
// public class FeedValidationResultSet {
//     /** The name of this feedset. In the simplest case this is the name of the directory
//      * containing the first feed.
//      */
//     public String name;
// 
//     /**
//      * The date of this run
//      */
//     public Date date;
// 
//     // note: the following three fields are private because applications should not manipulate them
//     // directly, as they track internal state. We add a JsonProperty annotation to each so that it
//     // is exported in the JSON. While this theoretically embeds one format into code that is generally
//     // intended to be format-generic, it shouldn't be an issue because the annotation should simply have
//     // no effect outside of Jackson.
//     
//     /**
//      * The number of feeds validated.
//      */
//     @JsonProperty
//     private int feedCount;
// 
//     /**
//      * The number of feeds that were able to be loaded (they may have had validation errors,
//      * but nothing that makes them unusable, at least not from a technical standpoint).
//      */
//     @JsonProperty
//     private int loadCount;
// 
//     /**
//      * The validation results of all of the feeds.
//      */
//     @JsonProperty
//     private Set<FeedValidationResult> results;
// 
//     /**
//      * Add a feed validation result to this result set.
//      */
//     public void add(FeedValidationResult results) {
//         this.results.add(results);
//         feedCount++;
//         if (LoadStatus.SUCCESS.equals(results.loadStatus))
//             loadCount++;
//     }
//     
//     /**
//      * Create a new FeedValidationResultSet with the given initial capacity.
//      * @param capacity initial capacity
//      */
//     public FeedValidationResultSet (int capacity) {
//         this.results = new HashSet<FeedValidationResult>(capacity);
//         this.date = new Date();
//     }
//     
//     /**
//      * Create a new FeedValidationResultSet with a reasonable default initial capacity.
//      */
//     public FeedValidationResultSet () {
//         this(16);
//     }
// }


// Path: gtfs-validator-json/src/main/java/com/conveyal/gtfs/validator/json/serialization/JsonSerializer.java
import java.awt.geom.Rectangle2D;
import java.io.File;
import java.io.IOException;
import com.conveyal.gtfs.validator.json.FeedValidationResultSet;
import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectWriter;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;

package com.conveyal.gtfs.validator.json.serialization;



/**
 * Serialize validation results to JSON, using Jackson
 * @author mattwigway
 */
public class JsonSerializer extends Serializer {
	private ObjectMapper mapper;
	private ObjectWriter writer;

	
	/**
	 * Create a JSON serializer for these validation results.
	 * @param results
	 */
	public JsonSerializer (FeedValidationResultSet results) {