public void write(String filename, XMLIntergreenTimes xmlIntergreenTimes) { log.info("writing file: " + filename); JAXBContext jc; try { jc = JAXBContext.newInstance(org.matsim.jaxb.intergreenTimes10.ObjectFactory.class); Marshaller m = jc.createMarshaller(); super.setMarshallerProperties(IntergreenTimesWriter10.INTERGREENTIMES10, m); BufferedWriter bufout = IOUtils.getBufferedWriter(filename); m.marshal(xmlIntergreenTimes, bufout); bufout.close(); } catch (JAXBException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
public void write(String filename) { JAXBContext jc; try { jc = JAXBContext.newInstance(org.matsim.contrib.minibus.genericUtils.gexf.ObjectFactory.class); Marshaller m = jc.createMarshaller(); super.setMarshallerProperties(GexfPPaxCount.XSD_PATH, m); BufferedWriter bufout = IOUtils.getBufferedWriter(filename); m.marshal(this.gexfContainer, bufout); bufout.close(); log.info("Output written to " + filename); } catch (JAXBException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
public void write(final String filename, XMLSignalGroups xmlSignalGroups) { log.info("writing file: " + filename); JAXBContext jc; try { jc = JAXBContext.newInstance(org.matsim.jaxb.signalgroups20.ObjectFactory.class); Marshaller m = jc.createMarshaller(); super.setMarshallerProperties(MatsimSignalSystemsReader.SIGNALGROUPS20, m); BufferedWriter bufout = IOUtils.getBufferedWriter(filename); m.marshal(xmlSignalGroups, bufout); bufout.close(); log.info(filename + " written successfully."); } catch (JAXBException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
public void write(String filename) { JAXBContext jc; try { jc = JAXBContext.newInstance(org.matsim.contrib.minibus.genericUtils.gexf.ObjectFactory.class); Marshaller m = jc.createMarshaller(); super.setMarshallerProperties(GexfPStatLight.XSD_PATH, m); BufferedWriter bufout = IOUtils.getBufferedWriter(filename); m.marshal(this.gexfContainer, bufout); bufout.close(); // log.info("Output written to " + filename); } catch (JAXBException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
public void write(String filename, XMLAmberTimes xmlAmberTimes) { log.info("writing file: " + filename); JAXBContext jc; try { jc = JAXBContext.newInstance(org.matsim.jaxb.amberTimes10.ObjectFactory.class); Marshaller m = jc.createMarshaller(); super.setMarshallerProperties(AmberTimesWriter10.AMBERTIMES10, m); BufferedWriter bufout = IOUtils.getBufferedWriter(filename); m.marshal(xmlAmberTimes, bufout); bufout.close(); } catch (JAXBException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
public void write(final String filename, XMLSignalSystems xmlSignals){ log.info("writing file: " + filename); JAXBContext jc; try { jc = JAXBContext.newInstance(org.matsim.jaxb.signalsystems20.ObjectFactory.class); Marshaller m = jc.createMarshaller(); super.setMarshallerProperties(MatsimSignalSystemsReader.SIGNALSYSTEMS20, m); BufferedWriter bufout = IOUtils.getBufferedWriter(filename); m.marshal(xmlSignals, bufout); bufout.close(); log.info(filename + " written successfully."); } catch (JAXBException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
public void write(String filename) { JAXBContext jc; try { jc = JAXBContext.newInstance(org.matsim.contrib.minibus.genericUtils.gexf.ObjectFactory.class); Marshaller m = jc.createMarshaller(); super.setMarshallerProperties(GexfPOperatorCount.XSD_PATH, m); BufferedWriter bufout = IOUtils.getBufferedWriter(filename); m.marshal(this.gexfContainer, bufout); bufout.close(); log.info("Output written to " + filename); } catch (JAXBException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
public void write(String filename) { JAXBContext jc; try { jc = JAXBContext.newInstance(org.matsim.contrib.minibus.genericUtils.gexf.ObjectFactory.class); Marshaller m = jc.createMarshaller(); super.setMarshallerProperties(PlanElement2Gexf.XSD_PATH, m); BufferedWriter bufout = IOUtils.getBufferedWriter(filename); m.marshal(this.gexfContainer, bufout); bufout.close(); // log.info("Output written to " + filename); } catch (JAXBException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
public void write(String filename) { JAXBContext jc; try { jc = JAXBContext.newInstance(org.matsim.contrib.minibus.genericUtils.gexf.ObjectFactory.class); Marshaller m = jc.createMarshaller(); super.setMarshallerProperties(SimpleGexfPStat.XSD_PATH, m); BufferedWriter bufout = IOUtils.getBufferedWriter(filename); m.marshal(this.gexfContainer, bufout); bufout.close(); // log.info("Output written to " + filename); } catch (JAXBException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
public void write(String filename) { JAXBContext jc; try { jc = JAXBContext.newInstance(org.matsim.contrib.minibus.genericUtils.gexf.ObjectFactory.class); Marshaller m = jc.createMarshaller(); super.setMarshallerProperties(GexfPStat.XSD_PATH, m); BufferedWriter bufout = IOUtils.getBufferedWriter(filename); m.marshal(this.gexfContainer, bufout); bufout.close(); // log.info("Output written to " + filename); } catch (JAXBException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
@Override public void write(String filename) { log.info("writing output to " + filename); JAXBContext jc; try { jc = JAXBContext.newInstance(org.matsim.contrib.minibus.genericUtils.gexf.ObjectFactory.class); Marshaller m = jc.createMarshaller(); super.setMarshallerProperties(xsdPath, m); BufferedWriter bufout = IOUtils.getBufferedWriter(filename); m.marshal(gexfContent, bufout); bufout.close(); log.info(filename + " written successfully."); } catch (JAXBException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
public void write(String filename, XMLSignalControl xmlSignalControl) { log.info("writing file: " + filename); JAXBContext jc; try { jc = JAXBContext.newInstance(org.matsim.jaxb.signalcontrol20.ObjectFactory.class); Marshaller m = jc.createMarshaller(); super.setMarshallerProperties(MatsimSignalSystemsReader.SIGNALCONTROL20, m); BufferedWriter bufout = IOUtils.getBufferedWriter(filename); m.marshal(xmlSignalControl, bufout); bufout.close(); log.info(filename + " written successfully."); } catch (JAXBException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
/** * @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); } }