Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AB83B200C1D for ; Thu, 16 Feb 2017 13:08:48 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id AA1D3160B61; Thu, 16 Feb 2017 12:08:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F40DF160B57 for ; Thu, 16 Feb 2017 13:08:47 +0100 (CET) Received: (qmail 89387 invoked by uid 500); 16 Feb 2017 12:08:47 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 89376 invoked by uid 99); 16 Feb 2017 12:08:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2017 12:08:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B6A52C6A7A for ; Thu, 16 Feb 2017 12:08:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.998 X-Spam-Level: X-Spam-Status: No, score=-1.998 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id ytRsh3CJMD-V for ; Thu, 16 Feb 2017 12:08:46 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id A02555F54F for ; Thu, 16 Feb 2017 12:08:45 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 07A40E05F0 for ; Thu, 16 Feb 2017 12:08:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id B216B24121 for ; Thu, 16 Feb 2017 12:08:41 +0000 (UTC) Date: Thu, 16 Feb 2017 12:08:41 +0000 (UTC) From: "Stian Soiland-Reyes (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (COMMONSRDF-58) Refactor RDFParser fluent interface MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 16 Feb 2017 12:08:48 -0000 [ 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)