ANRGenstar / genstar

Generation of Synthetic Populations Library
20 stars 2 forks source link

provide an easier way to read a configuration file #39

Open samthiriot opened 6 years ago

samthiriot commented 6 years ago

It is now (after some refactoring already - before the expected class was expected !:


new GenstarJsonUtil().unmarchalConfigurationFileFromGenstarJson(
                     Paths.get("src/test/resources/rouen_demographics/rouen_demographics.gns"));

we might expect instead a GenstarConfigurationFile.loadFromJson(...) which would not require the user to discover the concept of a class, create an instance, and "unmarshall"

samthiriot commented 6 years ago

same for writing a configuration file: try { new GenstarJsonUtil().marshalToGenstarJson(relativePath.resolve(CONF_EXPORT), gcf, false); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }

is not the easiest way for a user to just to a "saveToFile"!