String writeConfigFileV3(Matsim4UrbansimConfigType m4uConfigType) throws UncheckedIOException {
  try {
    String destination=this.dummyPath + "/test_config.xml";
    log.info("writing test config into: " + destination);
    BufferedWriter bw=IOUtils.getBufferedWriter(destination);
    String xsdPath=TempDirectoryUtil.createCustomTempDirectory("xsd");
    LoadFile loadFile=new LoadFile(InternalConstants.CURRENT_MATSIM_4_URBANSIM_XSD_MATSIMORG,xsdPath,InternalConstants.CURRENT_XSD_FILE_NAME);
    File file2XSD=loadFile.loadMATSim4UrbanSimXSD();
    if (file2XSD == null || !file2XSD.exists()) {
      log.error("Did not find xml schema!");
      System.exit(1);
    }
    log.info("Using following xsd schema: " + file2XSD.getCanonicalPath());
    SchemaFactory schemaFactory=SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Schema schema=schemaFactory.newSchema(file2XSD);
    JAXBContext jaxbContext=JAXBContext.newInstance(org.matsim.contrib.matsim4urbansim.matsim4urbansim.jaxbconfigv3.ObjectFactory.class);
    Marshaller m=jaxbContext.createMarshaller();
    m.setSchema(schema);
    m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,Boolean.TRUE);
    org.matsim.contrib.matsim4urbansim.matsim4urbansim.jaxbconfigv3.ObjectFactory of=new org.matsim.contrib.matsim4urbansim.matsim4urbansim.jaxbconfigv3.ObjectFactory();
    JAXBElement<Matsim4UrbansimConfigType> jaxbElement=of.createMatsim4UrbansimConfig(m4uConfigType);
    m.marshal(jaxbElement,bw);
    return destination;
  }
 catch (  JAXBException e) {
    e.printStackTrace();
    Assert.assertFalse(true);
  }
catch (  SAXException e) {
    e.printStackTrace();
    Assert.assertFalse(true);
  }
catch (  IOException e) {
    e.printStackTrace();
    Assert.assertFalse(true);
  }
  return null;
}

String writeConfigFileV3 ( Matsim4UrbansimConfigType m4uConfigType ) throws UncheckedIOException { try { String destination = this . dummyPath + "/test_config.xml" ; log . info ( "writing test config into: " + destination ) ; BufferedWriter bw = IOUtils . getBufferedWriter ( destination ) ; String xsdPath = TempDirectoryUtil . createCustomTempDirectory ( "xsd" ) ; LoadFile loadFile = new LoadFile ( InternalConstants . CURRENT_MATSIM_4_URBANSIM_XSD_MATSIMORG , xsdPath , InternalConstants . CURRENT_XSD_FILE_NAME ) ; File file2XSD = loadFile . loadMATSim4UrbanSimXSD ( ) ; if ( file2XSD == null || ! file2XSD . exists ( ) ) { log . error ( "Did not find xml schema!" ) ; System . exit ( 1 ) ; } log . info ( "Using following xsd schema: " + file2XSD . getCanonicalPath ( ) ) ; SchemaFactory schemaFactory = SchemaFactory . newInstance ( XMLConstants . W3C_XML_SCHEMA_NS_URI ) ; Schema schema = schemaFactory . newSchema ( file2XSD ) ; JAXBContext jaxbContext = JAXBContext . newInstance ( org . matsim . contrib . matsim4urbansim . matsim4urbansim . jaxbconfigv3 . ObjectFactory . class ) ; Marshaller m = jaxbContext . createMarshaller ( ) ; m . setSchema ( schema ) ; m . setProperty ( Marshaller . JAXB_FORMATTED_OUTPUT , Boolean . TRUE ) ; org . matsim . contrib . matsim4urbansim . matsim4urbansim . jaxbconfigv3 . ObjectFactory of = new org . matsim . contrib . matsim4urbansim . matsim4urbansim . jaxbconfigv3 . ObjectFactory ( ) ; JAXBElement < Matsim4UrbansimConfigType > jaxbElement = of . createMatsim4UrbansimConfig ( m4uConfigType ) ; m . marshal ( jaxbElement , bw ) ; return destination ; } catch ( JAXBException e ) { e . printStackTrace ( ) ; Assert . assertFalse ( true ) ; } catch ( SAXException e ) { e . printStackTrace ( ) ; Assert . assertFalse ( true ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; Assert . assertFalse ( true ) ; } return null ; }
writes the matsim4urbansimconfigtype confing at the specified place using jaxb
