Description
Given discussion on dev I think we agreed on removing the always-clone-immutable feature, and several suggestions for improvements of RDFParser.
Suggestions were:
- Mutate directly on setters (builder does not need to be thread safe all the time)
- Add a freeze() to make a thread-safe clone – it will return an unfreezed version on any mutating setters
- Use names like withSource() etc instead of source()
- Bind RDFSyntax when getting a parser – e.g. RDF.createParser(RDFSyntax.TURTLE)
- .. or new registry?
- Return a CompletableFuture rather than just a Future (so they can be easily composed)
- Allow direct synchronous calls without Future
- Use a Source and Destination wrapper interface rather than Path and URI directly?
- Short-cut calls like parser.parse(source, dest)
- Support streaming parsers
- Support arbitrary configuration options? e.g. parser.setOption(CustomOption5, "Fred"