MATSIM
RunEventsConverterXML.java
Go to the documentation of this file.
1 /*
2  * *********************************************************************** *
3  * * project: org.matsim.*
4  * * DefaultControlerModules.java
5  * * *
6  * * *********************************************************************** *
7  * * *
8  * * copyright : (C) 2014 by the members listed in the COPYING, *
9  * * LICENSE and WARRANTY file. *
10  * * email : info at matsim dot org *
11  * * *
12  * * *********************************************************************** *
13  * * *
14  * * This program is free software; you can redistribute it and/or modify *
15  * * it under the terms of the GNU General Public License as published by *
16  * * the Free Software Foundation; either version 2 of the License, or *
17  * * (at your option) any later version. *
18  * * See also COPYING, LICENSE and WARRANTY file *
19  * * *
20  * * ***********************************************************************
21  */
22 package tutorial.converter.completeEventFilesRegardingVehicleInformation;
23 
27 
32 public class RunEventsConverterXML {
33 
34  // select the event file you want to convert
35  private static String inputFile = "inputFile.xml";
36  private static String outputFile = "outputFile.xml";
37 
38  public static void main(String[] args) {
39 
40  if (args != null && args.length != 0){
41  inputFile = args[0];
42  }
43 
45  EventWriterXML eventWriter = new EventWriterXML(outputFile);
46  em.addHandler(eventWriter);
47 
48  EventsConverterXML converter = new EventsConverterXML(em);
49  converter.readFile(inputFile);
50 
51  eventWriter.closeFile();
52  }
53 
54 }
void addHandler(final EventHandler handler)
static EventsManager createEventsManager()
final void readFile(final String filename)