commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stian Soiland-Reyes (JIRA)" <j...@apache.org>
Subject [jira] [Created] (COMMONSRDF-58) Refactor RDFParser fluent interface
Date Thu, 16 Feb 2017 12:07:42 GMT
Stian Soiland-Reyes created COMMONSRDF-58:
---------------------------------------------

             Summary: Refactor RDFParser fluent interface
                 Key: COMMONSRDF-58
                 URL: https://issues.apache.org/jira/browse/COMMONSRDF-58
             Project: Apache Commons RDF
          Issue Type: Bug
          Components: parser, api
            Reporter: Stian Soiland-Reyes
            Assignee: Stian Soiland-Reyes
             Fix For: 1.0.0


Given [discussion on dev|https://lists.apache.org/thread.html/f2b1933c574dc24a62c67659c43f288eb88c18f5d405150f29a24c83@%3Cdev.commons.apache.org%3E]
I think we agreed on removing the always-clone-immutable feature, and several suggestions
for improvements of [RDFParser|https://github.com/apache/commons-rdf/blob/master/api/src/main/java/org/apache/commons/rdf/experimental/RDFParser.java].

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}}
* Short-cut calls like {{parser.parse(source, dest)}}
* Support streaming parsers
* Support arbitrary configuration options? e.g. {{parser.setOption(CustomOption5, "Fred"}}





--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message