vaimee / SEPA

Get notifications about changes in your SPARQL endpoint.
26 stars 10 forks source link

Improving EngineProperties saving #46

Closed andre-bisa closed 5 years ago

andre-bisa commented 5 years ago

In my opinion the class it.unibo.arces.wot.sepa.engine.core.EngineProperties manages wrongly the default values. To be more precise the defaults are duplicated in the file, those are present both in "defaults" function and in every single getXXXX function. I think the best solution is to use one class to manage the current settings and load and save the class via JSON format using the GSON library. The structure I propose is:

relu91 commented 5 years ago

Hello Andrea, thank you for your feedback! I agree with you the EngineProperties class needs a heavy refactoring. Your proposal seems legit, I'd make loadProperties, saveProperties, loadDefaults static methods and change constructor visibility to private. PR are welcomed if you have time to implement this feature, work on dev branch and make a pull request. I'll evaluate your proposal!

relu91 commented 5 years ago

I'm closing this issue since it has been fixed with the PR, thank you @andre-bisa