[
https://issues.apache.org/jira/browse/COMMONSRDF-58?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stian Soiland-Reyes updated COMMONSRDF-58:
------------------------------------------
Description:
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}}
* 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"}}
was:
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"}}
> Refactor RDFParser fluent interface
> -----------------------------------
>
> Key: COMMONSRDF-58
> URL: https://issues.apache.org/jira/browse/COMMONSRDF-58
> Project: Apache Commons RDF
> Issue Type: Bug
> Components: api, parser
> 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}}
> * 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"}}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)