public static void serializeFormInputs(File dir) {

		if (instance == null) {
			LOGGER.error("No instance of FormInputValueHelper exists.");
			return;
		}

		final File out = new File(dir, FORMS_JSON_FILE);
		Gson json = new GsonBuilder().setPrettyPrinting().create();
		String serialized = json.toJson(instance.formInputs.values());

		try {
			LOGGER.info("Writing training form inputs to " + out.toString());
			FileUtils.writeStringToFile(out, serialized, Charset.defaultCharset());
		} catch (IOException e) {
			LOGGER.error(e.getMessage(), e);
		}

	}
public static void serializeFormInputs ( File dir ) { if ( instance == null ) { LOGGER . error ( "No instance of FormInputValueHelper exists." ) ; return ; } final File out = new File ( dir , FORMS_JSON_FILE ) ; Gson json = new GsonBuilder ( ) . setPrettyPrinting ( ) . create ( ) ; String serialized = json . toJson ( instance . formInputs . values ( ) ) ; try { LOGGER . info ( "Writing training form inputs to " + out . toString ( ) ) ; FileUtils . writeStringToFile ( out , serialized , Charset . defaultCharset ( ) ) ; } catch ( IOException e ) { LOGGER . error ( e . getMessage ( ) , e ) ; } }
Serializes form inputs and writes the data to the output directory to be used by future
non-training crawls.

@param dir The output directory for the form input data.