use of ch.ehi.ili2db.gui.Config in project ili2db by claeis.
the class MultipleGeomAttrsTest method importIli.
@Test
public void importIli() throws Exception {
File fgdbFile = new File(fgdbFileName);
Fgdb4j.deleteFileGdb(fgdbFile);
Class driverClass = Class.forName(FgdbDriver.class.getName());
File data = new File("test/data/MultipleGeomAttrs/MultipleGeomAttrs1.ili");
Config config = initConfig(data.getPath(), data.getPath() + ".log");
config.setFunction(Config.FC_SCHEMAIMPORT);
config.setCreateFk(config.CREATE_FK_YES);
config.setCreateNumChecks(true);
config.setTidHandling(Config.TID_HANDLING_PROPERTY);
config.setBasketHandling(config.BASKET_HANDLING_READWRITE);
config.setCatalogueRefTrafo(null);
config.setMultiSurfaceTrafo(null);
config.setMultilingualTrafo(null);
config.setInheritanceTrafo(null);
// Ili2db.readSettingsFromDb(config);
Ili2db.run(config, null);
}
use of ch.ehi.ili2db.gui.Config in project ili2db by claeis.
the class MultipleGeomAttrsTest method exportXtf.
@Test
public void exportXtf() throws Exception {
EhiLogger.getInstance().setTraceFilter(false);
File fgdbFile = new File(fgdbFileName);
// Fgdb4j.deleteFileGdb(fgdbFile);
Class driverClass = Class.forName(FgdbDriver.class.getName());
File data = new File("test/data/MultipleGeomAttrs/MultipleGeomAttrs1a-out.xtf");
Config config = initConfig(data.getPath(), data.getPath() + ".log");
config.setFunction(Config.FC_EXPORT);
config.setModels("MultipleGeomAttrs1");
Ili2db.readSettingsFromDb(config);
try {
Ili2db.run(config, null);
} catch (Exception ex) {
EhiLogger.logError(ex);
Assert.fail();
}
}
use of ch.ehi.ili2db.gui.Config in project ili2db by claeis.
the class MultipleGeomAttrsTest method initConfig.
public Config initConfig(String xtfFilename, String logfile) {
Config config = new Config();
new ch.ehi.ili2fgdb.FgdbMain().initConfig(config);
config.setDbfile(fgdbFileName);
config.setDburl(FgdbDriver.BASE_URL + fgdbFileName);
if (logfile != null) {
config.setLogfile(logfile);
}
config.setXtffile(xtfFilename);
if (xtfFilename != null && Ili2db.isItfFilename(xtfFilename)) {
config.setItfTransferfile(true);
}
return config;
}
use of ch.ehi.ili2db.gui.Config in project ili2db by claeis.
the class MultisurfaceTest method importIli.
@Test
public void importIli() throws Exception {
File fgdbFile = new File(fgdbFileName);
Fgdb4j.deleteFileGdb(fgdbFile);
Class driverClass = Class.forName(FgdbDriver.class.getName());
File data = new File("test/data/MultiSurface/MultiSurface2.ili");
Config config = initConfig(data.getPath(), data.getPath() + ".log");
config.setFunction(Config.FC_SCHEMAIMPORT);
config.setCreateFk(config.CREATE_FK_YES);
config.setCreateNumChecks(true);
config.setTidHandling(Config.TID_HANDLING_PROPERTY);
config.setBasketHandling(config.BASKET_HANDLING_READWRITE);
config.setCatalogueRefTrafo(null);
config.setMultiSurfaceTrafo(Config.MULTISURFACE_TRAFO_COALESCE);
config.setMultiLineTrafo(null);
config.setMultilingualTrafo(null);
config.setInheritanceTrafo(null);
// Ili2db.readSettingsFromDb(config);
Ili2db.run(config, null);
}
use of ch.ehi.ili2db.gui.Config in project ili2db by claeis.
the class MultisurfaceTest method importXtf.
@Test
public void importXtf() throws Exception {
EhiLogger.getInstance().setTraceFilter(false);
File fgdbFile = new File(fgdbFileName);
Fgdb4j.deleteFileGdb(fgdbFile);
Class driverClass = Class.forName(FgdbDriver.class.getName());
File data = new File("test/data/MultiSurface/MultiSurface2a.xtf");
Config config = initConfig(data.getPath(), data.getPath() + ".log");
config.setFunction(Config.FC_IMPORT);
config.setCreateFk(config.CREATE_FK_YES);
config.setCreateNumChecks(true);
config.setTidHandling(Config.TID_HANDLING_PROPERTY);
config.setBasketHandling(config.BASKET_HANDLING_READWRITE);
config.setCatalogueRefTrafo(null);
config.setMultiSurfaceTrafo(Config.MULTISURFACE_TRAFO_COALESCE);
config.setMultiLineTrafo(null);
config.setMultilingualTrafo(null);
config.setInheritanceTrafo(null);
// Ili2db.readSettingsFromDb(config);
try {
Ili2db.run(config, null);
} catch (Exception ex) {
EhiLogger.logError(ex);
Assert.fail();
}
}
Aggregations