// Path: core/src/main/java/org/hisrc/tenra/processor/Processor.java
// public class Processor {
// 
// 	public void process(Settings settings) throws IOException {
// 		final File inputFile = settings.getInputFile();
// 		final File outputDirectory = settings.getOutputDirectory();
// 		Validate.notNull(inputFile, "Input file must not be null.");
// 		Validate.isTrue(inputFile.isFile(), MessageFormat.format(
// 				"Input file [{0}] must be a file.", inputFile));
// 		Validate.notNull(outputDirectory, "Output directory must not be null.");
// 		Validate.isTrue(outputDirectory.isDirectory(), MessageFormat.format(
// 				"Output directory [{0}] must be a directory.", outputDirectory));
// 		final Parser parser = new Parser();
// 		final ModelBuilder builder = new ModelBuilder();
// 		try (final InputStream is = new FileInputStream(settings.getInputFile());) {
// 			parser.parse(is, builder);
// 		}
// 		builder.build();
// 		final Serializer<Object> serializer = new GenericJsonSerializer(settings);
// 		serializer.start();
// 		for (RailwayNode item : builder.getRailwayNodes())
// 		{
// 			serializer.serialize(item);
// 		}
// 		for (RailwayLink item : builder.getRailwayLinks())
// 		{
// 			serializer.serialize(item);
// 		}
// 		for (RailwayStationNode item : builder.getRailwayStationNodes())
// 		{
// 			serializer.serialize(item);
// 		}
// 		for (RailwayLine item : builder.getRailwayLines())
// 		{
// 			serializer.serialize(item);
// 		}
// 		for (RailwayLinkSequence item : builder.getRailwayLinkSequences())
// 		{
// 			serializer.serialize(item);
// 		}
// 		for (MarkerPost item : builder.getMarkerPosts())
// 		{
// 			serializer.serialize(item);
// 		}
// 		serializer.end();
// 	}
// }
// 
// Path: core/src/main/java/org/hisrc/tenra/settings/Settings.java
// public class Settings {
// 
// 	private File inputFile;
// 
// 	public File getInputFile() {
// 		return inputFile;
// 	}
// 
// 	@Argument(required = true, metaVar = "<INPUT FILE>", usage = "Input file")
// 	public void setInputFile(File inputFile) {
// 		this.inputFile = inputFile;
// 	}
// 
// 	private File outputDirectory = new File(".");
// 
// 	public File getOutputDirectory() {
// 		return outputDirectory;
// 	}
// 
// 	@Option(required = false, name = "-d", aliases = "--output-directory", usage = "Output directory, defaults to the current directory", metaVar = "<OUTPUT DIRECTORY>")
// 	public void setOutputDirectory(File outputDirectory) {
// 		this.outputDirectory = outputDirectory;
// 	}
// 
// }


import org.hisrc.tenra.processor.Processor;
import org.hisrc.tenra.settings.Settings;
import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.args4j.CmdLineParser;
package org.hisrc.tenra;


public class Main {

	public static void main(String[] args) throws Exception {

// Path: core/src/main/java/org/hisrc/tenra/processor/Processor.java
// public class Processor {
// 
// 	public void process(Settings settings) throws IOException {
// 		final File inputFile = settings.getInputFile();
// 		final File outputDirectory = settings.getOutputDirectory();
// 		Validate.notNull(inputFile, "Input file must not be null.");
// 		Validate.isTrue(inputFile.isFile(), MessageFormat.format(
// 				"Input file [{0}] must be a file.", inputFile));
// 		Validate.notNull(outputDirectory, "Output directory must not be null.");
// 		Validate.isTrue(outputDirectory.isDirectory(), MessageFormat.format(
// 				"Output directory [{0}] must be a directory.", outputDirectory));
// 		final Parser parser = new Parser();
// 		final ModelBuilder builder = new ModelBuilder();
// 		try (final InputStream is = new FileInputStream(settings.getInputFile());) {
// 			parser.parse(is, builder);
// 		}
// 		builder.build();
// 		final Serializer<Object> serializer = new GenericJsonSerializer(settings);
// 		serializer.start();
// 		for (RailwayNode item : builder.getRailwayNodes())
// 		{
// 			serializer.serialize(item);
// 		}
// 		for (RailwayLink item : builder.getRailwayLinks())
// 		{
// 			serializer.serialize(item);
// 		}
// 		for (RailwayStationNode item : builder.getRailwayStationNodes())
// 		{
// 			serializer.serialize(item);
// 		}
// 		for (RailwayLine item : builder.getRailwayLines())
// 		{
// 			serializer.serialize(item);
// 		}
// 		for (RailwayLinkSequence item : builder.getRailwayLinkSequences())
// 		{
// 			serializer.serialize(item);
// 		}
// 		for (MarkerPost item : builder.getMarkerPosts())
// 		{
// 			serializer.serialize(item);
// 		}
// 		serializer.end();
// 	}
// }
// 
// Path: core/src/main/java/org/hisrc/tenra/settings/Settings.java
// public class Settings {
// 
// 	private File inputFile;
// 
// 	public File getInputFile() {
// 		return inputFile;
// 	}
// 
// 	@Argument(required = true, metaVar = "<INPUT FILE>", usage = "Input file")
// 	public void setInputFile(File inputFile) {
// 		this.inputFile = inputFile;
// 	}
// 
// 	private File outputDirectory = new File(".");
// 
// 	public File getOutputDirectory() {
// 		return outputDirectory;
// 	}
// 
// 	@Option(required = false, name = "-d", aliases = "--output-directory", usage = "Output directory, defaults to the current directory", metaVar = "<OUTPUT DIRECTORY>")
// 	public void setOutputDirectory(File outputDirectory) {
// 		this.outputDirectory = outputDirectory;
// 	}
// 
// }


// Path: core/src/main/java/org/hisrc/tenra/Main.java
import org.hisrc.tenra.processor.Processor;
import org.hisrc.tenra.settings.Settings;
import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.args4j.CmdLineParser;

package org.hisrc.tenra;


public class Main {

	public static void main(String[] args) throws Exception {

			final Settings settings = new Settings();