Search in sources :

Example 1 with CustomMappingNull

use of ch.ehi.ili2db.fromili.CustomMappingNull in project ili2db by claeis.

the class Ili2db method getCustomMappingStrategy.

private static CustomMapping getCustomMappingStrategy(ch.ehi.ili2db.gui.Config config) throws Ili2dbException {
    String mappingClassName = config.getIli2dbCustomStrategy();
    if (mappingClassName == null) {
        return new CustomMappingNull();
    }
    CustomMapping mapping = null;
    try {
        mapping = (CustomMapping) Class.forName(mappingClassName).newInstance();
    } catch (Exception ex) {
        throw new Ili2dbException("failed to load/create custom mapping strategy", ex);
    }
    return mapping;
}
Also used : CustomMapping(ch.ehi.ili2db.fromili.CustomMapping) CustomMappingNull(ch.ehi.ili2db.fromili.CustomMappingNull) IoxException(ch.interlis.iox.IoxException) FileNotFoundException(java.io.FileNotFoundException) SQLException(java.sql.SQLException) ConverterException(ch.ehi.ili2db.converter.ConverterException) IOException(java.io.IOException)

Aggregations

ConverterException (ch.ehi.ili2db.converter.ConverterException)1 CustomMapping (ch.ehi.ili2db.fromili.CustomMapping)1 CustomMappingNull (ch.ehi.ili2db.fromili.CustomMappingNull)1 IoxException (ch.interlis.iox.IoxException)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 SQLException (java.sql.SQLException)1