OpenRefine / OpenRefine/OpenRefine
Replace Properties with Map<String, String> in Exporters interfaces
@tfmorris is already working on this.
Since Aug 16, 2024.
- Dominant language
- Java
- Stars
- 12k
- Forks
- 2.2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 27
Description
This should be considered experimental. It's not clear that benefit will outweigh the cost of the API churn, but it depends on the proposed solution.
We would like to phase out usage of java.util.Properties in places where it's only being used because it was the only option at the time. One candidate is the Exporter API, specifically it's StreamExporter and WriterExporter subinterfaces (UrlExporter can be ignored since it isn't used anywhere). Each has a single method export() which includes a Properties-typed options parameter in its API. These should be replaced with a Map<String, String> https://github.com/OpenRefine/OpenRefine/blob/f4878804960162ba6145941bfbe0d14e60133d9b/main/src/com/google/refine/exporters/StreamExporter.java#L45
Proposed solution
Alternatives considered
There are (at least) two possible ways to do this:
- Introduce new StreamExporter2 and WriterExporter2 interfaces which are independent of the current interfaces
- Have the new interfaces extend StreamExporter and WriterExporter
Additional context
Acceptance criteria:
- all existing exporters, both bundled and those provided by extensions, continue to work without being modified or recompiled
- a clear migration path is defined from the old API to the new API for exporters which are not bundled, but are part of extensions
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.