diggsweden / DCAT-AP-SE-Processor

GNU General Public License v3.0
9 stars 8 forks source link

Refactor and add ConversionConfig class as argument to createDcat #24

Open jonasseglare opened 1 year ago

jonasseglare commented 1 year ago

Refactor and add ConversionConfig class as argument to createDcat

Description

This pull request addresses issue #22 and makes it possible to specify a working directory where files are produced when calling the method Manager.createDcat. As part of that, I made the following changes:

Fixes #22

Discussion

The motivation for this PR was that I wanted to add a way of specifying the path where files are produced, as a workDir parameter. For that, I added the ConversionConfig class that now groups the apiSpecMap and workDir parameter. However, the workDir parameter could also be part of the Manager. I am unsure about what is best. If we would move workDir from the ConversionConfig class to Manager, then the ConversionConfig class would only contain one instance variable, apiSpecMap, and wouldn't be necessary anymore. At the same time, I am not sure it is a bad idea to have a ConversionConfig class that wraps the apiSpecMap parameter, because it makes clarifies intent and makes the code more easily extendable to adding more parameters.

Checklist