Uploaded image for project: 'Apache Commons RDF'
  1. Apache Commons RDF
  2. COMMONSRDF-58

Refactor RDFParser fluent interface

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.0.0
    • Component/s: api, parser
    • Labels:
      None

      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"

        Attachments

          Activity

            People

            • Assignee:
              stain Stian Soiland-Reyes
              Reporter:
              stain Stian Soiland-Reyes
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: