Return-Path: X-Original-To: apmail-commonsrdf-commits-archive@minotaur.apache.org Delivered-To: apmail-commonsrdf-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 00EE119993 for ; Fri, 1 Apr 2016 15:20:42 +0000 (UTC) Received: (qmail 66744 invoked by uid 500); 1 Apr 2016 15:20:42 -0000 Delivered-To: apmail-commonsrdf-commits-archive@commonsrdf.apache.org Received: (qmail 66715 invoked by uid 500); 1 Apr 2016 15:20:41 -0000 Mailing-List: contact commits-help@commonsrdf.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commonsrdf.incubator.apache.org Delivered-To: mailing list commits@commonsrdf.incubator.apache.org Received: (qmail 66706 invoked by uid 99); 1 Apr 2016 15:20:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Apr 2016 15:20:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7C6AB18056B for ; Fri, 1 Apr 2016 15:20:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.221 X-Spam-Level: X-Spam-Status: No, score=-3.221 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 5ZHaVCjpc4iT for ; Fri, 1 Apr 2016 15:20:39 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with SMTP id 091AA5FB76 for ; Fri, 1 Apr 2016 15:20:38 +0000 (UTC) Received: (qmail 66452 invoked by uid 99); 1 Apr 2016 15:20:38 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Apr 2016 15:20:38 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3F217DFDE3; Fri, 1 Apr 2016 15:20:38 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: stain@apache.org To: commits@commonsrdf.incubator.apache.org Date: Fri, 01 Apr 2016 15:20:46 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [9/9] incubator-commonsrdf git commit: RDFParserBuilder javadoc on exceptions RDFParserBuilder javadoc on exceptions Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/6f1f669a Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/6f1f669a Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/6f1f669a Branch: refs/heads/parser-writer-interface Commit: 6f1f669a38a05e61d40cbbfd1572e0127244669b Parents: 5e41513 Author: Stian Soiland-Reyes Authored: Mon Mar 28 02:06:16 2016 +0100 Committer: Stian Soiland-Reyes Committed: Fri Apr 1 16:19:59 2016 +0100 ---------------------------------------------------------------------- .../commons/rdf/api/RDFParserBuilder.java | 32 +++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/6f1f669a/api/src/main/java/org/apache/commons/rdf/api/RDFParserBuilder.java ---------------------------------------------------------------------- diff --git a/api/src/main/java/org/apache/commons/rdf/api/RDFParserBuilder.java b/api/src/main/java/org/apache/commons/rdf/api/RDFParserBuilder.java index 3a853f5..6d2d1d0 100644 --- a/api/src/main/java/org/apache/commons/rdf/api/RDFParserBuilder.java +++ b/api/src/main/java/org/apache/commons/rdf/api/RDFParserBuilder.java @@ -109,11 +109,11 @@ public interface RDFParserBuilder { * or text/turtle;charset="UTF-8" as specified by * * RFC7231. + * @return An {@link RDFParserBuilder} that will use the specified content + * type. * @throws IllegalArgumentException * If the contentType has an invalid syntax, or this * RDFParserBuilder does not support the specified contentType. - * @return An {@link RDFParserBuilder} that will use the specified content - * type. */ RDFParserBuilder contentType(String contentType); @@ -171,8 +171,10 @@ public interface RDFParserBuilder { * @param base * An absolute IRI to use as a base. * @return An {@link RDFParserBuilder} that will use the specified base IRI. + * @throws IllegalArgumentException + * If the base is not a valid absolute IRI string */ - RDFParserBuilder base(String base); + RDFParserBuilder base(String base) throws IllegalArgumentException; /** * Specify a source {@link InputStream} to parse. @@ -294,8 +296,11 @@ public interface RDFParserBuilder { * @param iri * An IRI to retrieve and parse * @return An {@link RDFParserBuilder} that will use the specified source. + * @throws IllegalArgumentException + * If the base is not a valid absolute IRI string + * */ - RDFParserBuilder source(String iri); + RDFParserBuilder source(String iri) throws IllegalArgumentException; /** * Parse the specified source. @@ -319,12 +324,23 @@ public interface RDFParserBuilder { *

* If {@link #intoGraph(Graph)} has been specified, this SHOULD be the same * {@link Graph} instance returned from {@link Future#get() once parsing has - * completed. + * completed successfully. + *

+ * If an exception occurs during parsing, (e.g. {@link IOException} or + * {@link java.text.ParseException}, it should be indicated as the + * {@link java.util.concurrent.ExecutionException#getCause()) in the + * {@link java.util.concurrent.ExecutionException) thrown on + * {@link Future#get()}. * - * @return A Future that will return the populated graph when the parsing - * has finished. + * @return A Future that will return the populated {@link Graph} when the + * parsing has finished. * @throws IOException - * If an error occurred while reading the source. + * If an error occurred while starting to read the source (e.g. + * file not found, unsupported IRI protocol). Note that IO + * errors during parsing would instead be the + * {@link java.util.concurrent.ExecutionException#getCause()) of + * the {@link java.util.concurrent.ExecutionException) thrown on + * {@link Future#get()}. * @throws IllegalStateException * If the builder is in an invalid state, e.g. a * source has not been set.