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 2FA90200BC1 for ; Wed, 16 Nov 2016 11:55:46 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2E376160B13; Wed, 16 Nov 2016 10:55:46 +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 F1B40160B08 for ; Wed, 16 Nov 2016 11:55:43 +0100 (CET) Received: (qmail 14802 invoked by uid 500); 16 Nov 2016 10:55:43 -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 14766 invoked by uid 99); 16 Nov 2016 10:55:43 -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; Wed, 16 Nov 2016 10:55:43 +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 7CD86185F05 for ; Wed, 16 Nov 2016 10:55:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-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 SimkmaiMzU-L for ; Wed, 16 Nov 2016 10:55:27 +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 8DA405FC4A for ; Wed, 16 Nov 2016 10:55:23 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id BB844E8EA2 for ; Wed, 16 Nov 2016 10:55:20 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id B61F13A330E for ; Wed, 16 Nov 2016 10:55:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1001191 [13/29] - in /websites/production/commonsrdf/content: ./ apidocs/ apidocs/org/apache/commons/rdf/api/ apidocs/org/apache/commons/rdf/api/class-use/ apidocs/org/apache/commons/rdf/experimental/ apidocs/org/apache/commons/rdf/experim... Date: Wed, 16 Nov 2016 10:55:19 -0000 To: commits@commonsrdf.incubator.apache.org From: stain@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20161116105520.B61F13A330E@svn01-us-west.apache.org> archived-at: Wed, 16 Nov 2016 10:55:46 -0000 Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/Quad.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/Quad.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/Quad.html Wed Nov 16 10:55:17 2016 @@ -0,0 +1 @@ +Quad

Quad

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 5100%0 of 0n/a010101
asTriple()5100%n/a010101
\ No newline at end of file Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/Quad.java.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/Quad.java.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/Quad.java.html Wed Nov 16 10:55:17 2016 @@ -0,0 +1,237 @@ +Quad.java

Quad.java

/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.rdf.api;
+
+import java.util.Objects;
+import java.util.Optional;
+
+/**
+ * A Quad is a statement in a
+ * <a href= "http://www.w3.org/TR/rdf11-concepts/#section-dataset" >RDF-1.1
+ * Dataset</a>, as defined by <a href=
+ * "https://www.w3.org/TR/2014/NOTE-rdf11-datasets-20140225/#quad-semantics"
+ * >RDF-1.1 Concepts and Abstract Syntax</a>, a W3C Working Group Note published
+ * on 25 February 2014.
+ * <p>
+ * A <code>Quad</code> object in Commons RDF is considered
+ * <strong>immutable</strong>, that is, over its life time it will have
+ * consistent behaviour for its {@link #equals(Object)}, and the instances
+ * returned from {@link #getGraphName()}, {@link #getSubject()},
+ * {@link #getPredicate()}, {@link #getObject()} and {@link #asTriple()} will
+ * have consistent {@link Object#equals(Object)} behaviour.
+ * <p>
+ * Note that <code>Quad</code> methods are not required to return object
+ * identical (<code>==</code>) instances as long as they are equivalent
+ * according to {@link Object#equals(Object)}. Specialisations of
+ * <code>Quad</code> may provide additional methods that are documented to be
+ * mutable.
+ * <p>
+ * <code>Quad</code> methods are <strong>thread-safe</strong>, however
+ * specialisations may provide additional methods that are documented to not be
+ * thread-safe.
+ * <p>
+ * <code>Quad</code>s can be safely used in hashing collections like
+ * {@link java.util.HashSet} and {@link java.util.HashMap}.
+ * <p>
+ * Any <code>Quad</code> can be used interchangeably across Commons RDF
+ * implementations.
+ *
+ * @since 0.3.0-incubating
+ * @see Dataset
+ * @see RDF#createQuad(BlankNodeOrIRI,BlankNodeOrIRI,IRI,RDFTerm)
+ * @see <a href="http://www.w3.org/TR/2014/NOTE-rdf11-datasets-20140225/">RDF
+ *      1.1: On Semantics of RDF Datasets</a>
+ * @see <a href="http://www.w3.org/TR/rdf11-concepts/#section-dataset"> </a>
+ */
+public interface Quad extends QuadLike<BlankNodeOrIRI> {
+
+    /**
+     * The graph name (graph label) of this quad, if present.
+     *
+     * If {@link Optional#isPresent()}, then the {@link Optional#get()} is
+     * either a {@link BlankNode} or an {@link IRI}, indicating the
+     * <a href="https://www.w3.org/TR/rdf11-concepts/#dfn-named-graph">graph
+     * name</a> of this Quad. If the graph name is not present, e.g. the value
+     * is {@link Optional#empty()}, it indicates that this Quad is in the
+     * <a href="https://www.w3.org/TR/rdf11-concepts/#dfn-default-graph">default
+     * graph</a>.
+     *
+     * @return If {@link Optional#isPresent()}, the graph name
+     *         {@link BlankNodeOrIRI} of this quad, otherwise
+     *         {@link Optional#empty()}, indicating the default graph.
+     *
+     * @see <a href="https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-dataset">RDF-
+     *      1.1 Dataset</a>
+     */
+    Optional<BlankNodeOrIRI> getGraphName();
+
+    /**
+     * The subject of this quad, which may be either a {@link BlankNode} or an
+     * {@link IRI}, which are represented in Commons RDF by the interface
+     * {@link BlankNodeOrIRI}.
+     *
+     * @return The subject {@link BlankNodeOrIRI} of this quad.
+     * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-subject">RDF-1.1
+     *      Triple subject</a>
+     */
+    BlankNodeOrIRI getSubject();
+
+    /**
+     * The predicate {@link IRI} of this quad.
+     *
+     * @return The predicate {@link IRI} of this quad.
+     * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-predicate">RDF-1.1
+     *      Triple predicate</a>
+     */
+    IRI getPredicate();
+
+    /**
+     * The object of this quad, which may be either a {@link BlankNode}, an
+     * {@link IRI}, or a {@link Literal}, which are represented in Commons RDF
+     * by the interface {@link RDFTerm}.
+     *
+     * @return The object {@link RDFTerm} of this quad.
+     * @see <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-object">RDF-1.1
+     *      Triple object</a>
+     */
+    RDFTerm getObject();
+
+    /**
+     * Adapt this Quad to a Triple.
+     * <p>
+     * The returned {@link Triple} will have equivalent values returned from the
+     * methods {@link TripleLike#getSubject()},
+     * {@link TripleLike#getPredicate()} and {@link TripleLike#getObject()}.
+     * <p>
+     * The returned {@link Triple} MUST NOT be {@link #equals(Object)} to this
+     * {@link Quad}, even if this quad has a default graph
+     * {@link #getGraphName()} value of {@link Optional#empty()}, but MUST
+     * follow the {@link Triple#equals(Object)} semantics. This means that the
+     * following MUST be true:
+     *
+     * <pre>
+     * Quad q1, q2;
+     * if (q1.equals(q2)) {
+     *     assert (q1.asTriple().equals(q2.asTriple()));
+     * } else if (q1.asTriple().equals(q2.asTriple())) {
+     *     assert (q1.getSubject().equals(q2.getSubject()));
+     *     assert (q1.getPredicate().equals(q2.getPredicate()));
+     *     assert (q1.getObject().equals(q2.getObject()));
+     *     assert (!q1.getGraphName().equals(q2.getGraphName()));
+     * }
+     * </pre>
+     *
+     * The <code>default</code> implementation of this method return a proxy
+     * {@link Triple} instance that keeps a reference to this {@link Quad} to
+     * call the underlying {@link TripleLike} methods, but supplies a
+     * {@link Triple} compatible implementation of {@link Triple#equals(Object)}
+     * and {@link Triple#hashCode()}. Implementations may override this method,
+     * e.g. for a more efficient solution.
+     *
+     * @return A {@link Triple} that contains the same {@link TripleLike}
+     *         properties as this Quad.
+     */
+    default Triple asTriple() {
+        return new Triple() {
+            @Override
+            public BlankNodeOrIRI getSubject() {
+                return Quad.this.getSubject();
+            }
+
+            @Override
+            public IRI getPredicate() {
+                return Quad.this.getPredicate();
+            }
+
+            @Override
+            public RDFTerm getObject() {
+                return Quad.this.getObject();
+            }
+
+            @Override
+            public boolean equals(Object obj) {
+                if (obj == this) {
+                    return true;
+                }
+                if (!(obj instanceof Triple)) {
+                    return false;
+                }
+                Triple other = (Triple) obj;
+                return Objects.equals(getSubject(), other.getSubject())
+                        && Objects.equals(getPredicate(), other.getPredicate())
+                        && Objects.equals(getObject(), other.getObject());
+            }
+
+            @Override
+            public int hashCode() {
+                return Objects.hash(getSubject(), getPredicate(), getObject());
+            }
+        };
+    }
+
+    /**
+     * Check it this Quad is equal to another Quad.
+     * <p>
+     * Two Quads are equal if and only if their {@link #getGraphName()},
+     * {@link #getSubject()}, {@link #getPredicate()} and {@link #getObject()}
+     * are equal.
+     * </p>
+     * <p>
+     * Implementations MUST also override {@link #hashCode()} so that two equal
+     * Quads produce the same hash code.
+     * </p>
+     * <p>
+     * Note that a {@link Quad} MUST NOT be equal to a {@link Triple}, even if
+     * this Quad's {@link #getGraphName()} is {@link Optional#empty()}. To test
+     * triple-like equivalence, callers can use:
+     * </p>
+     *
+     * <pre>
+     * Quad q1;
+     * Triple t2;
+     * q1.asTriple().equals(t2));
+     * </pre>
+     *
+     * @param other
+     *            Another object
+     * @return true if other is a Quad and is equal to this
+     * @see Object#equals(Object)
+     */
+    @Override
+    public boolean equals(Object other);
+
+    /**
+     * Calculate a hash code for this Quad.
+     * <p>
+     * The returned hash code MUST be equal to the result of
+     * {@link Objects#hash(Object...)} with the arguments {@link #getSubject()},
+     * {@link #getPredicate()}, {@link #getObject()}, {@link #getGraphName()}.
+     * <p>
+     * This method MUST be implemented in conjunction with
+     * {@link #equals(Object)} so that two equal {@link Quad}s produce the same
+     * hash code.
+     *
+     * @return a hash code value for this Quad.
+     * @see Object#hashCode()
+     * @see Objects#hash(Object...)
+     */
+    @Override
+    public int hashCode();
+
+}
+
\ No newline at end of file Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/RDFSyntax.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/RDFSyntax.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/RDFSyntax.html Wed Nov 16 10:55:17 2016 @@ -0,0 +1 @@ +RDFSyntax

RDFSyntax

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 182100%0 of 0n/a09020< /td>09
static {...}116100%n/a010901
RDFSyntax(String, int, String, String, String, boolean)17100%n/a010601
byMediaType(String)16100%n/a010201
byFileExtension(String)11100%n/a010201
valueOf(String)5100%n/a010101
lambda$byFileExtension$1(String, RDFSyntax)5100%n/a010 101
lambda$byMediaType$0(String, RDFSyntax)5100%n/a010101
values()4100%n/a010101
toString()3100%n/a010101
\ No newline at end of file Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/RDFSyntax.java.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/RDFSyntax.java.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/RDFSyntax.java.html Wed Nov 16 10:55:17 2016 @@ -0,0 +1,195 @@ +RDFSyntax.java

RDFSyntax. java

/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.rdf.api;
+
+import java.util.Arrays;
+import java.util.Locale;
+import java.util.Optional;
+
+/**
+ * Enumeration of the RDF 1.1 serialization syntaxes.
+ * <p>
+ * This enumeration lists the W3C standardized RDF 1.1 syntaxes like
+ * {@link #TURTLE} and {@link #JSONLD}. Note the existence of other RDF syntaxes
+ * that are not included here, e.g.
+ * <a href="http://www.w3.org/TeamSubmission/n3/">N3</a> and
+ * <a href="https://en.wikipedia.org/wiki/TriX_%28syntax%29">TriX</a>.
+ * 
+ * @see <a href="https://www.w3.org/TR/rdf11-primer/#section-graph-syntax">RDF
+ *      1.1 Primer</a>
+ * @see org.apache.commons.rdf.experimental.RDFParser
+ */
+public enum RDFSyntax {
+
+    /**
+     * JSON-LD 1.0
+     * 
+     * @see <a href=
+     *      "https://www.w3.org/TR/json-ld/">https://www.w3.org/TR/json-ld/</a>
+     * 
+     */
+    JSONLD("JSON-LD 1.0", "application/ld+json", ".jsonld", true),
+
+    /**
+     * RDF 1.1 Turtle
+     * 
+     * @see <a href=
+     *      "https://www.w3.org/TR/turtle/">https://www.w3.org/TR/turtle/</a>
+     *
+     */
+    TURTLE("RDF 1.1 Turtle", "text/turtle", ".ttl", false),
+
+    /**
+     * RDF 1.1 N-Quads
+     * 
+     * @see <a href=
+     *      "https://www.w3.org/TR/n-quads/">https://www.w3.org/TR/n-quads/</a>
+     */
+    NQUADS("RDF 1.1 N-Quads", "application/n-quads", ".nq", true),
+
+    /**
+     * RDF 1.1 N-Triples
+     * 
+     * @see <a href=
+     *      "https://www.w3.org/TR/n-triples/">https://www.w3.org/TR/n-triples/</a>
+     */
+    NTRIPLES("RDF 1.1 N-Triples", "application/n-triples", ".nt", false),
+
+    /**
+     * HTML+RDFa 1.1
+     * 
+     * @see <a href=
+     *      "https://www.w3.org/TR/html-rdfa/">https://www.w3.org/TR/html-rdfa/</a>
+     */
+    RDFA_HTML("HTML+RDFa 1.1", "text/html", ".html", false),
+
+    /**
+     * XHTML+RDFa 1.1
+     * 
+     * @see <a href=
+     *      "https://www.w3.org/TR/xhtml-rdfa/">https://www.w3.org/TR/xhtml-rdfa/</a>
+     */
+    RDFA_XHTML("XHTML+RDFa 1.1", "application/xhtml+xml", ".xhtml", false),
+
+    /**
+     * RDF 1.1 XML Syntax
+     * 
+     * @see <a href=
+     *      "https://www.w3.org/TR/rdf-syntax-grammar/">https://www.w3.org/TR/rdf-syntax-grammar/</a>
+     */
+    RDFXML("RDF 1.1 XML Syntax", "application/rdf+xml", ".rdf", false),
+
+    /**
+     * RDF 1.1 TriG
+     * 
+     * @see <a href=
+     *      "https://www.w3.org/TR/trig/">https://www.w3.org/TR/trig/</a>
+     */
+    TRIG("RDF 1.1 TriG", "application/trig", ".trig", true);
+
+    /**
+     * The <a href="https://tools.ietf.org/html/rfc2046">IANA media type</a> for
+     * the RDF syntax.
+     * <p>
+     * The media type can be used as part of <code>Content-Type</code> and
+     * <code>Accept</code> for <em>content negotiation</em> in the
+     * <a href="https://tools.ietf.org/html/rfc7231#section-3.1.1.1">HTTP
+     * protocol</a>.
+     */
+    public final String mediaType;
+
+    /**
+     * The <a href="https://tools.ietf.org/html/rfc2046">IANA-registered</a>
+     * file extension.
+     * <p>
+     * The file extension includes the leading period, e.g. <code>.jsonld</code>
+     */
+    public final String fileExtension;
+
+    /**
+     * Indicate if this RDF syntax supports
+     * <a href="https://www.w3.org/TR/rdf11-concepts/#section-dataset">RDF
+     * Datasets</a>.
+     */
+    public final boolean supportsDataset;
+
+    private final String name;
+
+    /**
+     * A human-readable name for the RDF syntax.
+     * <p>
+     * The name is equivalent to the the title of the corresponding W3C
+     * Specification.
+     */
+    @Override
+    public String toString() {
+        return name;
+    }
+
+    private RDFSyntax(String name, String mediaType, String fileExtension, boolean supportsDataset) {
+        this.name = name;
+        this.mediaType = mediaType;
+        this.fileExtension = fileExtension;
+        this.supportsDataset = supportsDataset;
+    }
+
+    /**
+     * Return the RDFSyntax with the specified media type.
+     * <p>
+     * The <code>mediaType</code> is compared in lower case, therefore it might
+     * not be equal to the {@link RDFSyntax#mediaType} of the returned
+     * RDFSyntax.
+     * <p>
+     * For convenience matching of media types used in a
+     * <code>Content-Type</code> header, if the <code>mediaType</code> contains
+     * the characters <code>;</code>, <code>,</code> or white space, only the
+     * part of the string to the left of those characters are considered.
+     * 
+     * @param mediaType
+     *            The media type to match
+     * @return If {@link Optional#isPresent()}, the {@link RDFSyntax} which has
+     *         a matching {@link RDFSyntax#mediaType}, otherwise
+     *         {@link Optional#empty()} indicating that no matching syntax was
+     *         found.
+     */
+    public static Optional<RDFSyntax> byMediaType(String mediaType) {
+        final String type = mediaType.toLowerCase(Locale.ENGLISH).split("\\s*[;,]", 2)[0];
+        return Arrays.stream(RDFSyntax.values()).filter(t -> t.mediaType.equals(type)).findAny();
+    }
+
+    /**
+     * Return the RDFSyntax with the specified file extension.
+     * <p>
+     * The <code>fileExtension</code> is compared in lower case, therefore it
+     * might not be equal to the {@link RDFSyntax#fileExtension} of the returned
+     * RDFSyntax.
+     * 
+     * @param fileExtension
+     *            The fileExtension to match, starting with <code>.</code>
+     * @return If {@link Optional#isPresent()}, the {@link RDFSyntax} which has
+     *         a matching {@link RDFSyntax#fileExtension}, otherwise
+     *         {@link Optional#empty()} indicating that no matching file
+     *         extension was found.
+     */
+    public static Optional<RDFSyntax> byFileExtension(String fileExtension) {
+        final String ext = fileExtension.toLowerCase(Locale.ENGLISH);
+        return Arrays.stream(RDFSyntax.values()).filter(t -> t.fileExtension.equals(ext)).findAny();
+    }
+
+}
+
\ No newline at end of file Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/RDFTermFactory.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/RDFTermFactory.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/RDFTermFactory.html Wed Nov 16 10:55:17 2016 @@ -0,0 +1 @@ +RDFTermFactory

RDFTermFactory

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 40100%0 of 0n/a080808
createBlankNode()5100%n/a010101
createBlankNode(String)5100%n/a010101
createGraph()5100%n/a010101
createIRI(String)5100%n/a010101
createLiteral(String)5100%n/a010101
createLiteral(String, IRI)5100%n/a010101
createLiteral(String, String)5100%n/a010101
createTriple(BlankNodeOrIRI, IRI, RDFTerm)5100%n/a010101
\ No newline at end of file Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/RDFTermFactory.java.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/RDFTermFactory.java.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/RDFTermFactory.java.html Wed Nov 16 10:55:17 2016 @@ -0,0 +1,67 @@ +RDFTermFactory.java

RDFTermFactory.java

/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.rdf.api;
+
+/**
+ * Factory for creating RDFTerm instances..
+ * <p>
+ * This interface is <strong>deprecated</strong> in favour of the richer
+ * {@link RDF}.
+ * 
+ * @see RDF
+ */
+@Deprecated
+public interface RDFTermFactory {
+
+    default BlankNode createBlankNode() throws UnsupportedOperationException {
+        throw new UnsupportedOperationException("createBlankNode() not supported");
+    }
+
+    default BlankNode createBlankNode(String name) throws UnsupportedOperationException {
+        throw new UnsupportedOperationException("createBlankNode(String) not supported");
+    }
+
+    default Graph createGraph() throws UnsupportedOperationException {
+        throw new UnsupportedOperationException("createGraph() not supported");
+    }
+
+    default IRI createIRI(String iri) throws IllegalArgumentException, UnsupportedOperationException {
+        throw new UnsupportedOperationException("createIRI(String) not supported");
+    }
+
+    default Literal createLiteral(String lexicalForm) throws IllegalArgumentException, UnsupportedOperationException {
+        throw new UnsupportedOperationException("createLiteral(String) not supported");
+    }
+
+    default Literal createLiteral(String lexicalForm, IRI dataType)
+            throws IllegalArgumentException, UnsupportedOperationException {
+        throw new UnsupportedOperationException("createLiteral(String) not supported");
+    }
+
+    default Literal createLiteral(String lexicalForm, String languageTag)
+            throws IllegalArgumentException, UnsupportedOperationException {
+        throw new UnsupportedOperationException("createLiteral(String,String) not supported");
+    }
+
+    default Triple createTriple(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
+            throws IllegalArgumentException, UnsupportedOperationException {
+        throw new UnsupportedOperationException("createTriple(BlankNodeOrIRI,IRI,RDFTerm) not supported");
+    }
+
+}
+
\ No newline at end of file Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/index.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/index.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/index.html Wed Nov 16 10:55:17 2016 @@ -0,0 +1 @@ +org.apache.commons.rdf.api

org.apache.commons.rdf.api

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total1 of 345100%3 of 1070%33704903206
Quad.new Triple() {...}7199%3770%3110130601
RDFSyntax182100%n/a090200901
RDFTermFactory40100%n/a08080801
Graph27100%n/a05050501
Dataset19100%n/a03030301
Quad5100%n/a01010101
\ No newline at end of file Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/index.source.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/index.source.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.api/index.source.html Wed Nov 16 10:55:17 2016 @@ -0,0 +1 @@ +org.apache.commons.rdf.api

org.apache.commons.rdf.api

< thead>< /tr>
ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total1 of 345100%3 of 1070%33704903206
Quad.java7699%3770%3120130702
RDFSyntax.java182100%n/a090200901
RDFTermFactory.java40100%n/a08080801
Graph.java27100%n/a05050501
Dataset.java19100%n/a03030301
\ No newline at end of file Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.experimental/RDFParser.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.experimental/RDFParser.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.experimental/RDFParser.html Wed Nov 16 10:55:17 2016 @@ -0,0 +1 @@ +RDFParser

RDFParser

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total22 of 220%2 of 20%445533
lambda$target$0(Graph, Quad)90%20%223311
target(Dataset)80%n/a111111
target(Graph)50%n/a111111
\ No newline at end of file Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.experimental/RDFParser.java.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.experimental/RDFParser.java.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.experimental/RDFParser.java.html Wed Nov 16 10:55:17 2016 @@ -0,0 +1,486 @@ +RDFParser.java

R DFParser.java

/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.rdf.experimental;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Path;
+import java.util.Optional;
+import java.util.concurrent.Future;
+import java.util.function.Consumer;
+
+import org.apache.commons.rdf.api.BlankNode;
+import org.apache.commons.rdf.api.Dataset;
+import org.apache.commons.rdf.api.Graph;
+import org.apache.commons.rdf.api.IRI;
+import org.apache.commons.rdf.api.Quad;
+import org.apache.commons.rdf.api.RDFSyntax;
+import org.apache.commons.rdf.api.RDFTerm;
+import org.apache.commons.rdf.api.RDF;
+import org.apache.commons.rdf.api.Triple;
+
+/**
+ * Parse an RDF source into a target (e.g. a Graph/Dataset).
+ * <h2>Experimental</h2> This interface (and its implementations) should be
+ * considered <strong>at risk</strong>; they might change or be removed in the
+ * next minor update of Commons RDF. It may move to the the
+ * {@link org.apache.commons.rdf.api} package when it has stabilized.
+ * <h2>Description</h2>
+ * <p>
+ * This interface follows the
+ * <a href="https://en.wikipedia.org/wiki/Builder_pattern">Builder pattern</a>,
+ * allowing to set parser settings like {@link #contentType(RDFSyntax)} and
+ * {@link #base(IRI)}. A caller MUST call one of the <code>source</code> methods
+ * (e.g. {@link #source(IRI)}, {@link #source(Path)},
+ * {@link #source(InputStream)}), and MUST call one of the <code>target</code>
+ * methods (e.g. {@link #target(Consumer)}, {@link #target(Dataset)},
+ * {@link #target(Graph)}) before calling {@link #parse()} on the returned
+ * RDFParser - however methods can be called in any order.
+ * <p>
+ * The call to {@link #parse()} returns a {@link Future}, allowing asynchronous
+ * parse operations. Callers are recommended to check {@link Future#get()} to
+ * ensure parsing completed successfully, or catch exceptions thrown during
+ * parsing.
+ * <p>
+ * Setting a method that has already been set will override any existing value
+ * in the returned builder - regardless of the parameter type (e.g.
+ * {@link #source(IRI)} will override a previous {@link #source(Path)}. Settings
+ * can be unset by passing <code>null</code> - note that this may require
+ * casting, e.g. <code>contentType( (RDFSyntax) null )</code> to undo a previous
+ * call to {@link #contentType(RDFSyntax)}.
+ * <p>
+ * It is undefined if a RDFParser is mutable or thread-safe, so callers should
+ * always use the returned modified RDFParser from the builder methods. The
+ * builder may return itself after modification, or a cloned builder with the
+ * modified settings applied. Implementations are however encouraged to be
+ * immutable, thread-safe and document this. As an example starting point, see
+ * <code>org.apache.commons.rdf.simple.AbstractRDFParser</code>.
+ * <p>
+ * Example usage:
+ * </p>
+ * 
+ * <pre>
+ * Graph g1 = rDFTermFactory.createGraph();
+ * new ExampleRDFParserBuilder().source(Paths.get("/tmp/graph.ttl")).contentType(RDFSyntax.TURTLE).target(g1).parse()
+ *         .get(30, TimeUnit.Seconds);
+ * </pre>
+ *
+ */
+public interface RDFParser {
+
+    /**
+     * The result of {@link RDFParser#parse()} indicating parsing completed.
+     * <p>
+     * This is a marker interface that may be subclassed to include parser
+     * details, e.g. warning messages or triple counts.
+     */
+    public interface ParseResult {
+    }
+
+    /**
+     * Specify which {@link RDF} to use for generating {@link RDFTerm}s.
+     * <p>
+     * This option may be used together with {@link #target(Graph)} to override
+     * the implementation's default factory and graph.
+     * <p>
+     * <strong>Warning:</strong> Using the same {@link RDF} for multiple
+     * {@link #parse()} calls may accidentally merge {@link BlankNode}s having
+     * the same label, as the parser may use the
+     * {@link RDF#createBlankNode(String)} method from the parsed blank node
+     * labels.
+     * 
+     * @see #target(Graph)
+     * @param rdfTermFactory
+     *            {@link RDF} to use for generating RDFTerms.
+     * @return An {@link RDFParser} that will use the specified rdfTermFactory
+     */
+    RDFParser rdfTermFactory(RDF rdfTermFactory);
+
+    /**
+     * Specify the content type of the RDF syntax to parse.
+     * <p>
+     * This option can be used to select the RDFSyntax of the source, overriding
+     * any <code>Content-Type</code> headers or equivalent.
+     * <p>
+     * The character set of the RDFSyntax is assumed to be
+     * {@link StandardCharsets#UTF_8} unless overridden within the document
+     * (e.g. {@code <?xml version="1.0" encoding="iso-8859-1"?>} in
+     * {@link RDFSyntax#RDFXML}).
+     * <p>
+     * This method will override any contentType set with
+     * {@link #contentType(String)}.
+     * 
+     * @see #contentType(String)
+     * @param rdfSyntax
+     *            An {@link RDFSyntax} to parse the source according to, e.g.
+     *            {@link RDFSyntax#TURTLE}.
+     * @throws IllegalArgumentException
+     *             If this RDFParser does not support the specified RDFSyntax.
+     * @return An {@link RDFParser} that will use the specified content type.
+     */
+    RDFParser contentType(RDFSyntax rdfSyntax) throws IllegalArgumentException;
+
+    /**
+     * Specify the content type of the RDF syntax to parse.
+     * <p>
+     * This option can be used to select the RDFSyntax of the source, overriding
+     * any <code>Content-Type</code> headers or equivalent.
+     * <p>
+     * The content type MAY include a <code>charset</code> parameter if the RDF
+     * media types permit it; the default charset is
+     * {@link StandardCharsets#UTF_8} unless overridden within the document.
+     * <p>
+     * This method will override any contentType set with
+     * {@link #contentType(RDFSyntax)}.
+     * 
+     * @see #contentType(RDFSyntax)
+     * @param contentType
+     *            A content-type string, e.g. <code>application/ld+json</code>
+     *            or <code>text/turtle;charset="UTF-8"</code> as specified by
+     *            <a href="https://tools.ietf.org/html/rfc7231#section-3.1.1.1">
+     *            RFC7231</a>.
+     * @return An {@link RDFParser} that will use the specified content type.
+     * @throws IllegalArgumentException
+     *             If the contentType has an invalid syntax, or this RDFParser
+     *             does not support the specified contentType.
+     */
+    RDFParser contentType(String contentType) throws IllegalArgumentException;
+
+    /**
+     * Specify a {@link Graph} to add parsed triples to.
+     * <p>
+     * If the source supports datasets (e.g. the {@link #contentType(RDFSyntax)}
+     * set has {@link RDFSyntax#supportsDataset} is true)), then only quads in
+     * the <em>default graph</em> will be added to the Graph as {@link Triple}s.
+     * <p>
+     * It is undefined if any triples are added to the specified {@link Graph}
+     * if {@link #parse()} throws any exceptions. (However implementations are
+     * free to prevent this using transaction mechanisms or similar). If
+     * {@link Future#get()} does not indicate an exception, the parser
+     * implementation SHOULD have inserted all parsed triples to the specified
+     * graph.
+     * <p>
+     * Calling this method will override any earlier targets set with
+     * {@link #target(Graph)}, {@link #target(Consumer)} or
+     * {@link #target(Dataset)}.
+     * <p>
+     * The default implementation of this method calls {@link #target(Consumer)}
+     * with a {@link Consumer} that does {@link Graph#add(Triple)} with
+     * {@link Quad#asTriple()} if the quad is in the default graph.
+     * 
+     * @param graph
+     *            The {@link Graph} to add triples to.
+     * @return An {@link RDFParser} that will insert triples into the specified
+     *         graph.
+     */
+    default RDFParser target(Graph graph) {
+        return target(q -> {
+            if (!q.getGraphName().isPresent()) {
+                graph.add(q.asTriple());
+            }
+        });
+    }
+
+    /**
+     * Specify a {@link Dataset} to add parsed quads to.
+     * <p>
+     * It is undefined if any quads are added to the specified {@link Dataset}
+     * if {@link #parse()} throws any exceptions. (However implementations are
+     * free to prevent this using transaction mechanisms or similar). On the
+     * other hand, if {@link #parse()} does not indicate an exception, the
+     * implementation SHOULD have inserted all parsed quads to the specified
+     * dataset.
+     * <p>
+     * Calling this method will override any earlier targets set with
+     * {@link #target(Graph)}, {@link #target(Consumer)} or
+     * {@link #target(Dataset)}.
+     * <p>
+     * The default implementation of this method calls {@link #target(Consumer)}
+     * with a {@link Consumer} that does {@link Dataset#add(Quad)}.
+     * 
+     * @param dataset
+     *            The {@link Dataset} to add quads to.
+     * @return An {@link RDFParser} that will insert triples into the specified
+     *         dataset.
+     */
+    default RDFParser target(Dataset dataset) {
+        return target(dataset::add);
+    }
+
+    /**
+     * Specify a consumer for parsed quads.
+     * <p>
+     * The quads will include triples in all named graphs of the parsed source,
+     * including any triples in the default graph. When parsing a source format
+     * which do not support datasets, all quads delivered to the consumer will
+     * be in the default graph (e.g. their {@link Quad#getGraphName()} will be
+     * as {@link Optional#empty()}), while for a source
+     * <p>
+     * It is undefined if any quads are consumed if {@link #parse()} throws any
+     * exceptions. On the other hand, if {@link #parse()} does not indicate an
+     * exception, the implementation SHOULD have produced all parsed quads to
+     * the specified consumer.
+     * <p>
+     * Calling this method will override any earlier targets set with
+     * {@link #target(Graph)}, {@link #target(Consumer)} or
+     * {@link #target(Dataset)}.
+     * <p>
+     * The consumer is not assumed to be thread safe - only one
+     * {@link Consumer#accept(Object)} is delivered at a time for a given
+     * {@link RDFParser#parse()} call.
+     * <p>
+     * This method is typically called with a functional consumer, for example:
+     * 
+     * <pre>
+     * {@code
+     * List<Quad> quads = new ArrayList<Quad>;
+     * parserBuilder.target(quads::add).parse();
+     * }
+     * </pre>
+     * 
+     * @param consumer
+     *            A {@link Consumer} of {@link Quad}s
+     * @return An {@link RDFParser} that will call the consumer for into the
+     *         specified dataset.
+     */
+    RDFParser target(Consumer<Quad> consumer);
+
+    /**
+     * Specify a base IRI to use for parsing any relative IRI references.
+     * <p>
+     * Setting this option will override any protocol-specific base IRI (e.g.
+     * <code>Content-Location</code> header) or the {@link #source(IRI)} IRI,
+     * but does not override any base IRIs set within the source document (e.g.
+     * <code>@base</code> in Turtle documents).
+     * <p>
+     * If the source is in a syntax that does not support relative IRI
+     * references (e.g. {@link RDFSyntax#NTRIPLES}), setting the
+     * <code>base</code> has no effect.
+     * <p>
+     * This method will override any base IRI set with {@link #base(String)}.
+     *
+     * @see #base(String)
+     * @param base
+     *            An absolute IRI to use as a base.
+     * @return An {@link RDFParser} that will use the specified base IRI.
+     */
+    RDFParser base(IRI base);
+
+    /**
+     * Specify a base IRI to use for parsing any relative IRI references.
+     * <p>
+     * Setting this option will override any protocol-specific base IRI (e.g.
+     * <code>Content-Location</code> header) or the {@link #source(IRI)} IRI,
+     * but does not override any base IRIs set within the source document (e.g.
+     * <code>@base</code> in Turtle documents).
+     * <p>
+     * If the source is in a syntax that does not support relative IRI
+     * references (e.g. {@link RDFSyntax#NTRIPLES}), setting the
+     * <code>base</code> has no effect.
+     * <p>
+     * This method will override any base IRI set with {@link #base(IRI)}.
+     *
+     * @see #base(IRI)
+     * @param base
+     *            An absolute IRI to use as a base.
+     * @return An {@link RDFParser} that will use the specified base IRI.
+     * @throws IllegalArgumentException
+     *             If the base is not a valid absolute IRI string
+     */
+    RDFParser base(String base) throws IllegalArgumentException;
+
+    /**
+     * Specify a source {@link InputStream} to parse.
+     * <p>
+     * The source set will not be read before the call to {@link #parse()}.
+     * <p>
+     * The InputStream will not be closed after parsing. The InputStream does
+     * not need to support {@link InputStream#markSupported()}.
+     * <p>
+     * The parser might not consume the complete stream (e.g. an RDF/XML parser
+     * may not read beyond the closing tag of
+     * <code>&lt;/rdf:Description&gt;</code>).
+     * <p>
+     * The {@link #contentType(RDFSyntax)} or {@link #contentType(String)}
+     * SHOULD be set before calling {@link #parse()}.
+     * <p>
+     * The character set is assumed to be {@link StandardCharsets#UTF_8} unless
+     * the {@link #contentType(String)} specifies otherwise or the document
+     * declares its own charset (e.g. RDF/XML with a
+     * <code>&lt;?xml encoding="iso-8859-1"&gt;</code> header).
+     * <p>
+     * The {@link #base(IRI)} or {@link #base(String)} MUST be set before
+     * calling {@link #parse()}, unless the RDF syntax does not permit relative
+     * IRIs (e.g. {@link RDFSyntax#NTRIPLES}).
+     * <p>
+     * This method will override any source set with {@link #source(IRI)},
+     * {@link #source(Path)} or {@link #source(String)}.
+     * 
+     * @param inputStream
+     *            An InputStream to consume
+     * @return An {@link RDFParser} that will use the specified source.
+     */
+    RDFParser source(InputStream inputStream);
+
+    /**
+     * Specify a source file {@link Path} to parse.
+     * <p>
+     * The source set will not be read before the call to {@link #parse()}.
+     * <p>
+     * The {@link #contentType(RDFSyntax)} or {@link #contentType(String)}
+     * SHOULD be set before calling {@link #parse()}.
+     * <p>
+     * The character set is assumed to be {@link StandardCharsets#UTF_8} unless
+     * the {@link #contentType(String)} specifies otherwise or the document
+     * declares its own charset (e.g. RDF/XML with a
+     * <code>&lt;?xml encoding="iso-8859-1"&gt;</code> header).
+     * <p>
+     * The {@link #base(IRI)} or {@link #base(String)} MAY be set before calling
+     * {@link #parse()}, otherwise {@link Path#toUri()} will be used as the base
+     * IRI.
+     * <p>
+     * This method will override any source set with {@link #source(IRI)},
+     * {@link #source(InputStream)} or {@link #source(String)}.
+     * 
+     * @param file
+     *            A Path for a file to parse
+     * @return An {@link RDFParser} that will use the specified source.
+     */
+    RDFParser source(Path file);
+
+    /**
+     * Specify an absolute source {@link IRI} to retrieve and parse.
+     * <p>
+     * The source set will not be read before the call to {@link #parse()}.
+     * <p>
+     * If this builder does not support the given IRI protocol (e.g.
+     * <code>urn:uuid:ce667463-c5ab-4c23-9b64-701d055c4890</code>), this method
+     * should succeed, while the {@link #parse()} should throw an
+     * {@link IOException}.
+     * <p>
+     * The {@link #contentType(RDFSyntax)} or {@link #contentType(String)} MAY
+     * be set before calling {@link #parse()}, in which case that type MAY be
+     * used for content negotiation (e.g. <code>Accept</code> header in HTTP),
+     * and SHOULD be used for selecting the RDFSyntax.
+     * <p>
+     * The character set is assumed to be {@link StandardCharsets#UTF_8} unless
+     * the protocol's equivalent of <code>Content-Type</code> specifies
+     * otherwise or the document declares its own charset (e.g. RDF/XML with a
+     * <code>&lt;?xml encoding="iso-8859-1"&gt;</code> header).
+     * <p>
+     * The {@link #base(IRI)} or {@link #base(String)} MAY be set before calling
+     * {@link #parse()}, otherwise the source IRI will be used as the base IRI.
+     * <p>
+     * This method will override any source set with {@link #source(Path)},
+     * {@link #source(InputStream)} or {@link #source(String)}.
+     * 
+     * @param iri
+     *            An IRI to retrieve and parse
+     * @return An {@link RDFParser} that will use the specified source.
+     */
+    RDFParser source(IRI iri);
+
+    /**
+     * Specify an absolute source IRI to retrieve and parse.
+     * <p>
+     * The source set will not be read before the call to {@link #parse()}.
+     * <p>
+     * If this builder does not support the given IRI (e.g.
+     * <code>urn:uuid:ce667463-c5ab-4c23-9b64-701d055c4890</code>), this method
+     * should succeed, while the {@link #parse()} should throw an
+     * {@link IOException}.
+     * <p>
+     * The {@link #contentType(RDFSyntax)} or {@link #contentType(String)} MAY
+     * be set before calling {@link #parse()}, in which case that type MAY be
+     * used for content negotiation (e.g. <code>Accept</code> header in HTTP),
+     * and SHOULD be used for selecting the RDFSyntax.
+     * <p>
+     * The character set is assumed to be {@link StandardCharsets#UTF_8} unless
+     * the protocol's equivalent of <code>Content-Type</code> specifies
+     * otherwise or the document declares its own charset (e.g. RDF/XML with a
+     * <code>&lt;?xml encoding="iso-8859-1"&gt;</code> header).
+     * <p>
+     * The {@link #base(IRI)} or {@link #base(String)} MAY be set before calling
+     * {@link #parse()}, otherwise the source IRI will be used as the base IRI.
+     * <p>
+     * This method will override any source set with {@link #source(Path)},
+     * {@link #source(InputStream)} or {@link #source(IRI)}.
+     * 
+     * @param iri
+     *            An IRI to retrieve and parse
+     * @return An {@link RDFParser} that will use the specified source.
+     * @throws IllegalArgumentException
+     *             If the base is not a valid absolute IRI string
+     * 
+     */
+    RDFParser source(String iri) throws IllegalArgumentException;
+
+    /**
+     * Parse the specified source.
+     * <p>
+     * A source method (e.g. {@link #source(InputStream)}, {@link #source(IRI)},
+     * {@link #source(Path)}, {@link #source(String)} or an equivalent subclass
+     * method) MUST have been called before calling this method, otherwise an
+     * {@link IllegalStateException} will be thrown.
+     * <p>
+     * A target method (e.g. {@link #target(Consumer)},
+     * {@link #target(Dataset)}, {@link #target(Graph)} or an equivalent
+     * subclass method) MUST have been called before calling parse(), otherwise
+     * an {@link IllegalStateException} will be thrown.
+     * <p>
+     * It is undefined if this method is thread-safe, however the
+     * {@link RDFParser} may be reused (e.g. setting a different source) as soon
+     * as the {@link Future} has been returned from this method.
+     * <p>
+     * The RDFParser SHOULD perform the parsing as an asynchronous operation,
+     * and return the {@link Future} as soon as preliminary checks (such as
+     * validity of the {@link #source(IRI)} and {@link #contentType(RDFSyntax)}
+     * settings) have finished. The future SHOULD not mark
+     * {@link Future#isDone()} before parsing is complete. A synchronous
+     * implementation MAY be blocking on the <code>parse()</code> call and
+     * return a Future that is already {@link Future#isDone()}.
+     * <p>
+     * The returned {@link Future} contains a {@link ParseResult}.
+     * Implementations may subclass this interface to provide any parser
+     * details, e.g. list of warnings. <code>null</code> is a possible return
+     * value if no details are available, but parsing succeeded.
+     * <p>
+     * If an exception occurs during parsing, (e.g. {@link IOException} or
+     * <code>org.apache.commons.rdf.simple.experimental.RDFParseException</code>),
+     * 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 {@link Graph} when the
+     *         parsing has finished.
+     * @throws IOException
+     *             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
+     *             <code>source</code> has not been set.
+     */
+    Future<? extends ParseResult> parse() throws IOException, IllegalStateException;
+}
+
\ No newline at end of file Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.experimental/index.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.experimental/index.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.experimental/index.html Wed Nov 16 10:55:17 2016 @@ -0,0 +1 @@ +org.apache.commons.rdf.experimental

org.apache.commons.rdf.experimental

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total22 of 220%2 of 20%44553311
RDFParser220%20%44553311
\ No newline at end of file