Properties props = new Properties();
props.load(new FileInputStream(file));
String name = props.getProperty("name");
String type = props.getProperty("type");
if (name != null && type != null) {
Type t = SaikuDatasource.Type.valueOf(type.toUpperCase());
SaikuDatasource ds = new SaikuDatasource(name, t, props);
datasources.put(name, ds);
}
}
}