/** * Writes the transit schedule to the specified file in the file * format specified by <tt>transitSchedule_v1.dtd</tt> * * @param filename * @throws UncheckedIOException */ public void writeFileV1(final String filename) throws UncheckedIOException { log.info( Gbl.aboutToWrite("transit schedule", filename) ) ; new TransitScheduleWriterV1(this.transformation, this.schedule).write(filename); }
/** * Writes the transit schedule to the specified file in the file * format specified by <tt>transitSchedule_v2.dtd</tt> * * @param filename * @throws UncheckedIOException */ public void writeFileV2(final String filename) throws UncheckedIOException { log.info( Gbl.aboutToWrite( "transit schedule" , filename ) ) ; new TransitScheduleWriterV2(this.transformation, this.schedule).write(filename); } }
/** * @see org.matsim.core.utils.io.MatsimJaxbXmlWriter#write(java.lang.String) */ @Override public void write(String filename) { log.info( Gbl.aboutToWrite( "lanes", filename ) ) ; JAXBContext jc; try { XMLLaneDefinitions xmlLaneDefinitions = convertDataToXml(); jc = JAXBContext.newInstance(org.matsim.jaxb.lanedefinitions20.ObjectFactory.class); Marshaller m = jc.createMarshaller(); super.setMarshallerProperties(LanesReader.SCHEMALOCATIONV20, m); BufferedWriter bufout = IOUtils.getBufferedWriter(filename); m.marshal(xmlLaneDefinitions, bufout); bufout.close(); } catch (JAXBException | IOException | MarshalException e) { throw new RuntimeException(e); } }
public void writeFile(String filename) throws UncheckedIOException { log.info( Gbl.aboutToWrite( " households", filename ) ) ; this.openFileAndWritePreamble(filename); this.writeHouseholds(this.households); this.writeEndAndCloseFile(); }
public void writeFile(String filename) throws UncheckedIOException { log.info( Gbl.aboutToWrite( "vehicles", filename) ) ; this.openFile(filename); this.writeXmlHead(); this.writeRootElement(); this.close(); }