commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1001192 [13/30] - in /websites/production/commonsrdf/content: ./ apidocs/ apidocs/org/apache/commons/rdf/api/ apidocs/org/apache/commons/rdf/experimental/ apidocs/org/apache/commons/rdf/simple/ apidocs/org/apache/commons/rdf/simple/class-u...
Date Wed, 16 Nov 2016 10:57:30 GMT
Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/DatasetGraphView.html
==============================================================================
--- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/DatasetGraphView.html (added)
+++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/DatasetGraphView.html Wed Nov 16 10:57:28 2016
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>DatasetGraphView</title><script type="text/javascript" src="../.resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Commons RDF impl: Simple</a> &gt; <a href="index.html" class="el_package">org.apache.commons.rdf.simple</a> &gt; <span class="el_class">DatasetGraphView</span></div><h1>DatasetGraphView</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr>
 <td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">72 of 138</td><td class="ctr2">48%</td><td class="bar">2 of 4</td><td class="ctr2">50%</td><td class="ctr1">9</td><td class="ctr2">16</td><td class
 ="ctr1">19</td><td class="ctr2">33</td><td class="ctr1">7</td><td class="ctr2">14</td></tr></tfoot><tbody><tr><td id="a6"><a href="DatasetGraphView.java.html#L59" class="el_method">DatasetGraphView(Dataset)</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="75" height="10" title="12" alt="12"/></td><td class="ctr2" id="c7">0%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h0">5</td><td class="ctr2" id="i0">5</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a1"><a href="DatasetGraphView.java.html#L79" class="el_method">add(Triple)</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="75" height="10" title="12" alt="12"/></td><td class="ctr2" id="c8">0%</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f1">1</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h1">2</td><td c
 lass="ctr2" id="i4">2</td><td class="ctr1" id="j1">1</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a9"><a href="DatasetGraphView.java.html#L106" class="el_method">remove(Triple)</a></td><td class="bar" id="b2"><img src="../.resources/redbar.gif" width="75" height="10" title="12" alt="12"/></td><td class="ctr2" id="c9">0%</td><td class="bar" id="d4"/><td class="ctr2" id="e4">n/a</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g4">1</td><td class="ctr1" id="h2">2</td><td class="ctr2" id="i5">2</td><td class="ctr1" id="j2">1</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a0"><a href="DatasetGraphView.java.html#L84" class="el_method">add(BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b3"><img src="../.resources/redbar.gif" width="56" height="10" title="9" alt="9"/></td><td class="ctr2" id="c10">0%</td><td class="bar" id="d5"/><td class="ctr2" id="e5">n/a</td><td class="ctr1" id="f3">1</td><td class="ctr2" id="g5">1</td><td class="ctr1" id="h3">2</td><td cla
 ss="ctr2" id="i6">2</td><td class="ctr1" id="j3">1</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a8"><a href="DatasetGraphView.java.html#L111" class="el_method">remove(BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b4"><img src="../.resources/redbar.gif" width="56" height="10" title="9" alt="9"/></td><td class="ctr2" id="c11">0%</td><td class="bar" id="d6"/><td class="ctr2" id="e6">n/a</td><td class="ctr1" id="f4">1</td><td class="ctr2" id="g6">1</td><td class="ctr1" id="h4">2</td><td class="ctr2" id="i7">2</td><td class="ctr1" id="j4">1</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a2"><a href="DatasetGraphView.java.html#L116" class="el_method">clear()</a></td><td class="bar" id="b5"><img src="../.resources/redbar.gif" width="56" height="10" title="9" alt="9"/></td><td class="ctr2" id="c12">0%</td><td class="bar" id="d7"/><td class="ctr2" id="e7">n/a</td><td class="ctr1" id="f5">1</td><td class="ctr2" id="g7">1</td><td class="ctr1" id="h5">2</td><td class="ct
 r2" id="i8">2</td><td class="ctr1" id="j5">1</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a3"><a href="DatasetGraphView.java.html#L73" class="el_method">close()</a></td><td class="bar" id="b6"><img src="../.resources/redbar.gif" width="25" height="10" title="4" alt="4"/></td><td class="ctr2" id="c13">0%</td><td class="bar" id="d8"/><td class="ctr2" id="e8">n/a</td><td class="ctr1" id="f6">1</td><td class="ctr2" id="g8">1</td><td class="ctr1" id="h6">2</td><td class="ctr2" id="i9">2</td><td class="ctr1" id="j6">1</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a12"><a href="DatasetGraphView.java.html#L131" class="el_method">stream(BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b7"><img src="../.resources/redbar.gif" width="18" height="10" title="3" alt="3"/><img src="../.resources/greenbar.gif" width="101" height="10" title="16" alt="16"/></td><td class="ctr2" id="c5">84%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="60" height="10" titl
 e="1" alt="1"/><img src="../.resources/greenbar.gif" width="60" height="10" title="1" alt="1"/></td><td class="ctr2" id="e0">50%</td><td class="ctr1" id="f7">1</td><td class="ctr2" id="g0">2</td><td class="ctr1" id="h7">1</td><td class="ctr2" id="i2">4</td><td class="ctr1" id="j7">0</td><td class="ctr2" id="k7">1</td></tr><tr><td id="a13"><a href="DatasetGraphView.java.html#L93" class="el_method">unionOrNamedGraph()</a></td><td class="bar" id="b8"><img src="../.resources/redbar.gif" width="12" height="10" title="2" alt="2"/><img src="../.resources/greenbar.gif" width="44" height="10" title="7" alt="7"/></td><td class="ctr2" id="c6">78%</td><td class="bar" id="d1"><img src="../.resources/redbar.gif" width="60" height="10" title="1" alt="1"/><img src="../.resources/greenbar.gif" width="60" height="10" title="1" alt="1"/></td><td class="ctr2" id="e1">50%</td><td class="ctr1" id="f8">1</td><td class="ctr2" id="g1">2</td><td class="ctr1" id="h8">1</td><td class="ctr2" id="i3">3</td><td c
 lass="ctr1" id="j8">0</td><td class="ctr2" id="k8">1</td></tr><tr><td id="a7"><a href="DatasetGraphView.java.html#L65" class="el_method">DatasetGraphView(Dataset, BlankNodeOrIRI)</a></td><td class="bar" id="b9"><img src="../.resources/greenbar.gif" width="75" height="10" title="12" alt="12"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d9"/><td class="ctr2" id="e9">n/a</td><td class="ctr1" id="f9">0</td><td class="ctr2" id="g9">1</td><td class="ctr1" id="h9">0</td><td class="ctr2" id="i1">5</td><td class="ctr1" id="j9">0</td><td class="ctr2" id="k9">1</td></tr><tr><td id="a5"><a href="DatasetGraphView.java.html#L89" class="el_method">contains(Triple)</a></td><td class="bar" id="b10"><img src="../.resources/greenbar.gif" width="75" height="10" title="12" alt="12"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d10"/><td class="ctr2" id="e10">n/a</td><td class="ctr1" id="f10">0</td><td class="ctr2" id="g10">1</td><td class="ctr1" id="h10">0</td><td class="ctr
 2" id="i10">1</td><td class="ctr1" id="j10">0</td><td class="ctr2" id="k10">1</td></tr><tr><td id="a4"><a href="DatasetGraphView.java.html#L101" class="el_method">contains(BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b11"><img src="../.resources/greenbar.gif" width="56" height="10" title="9" alt="9"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d11"/><td class="ctr2" id="e11">n/a</td><td class="ctr1" id="f11">0</td><td class="ctr2" id="g11">1</td><td class="ctr1" id="h11">0</td><td class="ctr2" id="i11">1</td><td class="ctr1" id="j11">0</td><td class="ctr2" id="k11">1</td></tr><tr><td id="a11"><a href="DatasetGraphView.java.html#L126" class="el_method">stream()</a></td><td class="bar" id="b12"><img src="../.resources/greenbar.gif" width="37" height="10" title="6" alt="6"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d12"/><td class="ctr2" id="e12">n/a</td><td class="ctr1" id="f12">0</td><td class="ctr2" id="g12">1</td><td class="ctr1" id="h12
 ">0</td><td class="ctr2" id="i12">1</td><td class="ctr1" id="j12">0</td><td class="ctr2" id="k12">1</td></tr><tr><td id="a10"><a href="DatasetGraphView.java.html#L121" class="el_method">size()</a></td><td class="bar" id="b13"><img src="../.resources/greenbar.gif" width="25" height="10" title="4" alt="4"/></td><td class="ctr2" id="c4">100%</td><td class="bar" id="d13"/><td class="ctr2" id="e13">n/a</td><td class="ctr1" id="f13">0</td><td class="ctr2" id="g13">1</td><td class="ctr1" id="h13">0</td><td class="ctr2" id="i13">1</td><td class="ctr1" id="j13">0</td><td class="ctr2" id="k13">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.6.201602180812</span></div></body></html>
\ No newline at end of file

Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/DatasetGraphView.java.html
==============================================================================
--- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/DatasetGraphView.java.html (added)
+++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/DatasetGraphView.java.html Wed Nov 16 10:57:28 2016
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>DatasetGraphView.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Commons RDF impl: Simple</a> &gt; <a href="index.source.html" class="el_package">org.apache.commons.rdf.simple</a> &gt; <span class="el_source">DatasetGraphView.java<
 /span></div><h1>DatasetGraphView.java</h1><pre class="source lang-java linenums">/**
+ * 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
+ * &quot;License&quot;); 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 &quot;AS IS&quot; 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.simple;
+
+import java.util.Optional;
+import java.util.stream.Stream;
+
+import org.apache.commons.rdf.api.BlankNode;
+import org.apache.commons.rdf.api.BlankNodeOrIRI;
+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.RDFTerm;
+import org.apache.commons.rdf.api.Triple;
+
+/**
+ * A {@link Graph} view on a {@link Dataset}.
+ * &lt;p&gt;
+ * This view is backed by a {@link Dataset}, and can be constructed in two ways:
+ * 
+ * &lt;dl&gt;
+ * &lt;dt&gt;{@link #DatasetGraphView(Dataset)}&lt;/dt&gt;
+ * &lt;dd&gt;Expose a &lt;em&gt;union graph&lt;/em&gt; view of the Dataset, where all the
+ * {@link Quad}s of the Dataset is represented as a {@link Triple}. Adding
+ * triples will add them to the &lt;em&gt;default graph&lt;/em&gt;, while removing triples
+ * will remove from all graphs.&lt;/dd&gt;
+ * 
+ * &lt;dt&gt;{@link #DatasetGraphView(Dataset, BlankNodeOrIRI)}&lt;/dt&gt;
+ * &lt;dd&gt;Expose a particular graph of the Dataset, either named by an {@link IRI},
+ * a {@link BlankNode}, or &lt;code&gt;null&lt;/code&gt; for the &lt;em&gt;default
+ * graph&lt;/em&gt;.&lt;/dd&gt;
+ * &lt;/dl&gt;
+ * &lt;p&gt;
+ * Changes in the Graph are reflected directly in the Dataset and vice versa.
+ * This class is thread-safe is the underlying Dataset is thread-safe.
+ */
+public class DatasetGraphView implements Graph {
+
+    private final boolean unionGraph;
+    private final BlankNodeOrIRI namedGraph;
+    private final Dataset dataset;
+
+<span class="nc" id="L59">    public DatasetGraphView(Dataset dataset) {</span>
+<span class="nc" id="L60">        this.dataset = dataset;</span>
+<span class="nc" id="L61">        this.namedGraph = null;</span>
+<span class="nc" id="L62">        this.unionGraph = true;</span>
+<span class="nc" id="L63">    }</span>
+
+<span class="fc" id="L65">    public DatasetGraphView(Dataset dataset, BlankNodeOrIRI namedGraph) {</span>
+<span class="fc" id="L66">        this.dataset = dataset;</span>
+<span class="fc" id="L67">        this.namedGraph = namedGraph;</span>
+<span class="fc" id="L68">        this.unionGraph = false;</span>
+<span class="fc" id="L69">    }</span>
+
+    @Override
+    public void close() throws Exception {
+<span class="nc" id="L73">        dataset.close();</span>
+
+<span class="nc" id="L75">    }</span>
+
+    @Override
+    public void add(Triple triple) {
+<span class="nc" id="L79">        dataset.add(namedGraph, triple.getSubject(), triple.getPredicate(), triple.getObject());</span>
+<span class="nc" id="L80">    }</span>
+
+    @Override
+    public void add(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+<span class="nc" id="L84">        dataset.add(namedGraph, subject, predicate, object);</span>
+<span class="nc" id="L85">    }</span>
+
+    @Override
+    public boolean contains(Triple triple) {
+<span class="fc" id="L89">        return dataset.contains(unionOrNamedGraph(), triple.getSubject(), triple.getPredicate(), triple.getObject());</span>
+    }
+
+    private Optional&lt;BlankNodeOrIRI&gt; unionOrNamedGraph() {
+<span class="pc bpc" id="L93" title="1 of 2 branches missed.">        if (unionGraph) {</span>
+<span class="nc" id="L94">            return null;</span>
+        }
+<span class="fc" id="L96">        return Optional.ofNullable(namedGraph);</span>
+    }
+
+    @Override
+    public boolean contains(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+<span class="fc" id="L101">        return dataset.contains(unionOrNamedGraph(), subject, predicate, object);</span>
+    }
+
+    @Override
+    public void remove(Triple triple) {
+<span class="nc" id="L106">        dataset.remove(unionOrNamedGraph(), triple.getSubject(), triple.getPredicate(), triple.getObject());</span>
+<span class="nc" id="L107">    }</span>
+
+    @Override
+    public void remove(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+<span class="nc" id="L111">        dataset.remove(unionOrNamedGraph(), subject, predicate, object);</span>
+<span class="nc" id="L112">    }</span>
+
+    @Override
+    public void clear() {
+<span class="nc" id="L116">        dataset.remove(unionOrNamedGraph(), null, null, null);</span>
+<span class="nc" id="L117">    }</span>
+
+    @Override
+    public long size() {
+<span class="fc" id="L121">        return stream().count();</span>
+    }
+
+    @Override
+    public Stream&lt;? extends Triple&gt; stream() {
+<span class="fc" id="L126">        return stream(null, null, null);</span>
+    }
+
+    @Override
+    public Stream&lt;? extends Triple&gt; stream(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+<span class="fc" id="L131">        Stream&lt;Triple&gt; stream = dataset.stream(unionOrNamedGraph(), subject, predicate, object).map(Quad::asTriple);</span>
+<span class="pc bpc" id="L132" title="1 of 2 branches missed.">        if (unionGraph) {</span>
+            // remove duplicates
+<span class="nc" id="L134">            return stream.distinct();</span>
+        }
+<span class="fc" id="L136">        return stream;</span>
+    }
+
+}
+</pre><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.6.201602180812</span></div></body></html>
\ No newline at end of file

Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/DatasetImpl.html
==============================================================================
--- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/DatasetImpl.html (added)
+++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/DatasetImpl.html Wed Nov 16 10:57:28 2016
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>DatasetImpl</title><script type="text/javascript" src="../.resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Commons RDF impl: Simple</a> &gt; <a href="index.html" class="el_package">org.apache.commons.rdf.simple</a> &gt; <span class="el_class">DatasetImpl</span></div><h1>DatasetImpl</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sort
 able" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">91 of 394</td><td class="ctr2">77%</td><td class="bar">17 of 48</td><td class="ctr2">65%</td><td class="ctr1">13</td><td class="ctr2">44</td><td class="ctr1">13</
 td><td class="ctr2">73</td><td class="ctr1">1</td><td class="ctr2">20</td></tr></tfoot><tbody><tr><td id="a11"><a href="DatasetImpl.java.html#L84" class="el_method">internallyMap(RDFTerm)</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="88" height="10" title="61" alt="61"/><img src="../.resources/greenbar.gif" width="31" height="10" title="22" alt="22"/></td><td class="ctr2" id="c18">27%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="80" height="10" title="12" alt="12"/><img src="../.resources/greenbar.gif" width="40" height="10" title="6" alt="6"/></td><td class="ctr2" id="e5">33%</td><td class="ctr1" id="f0">7</td><td class="ctr2" id="g0">10</td><td class="ctr1" id="h0">9</td><td class="ctr2" id="i0">14</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a19"><a href="DatasetImpl.java.html#L186" class="el_method">toString()</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="23"
  height="10" title="16" alt="16"/><img src="../.resources/greenbar.gif" width="26" height="10" title="18" alt="18"/></td><td class="ctr2" id="c17">53%</td><td class="bar" id="d2"><img src="../.resources/redbar.gif" width="6" height="10" title="1" alt="1"/><img src="../.resources/greenbar.gif" width="6" height="10" title="1" alt="1"/></td><td class="ctr2" id="e3">50%</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g3">2</td><td class="ctr1" id="h2">1</td><td class="ctr2" id="i6">4</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a1"><a href="DatasetImpl.java.html#L67" class="el_method">add(Quad)</a></td><td class="bar" id="b2"><img src="../.resources/redbar.gif" width="18" height="10" title="13" alt="13"/><img src="../.resources/greenbar.gif" width="73" height="10" title="51" alt="51"/></td><td class="ctr2" id="c16">80%</td><td class="bar" id="d1"><img src="../.resources/redbar.gif" width="26" height="10" title="4" alt="4"/><img src="../.reso
 urces/greenbar.gif" width="26" height="10" title="4" alt="4"/></td><td class="ctr2" id="e4">50%</td><td class="ctr1" id="f1">4</td><td class="ctr2" id="g2">5</td><td class="ctr1" id="h1">2</td><td class="ctr2" id="i1">10</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a3"><a href="DatasetImpl.java.html#L196" class="el_method">close()</a></td><td class="bar" id="b3"><img src="../.resources/redbar.gif" width="1" height="10" title="1" alt="1"/></td><td class="ctr2" id="c19">0%</td><td class="bar" id="d6"/><td class="ctr2" id="e6">n/a</td><td class="ctr1" id="f3">1</td><td class="ctr2" id="g6">1</td><td class="ctr1" id="h3">1</td><td class="ctr2" id="i10">1</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a13"><a href="DatasetImpl.java.html#L144" class="el_method">lambda$stream$1(Optional, BlankNodeOrIRI, BlankNodeOrIRI, IRI, IRI, RDFTerm, RDFTerm, Quad)</a></td><td class="bar" id="b4"><img src="../.resources/greenbar.
 gif" width="54" height="10" title="38" alt="38"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d3"><img src="../.resources/greenbar.gif" width="106" height="10" title="16" alt="16"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f4">0</td><td class="ctr2" id="g1">9</td><td class="ctr1" id="h4">0</td><td class="ctr2" id="i2">9</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a18"><a href="DatasetImpl.java.html#L133" class="el_method">stream(Optional, BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b5"><img src="../.resources/greenbar.gif" width="50" height="10" title="35" alt="35"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d4"><img src="../.resources/greenbar.gif" width="13" height="10" title="2" alt="2"/></td><td class="ctr2" id="e1">100%</td><td class="ctr1" id="f5">0</td><td class="ctr2" id="g4">2</td><td class="ctr1" id="h5">0</td><td class="ctr2" id="i3">7</td><td class="ctr1" id="j5">0</td><t
 d class="ctr2" id="k5">1</td></tr><tr><td id="a0"><a href="DatasetImpl.java.html#L57" class="el_method">add(BlankNodeOrIRI, BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b6"><img src="../.resources/greenbar.gif" width="47" height="10" title="33" alt="33"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d7"/><td class="ctr2" id="e7">n/a</td><td class="ctr1" id="f6">0</td><td class="ctr2" id="g7">1</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i4">7</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a14"><a href="DatasetImpl.java.html#L167" class="el_method">remove(Optional, BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b7"><img src="../.resources/greenbar.gif" width="36" height="10" title="25" alt="25"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d5"><img src="../.resources/greenbar.gif" width="13" height="10" title="2" alt="2"/></td><td class="ctr2" id="e2">100%</td><td class="ctr1" id="f7">0
 </td><td class="ctr2" id="g5">2</td><td class="ctr1" id="h7">0</td><td class="ctr2" id="i5">5</td><td class="ctr1" id="j7">0</td><td class="ctr2" id="k7">1</td></tr><tr><td id="a6"><a href="DatasetImpl.java.html#L48" class="el_method">DatasetImpl(SimpleRDF)</a></td><td class="bar" id="b8"><img src="../.resources/greenbar.gif" width="15" height="10" title="11" alt="11"/></td><td class="ctr2" id="c4">100%</td><td class="bar" id="d8"/><td class="ctr2" id="e8">n/a</td><td class="ctr1" id="f8">0</td><td class="ctr2" id="g8">1</td><td class="ctr1" id="h8">0</td><td class="ctr2" id="i7">4</td><td class="ctr1" id="j8">0</td><td class="ctr2" id="k8">1</td></tr><tr><td id="a9"><a href="DatasetImpl.java.html#L211" class="el_method">getGraphNames()</a></td><td class="bar" id="b9"><img src="../.resources/greenbar.gif" width="14" height="10" title="10" alt="10"/></td><td class="ctr2" id="c5">100%</td><td class="bar" id="d9"/><td class="ctr2" id="e9">n/a</td><td class="ctr1" id="f9">0</td><td clas
 s="ctr2" id="g9">1</td><td class="ctr1" id="h9">0</td><td class="ctr2" id="i11">1</td><td class="ctr1" id="j9">0</td><td class="ctr2" id="k9">1</td></tr><tr><td id="a4"><a href="DatasetImpl.java.html#L116" class="el_method">contains(Optional, BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b10"><img src="../.resources/greenbar.gif" width="13" height="10" title="9" alt="9"/></td><td class="ctr2" id="c6">100%</td><td class="bar" id="d10"/><td class="ctr2" id="e10">n/a</td><td class="ctr1" id="f10">0</td><td class="ctr2" id="g10">1</td><td class="ctr1" id="h10">0</td><td class="ctr2" id="i12">1</td><td class="ctr1" id="j10">0</td><td class="ctr2" id="k10">1</td></tr><tr><td id="a15"><a href="DatasetImpl.java.html#L176" class="el_method">remove(Quad)</a></td><td class="bar" id="b11"><img src="../.resources/greenbar.gif" width="10" height="10" title="7" alt="7"/></td><td class="ctr2" id="c7">100%</td><td class="bar" id="d11"/><td class="ctr2" id="e11">n/a</td><td class="ctr1" i
 d="f11">0</td><td class="ctr2" id="g11">1</td><td class="ctr1" id="h11">0</td><td class="ctr2" id="i8">2</td><td class="ctr1" id="j11">0</td><td class="ctr2" id="k11">1</td></tr><tr><td id="a8"><a href="DatasetImpl.java.html#L205" class="el_method">getGraph(BlankNodeOrIRI)</a></td><td class="bar" id="b12"><img src="../.resources/greenbar.gif" width="10" height="10" title="7" alt="7"/></td><td class="ctr2" id="c8">100%</td><td class="bar" id="d12"/><td class="ctr2" id="e12">n/a</td><td class="ctr1" id="f12">0</td><td class="ctr2" id="g12">1</td><td class="ctr1" id="h12">0</td><td class="ctr2" id="i13">1</td><td class="ctr1" id="j12">0</td><td class="ctr2" id="k12">1</td></tr><tr><td id="a5"><a href="DatasetImpl.java.html#L121" class="el_method">contains(Quad)</a></td><td class="bar" id="b13"><img src="../.resources/greenbar.gif" width="8" height="10" title="6" alt="6"/></td><td class="ctr2" id="c9">100%</td><td class="bar" id="d13"/><td class="ctr2" id="e13">n/a</td><td class="ctr1" 
 id="f13">0</td><td class="ctr2" id="g13">1</td><td class="ctr1" id="h13">0</td><td class="ctr2" id="i14">1</td><td class="ctr1" id="j13">0</td><td class="ctr2" id="k13">1</td></tr><tr><td id="a17"><a href="DatasetImpl.java.html#L126" class="el_method">stream()</a></td><td class="bar" id="b14"><img src="../.resources/greenbar.gif" width="8" height="10" title="6" alt="6"/></td><td class="ctr2" id="c10">100%</td><td class="bar" id="d14"/><td class="ctr2" id="e14">n/a</td><td class="ctr1" id="f14">0</td><td class="ctr2" id="g14">1</td><td class="ctr1" id="h14">0</td><td class="ctr2" id="i15">1</td><td class="ctr1" id="j14">0</td><td class="ctr2" id="k14">1</td></tr><tr><td id="a7"><a href="DatasetImpl.java.html#L200" class="el_method">getGraph()</a></td><td class="bar" id="b15"><img src="../.resources/greenbar.gif" width="8" height="10" title="6" alt="6"/></td><td class="ctr2" id="c11">100%</td><td class="bar" id="d15"/><td class="ctr2" id="e15">n/a</td><td class="ctr1" id="f15">0</td><
 td class="ctr2" id="g15">1</td><td class="ctr1" id="h15">0</td><td class="ctr2" id="i16">1</td><td class="ctr1" id="j15">0</td><td class="ctr2" id="k15">1</td></tr><tr><td id="a10"><a href="DatasetImpl.java.html#L162" class="el_method">getQuads(Predicate)</a></td><td class="bar" id="b16"><img src="../.resources/greenbar.gif" width="7" height="10" title="5" alt="5"/></td><td class="ctr2" id="c12">100%</td><td class="bar" id="d16"/><td class="ctr2" id="e16">n/a</td><td class="ctr1" id="f16">0</td><td class="ctr2" id="g16">1</td><td class="ctr1" id="h16">0</td><td class="ctr2" id="i17">1</td><td class="ctr1" id="j16">0</td><td class="ctr2" id="k16">1</td></tr><tr><td id="a16"><a href="DatasetImpl.java.html#L181" class="el_method">size()</a></td><td class="bar" id="b17"><img src="../.resources/greenbar.gif" width="7" height="10" title="5" alt="5"/></td><td class="ctr2" id="c13">100%</td><td class="bar" id="d17"/><td class="ctr2" id="e17">n/a</td><td class="ctr1" id="f17">0</td><td class
 ="ctr2" id="g17">1</td><td class="ctr1" id="h17">0</td><td class="ctr2" id="i18">1</td><td class="ctr1" id="j17">0</td><td class="ctr2" id="k17">1</td></tr><tr><td id="a12"><a href="DatasetImpl.java.html#L137" class="el_method">lambda$stream$0(BlankNodeOrIRI)</a></td><td class="bar" id="b18"><img src="../.resources/greenbar.gif" width="7" height="10" title="5" alt="5"/></td><td class="ctr2" id="c14">100%</td><td class="bar" id="d18"/><td class="ctr2" id="e18">n/a</td><td class="ctr1" id="f18">0</td><td class="ctr2" id="g18">1</td><td class="ctr1" id="h18">0</td><td class="ctr2" id="i19">1</td><td class="ctr1" id="j18">0</td><td class="ctr2" id="k18">1</td></tr><tr><td id="a2"><a href="DatasetImpl.java.html#L111" class="el_method">clear()</a></td><td class="bar" id="b19"><img src="../.resources/greenbar.gif" width="5" height="10" title="4" alt="4"/></td><td class="ctr2" id="c15">100%</td><td class="bar" id="d19"/><td class="ctr2" id="e19">n/a</td><td class="ctr1" id="f19">0</td><td c
 lass="ctr2" id="g19">1</td><td class="ctr1" id="h19">0</td><td class="ctr2" id="i9">2</td><td class="ctr1" id="j19">0</td><td class="ctr2" id="k19">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.6.201602180812</span></div></body></html>
\ No newline at end of file

Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/DatasetImpl.java.html
==============================================================================
--- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/DatasetImpl.java.html (added)
+++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/DatasetImpl.java.html Wed Nov 16 10:57:28 2016
@@ -0,0 +1,215 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>DatasetImpl.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Commons RDF impl: Simple</a> &gt; <a href="index.source.html" class="el_package">org.apache.commons.rdf.simple</a> &gt; <span class="el_source">DatasetImpl.java</span></di
 v><h1>DatasetImpl.java</h1><pre class="source lang-java linenums">/**
+ * 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
+ * &quot;License&quot;); 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 &quot;AS IS&quot; 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.simple;
+
+import java.util.HashSet;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.commons.rdf.api.BlankNode;
+import org.apache.commons.rdf.api.BlankNodeOrIRI;
+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.Literal;
+import org.apache.commons.rdf.api.Quad;
+import org.apache.commons.rdf.api.RDFTerm;
+import org.apache.commons.rdf.simple.SimpleRDF.SimpleRDFTerm;
+
+/**
+ * A simple, memory-based implementation of Dataset.
+ * &lt;p&gt;
+ * {@link Quad}s in the graph are kept in a {@link Set}.
+ * &lt;p&gt;
+ * All Stream operations are performed using parallel and unordered directives.
+ */
+final class DatasetImpl implements Dataset {
+
+    private static final int TO_STRING_MAX = 10;
+<span class="fc" id="L48">    private final Set&lt;Quad&gt; quads = new HashSet&lt;Quad&gt;();</span>
+    private final SimpleRDF factory;
+
+<span class="fc" id="L51">    DatasetImpl(SimpleRDF simpleRDF) {</span>
+<span class="fc" id="L52">        this.factory = simpleRDF;</span>
+<span class="fc" id="L53">    }</span>
+
+    @Override
+    public void add(BlankNodeOrIRI graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+<span class="fc" id="L57">        BlankNodeOrIRI newGraphName = (BlankNodeOrIRI) internallyMap(graphName);</span>
+<span class="fc" id="L58">        BlankNodeOrIRI newSubject = (BlankNodeOrIRI) internallyMap(subject);</span>
+<span class="fc" id="L59">        IRI newPredicate = (IRI) internallyMap(predicate);</span>
+<span class="fc" id="L60">        RDFTerm newObject = internallyMap(object);</span>
+<span class="fc" id="L61">        Quad result = factory.createQuad(newGraphName, newSubject, newPredicate, newObject);</span>
+<span class="fc" id="L62">        quads.add(result);</span>
+<span class="fc" id="L63">    }</span>
+
+    @Override
+    public void add(Quad quad) {
+<span class="fc" id="L67">        BlankNodeOrIRI newGraph = (BlankNodeOrIRI) internallyMap(quad.getGraphName().orElse(null));</span>
+<span class="fc" id="L68">        BlankNodeOrIRI newSubject = (BlankNodeOrIRI) internallyMap(quad.getSubject());</span>
+<span class="fc" id="L69">        IRI newPredicate = (IRI) internallyMap(quad.getPredicate());</span>
+<span class="fc" id="L70">        RDFTerm newObject = internallyMap(quad.getObject());</span>
+        // Check if any of the object references changed during the mapping, to
+        // avoid creating a new Quad object if possible
+<span class="pc bpc" id="L73" title="2 of 4 branches missed.">        if (newGraph == quad.getGraphName().orElse(null) &amp;&amp; newSubject == quad.getSubject()</span>
+<span class="pc bpc" id="L74" title="2 of 4 branches missed.">                &amp;&amp; newPredicate == quad.getPredicate() &amp;&amp; newObject == quad.getObject()) {</span>
+<span class="fc" id="L75">            quads.add(quad);</span>
+        } else {
+            // Make a new Quad with our mapped instances
+<span class="nc" id="L78">            Quad result = factory.createQuad(newGraph, newSubject, newPredicate, newObject);</span>
+<span class="nc" id="L79">            quads.add(result);</span>
+        }
+<span class="fc" id="L81">    }</span>
+
+    private &lt;T extends RDFTerm&gt; RDFTerm internallyMap(T object) {
+<span class="fc bfc" id="L84" title="All 4 branches covered.">        if (object == null || object instanceof SimpleRDFTerm) {</span>
+<span class="fc" id="L85">            return object;</span>
+        }
+<span class="pc bpc" id="L87" title="2 of 4 branches missed.">        if (object instanceof BlankNode &amp;&amp; !(object instanceof BlankNodeImpl)) {</span>
+<span class="fc" id="L88">            BlankNode blankNode = (BlankNode) object;</span>
+            // This guarantees that adding the same BlankNode multiple times to
+            // this graph will generate a local object that is mapped to an
+            // equivalent object, based on the code in the package private
+            // BlankNodeImpl class
+<span class="fc" id="L93">            return factory.createBlankNode(blankNode.uniqueReference());</span>
+<span class="nc bnc" id="L94" title="All 4 branches missed.">        } else if (object instanceof IRI &amp;&amp; !(object instanceof IRIImpl)) {</span>
+<span class="nc" id="L95">            IRI iri = (IRI) object;</span>
+<span class="nc" id="L96">            return factory.createIRI(iri.getIRIString());</span>
+<span class="nc bnc" id="L97" title="All 4 branches missed.">        } else if (object instanceof Literal &amp;&amp; !(object instanceof LiteralImpl)) {</span>
+<span class="nc" id="L98">            Literal literal = (Literal) object;</span>
+<span class="nc bnc" id="L99" title="All 2 branches missed.">            if (literal.getLanguageTag().isPresent()) {</span>
+<span class="nc" id="L100">                return factory.createLiteral(literal.getLexicalForm(), literal.getLanguageTag().get());</span>
+            } else {
+<span class="nc" id="L102">                return factory.createLiteral(literal.getLexicalForm(), (IRI) internallyMap(literal.getDatatype()));</span>
+            }
+        } else {
+<span class="nc" id="L105">            throw new IllegalArgumentException(&quot;Not a BlankNode, IRI or Literal: &quot; + object);</span>
+        }
+    }
+
+    @Override
+    public void clear() {
+<span class="fc" id="L111">        quads.clear();</span>
+<span class="fc" id="L112">    }</span>
+
+    @Override
+    public boolean contains(Optional&lt;BlankNodeOrIRI&gt; graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+<span class="fc" id="L116">        return stream(graphName, subject, predicate, object).findAny().isPresent();</span>
+    }
+
+    @Override
+    public boolean contains(Quad quad) {
+<span class="fc" id="L121">        return quads.contains(Objects.requireNonNull(quad));</span>
+    }
+
+    @Override
+    public Stream&lt;Quad&gt; stream() {
+<span class="fc" id="L126">        return quads.parallelStream().unordered();</span>
+    }
+
+    @Override
+    public Stream&lt;Quad&gt; stream(Optional&lt;BlankNodeOrIRI&gt; graphName, BlankNodeOrIRI subject, IRI predicate,
+            RDFTerm object) {
+        final Optional&lt;BlankNodeOrIRI&gt; newGraphName;
+<span class="fc bfc" id="L133" title="All 2 branches covered.">        if (graphName == null) { </span>
+            // Avoid Optional&lt;Optional&lt;BlankNodeOrIRI&gt;&gt; ...
+<span class="fc" id="L135">            newGraphName = null;</span>
+        } else {
+<span class="fc" id="L137">            newGraphName = graphName.map(g -&gt; (BlankNodeOrIRI) internallyMap(g));</span>
+        }
+<span class="fc" id="L139">        final BlankNodeOrIRI newSubject = (BlankNodeOrIRI) internallyMap(subject);</span>
+<span class="fc" id="L140">        final IRI newPredicate = (IRI) internallyMap(predicate);</span>
+<span class="fc" id="L141">        final RDFTerm newObject = internallyMap(object);</span>
+
+<span class="fc" id="L143">        return getQuads(t -&gt; {</span>
+<span class="fc bfc" id="L144" title="All 4 branches covered.">            if (newGraphName != null &amp;&amp; !t.getGraphName().equals(newGraphName)) {</span>
+                // This would check Optional.empty() == Optional.empty()
+<span class="fc" id="L146">                return false;</span>
+            }
+<span class="fc bfc" id="L148" title="All 4 branches covered.">            if (subject != null &amp;&amp; !t.getSubject().equals(newSubject)) {</span>
+<span class="fc" id="L149">                return false;</span>
+            }
+<span class="fc bfc" id="L151" title="All 4 branches covered.">            if (predicate != null &amp;&amp; !t.getPredicate().equals(newPredicate)) {</span>
+<span class="fc" id="L152">                return false;</span>
+            }
+<span class="fc bfc" id="L154" title="All 4 branches covered.">            if (object != null &amp;&amp; !t.getObject().equals(newObject)) {</span>
+<span class="fc" id="L155">                return false;</span>
+            }
+<span class="fc" id="L157">            return true;</span>
+        });
+    }
+
+    private Stream&lt;Quad&gt; getQuads(final Predicate&lt;Quad&gt; filter) {
+<span class="fc" id="L162">        return stream().filter(filter);</span>
+    }
+
+    @Override
+    public void remove(Optional&lt;BlankNodeOrIRI&gt; graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+<span class="fc" id="L167">        Stream&lt;Quad&gt; toRemove = stream(graphName, subject, predicate, object);</span>
+<span class="fc bfc" id="L168" title="All 2 branches covered.">        for (Quad t : toRemove.collect(Collectors.toList())) {</span>
+            // Avoid ConcurrentModificationException in ArrayList
+<span class="fc" id="L170">            remove(t);</span>
+<span class="fc" id="L171">        }</span>
+<span class="fc" id="L172">    }</span>
+
+    @Override
+    public void remove(Quad quad) {
+<span class="fc" id="L176">        quads.remove(Objects.requireNonNull(quad));</span>
+<span class="fc" id="L177">    }</span>
+
+    @Override
+    public long size() {
+<span class="fc" id="L181">        return quads.size();</span>
+    }
+
+    @Override
+    public String toString() {
+<span class="fc" id="L186">        String s = stream().limit(TO_STRING_MAX).map(Object::toString).collect(Collectors.joining(&quot;\n&quot;));</span>
+<span class="pc bpc" id="L187" title="1 of 2 branches missed.">        if (size() &gt; TO_STRING_MAX) {</span>
+<span class="nc" id="L188">            return s + &quot;\n# ... +&quot; + (size() - TO_STRING_MAX) + &quot; more&quot;;</span>
+        } else {
+<span class="fc" id="L190">            return s;</span>
+        }
+    }
+
+    @Override
+    public void close() {
+<span class="nc" id="L196">    }</span>
+
+    @Override
+    public Graph getGraph() {
+<span class="fc" id="L200">        return getGraph(null).get();</span>
+    }
+
+    @Override
+    public Optional&lt;Graph&gt; getGraph(BlankNodeOrIRI graphName) {
+<span class="fc" id="L205">        return Optional.of(new DatasetGraphView(this, graphName));</span>
+    }
+
+    @Override
+    public Stream&lt;BlankNodeOrIRI&gt; getGraphNames() {
+        // Not very efficient..
+<span class="fc" id="L211">        return stream().map(Quad::getGraphName).filter(Optional::isPresent).map(Optional::get).distinct();</span>
+    }
+
+}
+</pre><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.6.201602180812</span></div></body></html>
\ No newline at end of file

Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/GraphImpl.html
==============================================================================
--- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/GraphImpl.html (added)
+++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/GraphImpl.html Wed Nov 16 10:57:28 2016
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>GraphImpl</title><script type="text/javascript" src="../.resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Commons RDF impl: Simple</a> &gt; <a href="index.html" class="el_package">org.apache.commons.rdf.simple</a> &gt; <span class="el_class">GraphImpl</span></div><h1>GraphImpl</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" 
 id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">78 of 312</td><td class="ctr2">75%</td><td class="bar">11 of 34</td><td class="ctr2">68%</td><td class="ctr1">8</td><td class="ctr2">33</td><td class="ctr1">11</td><td 
 class="ctr2">62</td><td class="ctr1">0</td><td class="ctr2">16</td></tr></tfoot><tbody><tr><td id="a7"><a href="GraphImpl.java.html#L62" class="el_method">internallyMap(RDFTerm)</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="89" height="10" title="55" alt="55"/><img src="../.resources/greenbar.gif" width="30" height="10" title="19" alt="19"/></td><td class="ctr2" id="c15">26%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="70" height="10" title="7" alt="7"/><img src="../.resources/greenbar.gif" width="50" height="10" title="5" alt="5"/></td><td class="ctr2" id="e4">42%</td><td class="ctr1" id="f0">4</td><td class="ctr2" id="g0">7</td><td class="ctr1" id="h0">9</td><td class="ctr2" id="i0">14</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a15"><a href="GraphImpl.java.html#L172" class="el_method">toString()</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="25" height="10" ti
 tle="16" alt="16"/><img src="../.resources/greenbar.gif" width="29" height="10" title="18" alt="18"/></td><td class="ctr2" id="c14">53%</td><td class="bar" id="d2"><img src="../.resources/redbar.gif" width="10" height="10" title="1" alt="1"/><img src="../.resources/greenbar.gif" width="10" height="10" title="1" alt="1"/></td><td class="ctr2" id="e2">50%</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g3">2</td><td class="ctr1" id="h1">1</td><td class="ctr2" id="i5">4</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a8"><a href="GraphImpl.java.html#L92" class="el_method">internallyMap(Triple)</a></td><td class="bar" id="b2"><img src="../.resources/redbar.gif" width="11" height="10" title="7" alt="7"/><img src="../.resources/greenbar.gif" width="50" height="10" title="31" alt="31"/></td><td class="ctr2" id="c13">82%</td><td class="bar" id="d1"><img src="../.resources/redbar.gif" width="30" height="10" title="3" alt="3"/><img src="../.resources
 /greenbar.gif" width="30" height="10" title="3" alt="3"/></td><td class="ctr2" id="e3">50%</td><td class="ctr1" id="f1">3</td><td class="ctr2" id="g2">4</td><td class="ctr1" id="h2">1</td><td class="ctr2" id="i1">7</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a9"><a href="GraphImpl.java.html#L134" class="el_method">lambda$stream$0(BlankNodeOrIRI, BlankNodeOrIRI, IRI, IRI, RDFTerm, RDFTerm, Triple)</a></td><td class="bar" id="b3"><img src="../.resources/greenbar.gif" width="47" height="10" title="29" alt="29"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d3"><img src="../.resources/greenbar.gif" width="120" height="10" title="12" alt="12"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g1">7</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i2">7</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a0"><a href="GraphImpl.java.html#L49" class="el_method">
 add(BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b4"><img src="../.resources/greenbar.gif" width="43" height="10" title="27" alt="27"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d5"/><td class="ctr2" id="e5">n/a</td><td class="ctr1" id="f4">0</td><td class="ctr2" id="g5">1</td><td class="ctr1" id="h4">0</td><td class="ctr2" id="i3">6</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a14"><a href="GraphImpl.java.html#L127" class="el_method">stream(BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b5"><img src="../.resources/greenbar.gif" width="38" height="10" title="24" alt="24"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d6"/><td class="ctr2" id="e6">n/a</td><td class="ctr1" id="f5">0</td><td class="ctr2" id="g6">1</td><td class="ctr1" id="h5">0</td><td class="ctr2" id="i6">4</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a10"><a href="GraphImpl.java.html#L153" 
 class="el_method">remove(BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b6"><img src="../.resources/greenbar.gif" width="38" height="10" title="24" alt="24"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d4"><img src="../.resources/greenbar.gif" width="20" height="10" title="2" alt="2"/></td><td class="ctr2" id="e1">100%</td><td class="ctr1" id="f6">0</td><td class="ctr2" id="g4">2</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i4">5</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a6"><a href="GraphImpl.java.html#L40" class="el_method">GraphImpl(SimpleRDF)</a></td><td class="bar" id="b7"><img src="../.resources/greenbar.gif" width="17" height="10" title="11" alt="11"/></td><td class="ctr2" id="c4">100%</td><td class="bar" id="d7"/><td class="ctr2" id="e7">n/a</td><td class="ctr1" id="f7">0</td><td class="ctr2" id="g7">1</td><td class="ctr1" id="h7">0</td><td class="ctr2" id="i7">4</td><td class="ctr1" id="j7">0</td>
 <td class="ctr2" id="k7">1</td></tr><tr><td id="a1"><a href="GraphImpl.java.html#L58" class="el_method">add(Triple)</a></td><td class="bar" id="b8"><img src="../.resources/greenbar.gif" width="12" height="10" title="8" alt="8"/></td><td class="ctr2" id="c5">100%</td><td class="bar" id="d8"/><td class="ctr2" id="e8">n/a</td><td class="ctr1" id="f8">0</td><td class="ctr2" id="g8">1</td><td class="ctr1" id="h8">0</td><td class="ctr2" id="i8">2</td><td class="ctr1" id="j8">0</td><td class="ctr2" id="k8">1</td></tr><tr><td id="a3"><a href="GraphImpl.java.html#L112" class="el_method">contains(BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b9"><img src="../.resources/greenbar.gif" width="12" height="10" title="8" alt="8"/></td><td class="ctr2" id="c6">100%</td><td class="bar" id="d9"/><td class="ctr2" id="e9">n/a</td><td class="ctr1" id="f9">0</td><td class="ctr2" id="g9">1</td><td class="ctr1" id="h9">0</td><td class="ctr2" id="i11">1</td><td class="ctr1" id="j9">0</td><td clas
 s="ctr2" id="k9">1</td></tr><tr><td id="a11"><a href="GraphImpl.java.html#L162" class="el_method">remove(Triple)</a></td><td class="bar" id="b10"><img src="../.resources/greenbar.gif" width="12" height="10" title="8" alt="8"/></td><td class="ctr2" id="c7">100%</td><td class="bar" id="d10"/><td class="ctr2" id="e10">n/a</td><td class="ctr1" id="f10">0</td><td class="ctr2" id="g10">1</td><td class="ctr1" id="h10">0</td><td class="ctr2" id="i9">2</td><td class="ctr1" id="j10">0</td><td class="ctr2" id="k10">1</td></tr><tr><td id="a4"><a href="GraphImpl.java.html#L117" class="el_method">contains(Triple)</a></td><td class="bar" id="b11"><img src="../.resources/greenbar.gif" width="11" height="10" title="7" alt="7"/></td><td class="ctr2" id="c8">100%</td><td class="bar" id="d11"/><td class="ctr2" id="e11">n/a</td><td class="ctr1" id="f11">0</td><td class="ctr2" id="g11">1</td><td class="ctr1" id="h11">0</td><td class="ctr2" id="i12">1</td><td class="ctr1" id="j11">0</td><td class="ctr2" i
 d="k11">1</td></tr><tr><td id="a13"><a href="GraphImpl.java.html#L122" class="el_method">stream()</a></td><td class="bar" id="b12"><img src="../.resources/greenbar.gif" width="9" height="10" title="6" alt="6"/></td><td class="ctr2" id="c9">100%</td><td class="bar" id="d12"/><td class="ctr2" id="e12">n/a</td><td class="ctr1" id="f12">0</td><td class="ctr2" id="g12">1</td><td class="ctr1" id="h12">0</td><td class="ctr2" id="i13">1</td><td class="ctr1" id="j12">0</td><td class="ctr2" id="k12">1</td></tr><tr><td id="a5"><a href="GraphImpl.java.html#L148" class="el_method">getTriples(Predicate)</a></td><td class="bar" id="b13"><img src="../.resources/greenbar.gif" width="8" height="10" title="5" alt="5"/></td><td class="ctr2" id="c10">100%</td><td class="bar" id="d13"/><td class="ctr2" id="e13">n/a</td><td class="ctr1" id="f13">0</td><td class="ctr2" id="g13">1</td><td class="ctr1" id="h13">0</td><td class="ctr2" id="i14">1</td><td class="ctr1" id="j13">0</td><td class="ctr2" id="k13">1<
 /td></tr><tr><td id="a12"><a href="GraphImpl.java.html#L167" class="el_method">size()</a></td><td class="bar" id="b14"><img src="../.resources/greenbar.gif" width="8" height="10" title="5" alt="5"/></td><td class="ctr2" id="c11">100%</td><td class="bar" id="d14"/><td class="ctr2" id="e14">n/a</td><td class="ctr1" id="f14">0</td><td class="ctr2" id="g14">1</td><td class="ctr1" id="h14">0</td><td class="ctr2" id="i15">1</td><td class="ctr1" id="j14">0</td><td class="ctr2" id="k14">1</td></tr><tr><td id="a2"><a href="GraphImpl.java.html#L107" class="el_method">clear()</a></td><td class="bar" id="b15"><img src="../.resources/greenbar.gif" width="6" height="10" title="4" alt="4"/></td><td class="ctr2" id="c12">100%</td><td class="bar" id="d15"/><td class="ctr2" id="e15">n/a</td><td class="ctr1" id="f15">0</td><td class="ctr2" id="g15">1</td><td class="ctr1" id="h15">0</td><td class="ctr2" id="i10">2</td><td class="ctr1" id="j15">0</td><td class="ctr2" id="k15">1</td></tr></tbody></table>
 <div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.6.201602180812</span></div></body></html>
\ No newline at end of file

Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/GraphImpl.java.html
==============================================================================
--- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/GraphImpl.java.html (added)
+++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/GraphImpl.java.html Wed Nov 16 10:57:28 2016
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>GraphImpl.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Commons RDF impl: Simple</a> &gt; <a href="index.source.html" class="el_package">org.apache.commons.rdf.simple</a> &gt; <span class="el_source">GraphImpl.java</span></div><h
 1>GraphImpl.java</h1><pre class="source lang-java linenums">/**
+ * 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
+ * &quot;License&quot;); 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 &quot;AS IS&quot; 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.simple;
+
+import org.apache.commons.rdf.api.*;
+import org.apache.commons.rdf.simple.SimpleRDF.SimpleRDFTerm;
+
+import java.util.HashSet;
+import java.util.Objects;
+import java.util.Set;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * A simple, memory-based implementation of Graph.
+ * &lt;p&gt;
+ * {@link Triple}s in the graph are kept in a {@link Set}.
+ * &lt;p&gt;
+ * All Stream operations are performed using parallel and unordered directives.
+ */
+final class GraphImpl implements Graph {
+
+    private static final int TO_STRING_MAX = 10;
+<span class="fc" id="L40">    private final Set&lt;Triple&gt; triples = new HashSet&lt;Triple&gt;();</span>
+    private final SimpleRDF factory;
+
+<span class="fc" id="L43">    GraphImpl(SimpleRDF simpleRDF) {</span>
+<span class="fc" id="L44">        this.factory = simpleRDF;</span>
+<span class="fc" id="L45">    }</span>
+
+    @Override
+    public void add(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+<span class="fc" id="L49">        BlankNodeOrIRI newSubject = (BlankNodeOrIRI) internallyMap(subject);</span>
+<span class="fc" id="L50">        IRI newPredicate = (IRI) internallyMap(predicate);</span>
+<span class="fc" id="L51">        RDFTerm newObject = internallyMap(object);</span>
+<span class="fc" id="L52">        Triple result = factory.createTriple(newSubject, newPredicate, newObject);</span>
+<span class="fc" id="L53">        triples.add(result);</span>
+<span class="fc" id="L54">    }</span>
+
+    @Override
+    public void add(Triple triple) {
+<span class="fc" id="L58">        triples.add(internallyMap(triple));</span>
+<span class="fc" id="L59">    }</span>
+
+    private &lt;T extends RDFTerm&gt; RDFTerm internallyMap(T object) {
+<span class="fc bfc" id="L62" title="All 4 branches covered.">        if (object == null || object instanceof SimpleRDFTerm) {</span>
+            // No need to re-map our own objects.
+            // We support null as internallyMap() is also used by the filters,
+            // and the
+            // factory constructors later do null checks
+<span class="fc" id="L67">            return object;</span>
+        }
+<span class="pc bpc" id="L69" title="1 of 2 branches missed.">        if (object instanceof BlankNode) {</span>
+<span class="fc" id="L70">            BlankNode blankNode = (BlankNode) object;</span>
+            // This guarantees that adding the same BlankNode multiple times to
+            // this graph will generate a local object that is mapped to an
+            // equivalent object, based on the code in the package private
+            // BlankNodeImpl class
+<span class="fc" id="L75">            return factory.createBlankNode(blankNode.uniqueReference());</span>
+<span class="nc bnc" id="L76" title="All 2 branches missed.">        } else if (object instanceof IRI) {</span>
+<span class="nc" id="L77">            IRI iri = (IRI) object;</span>
+<span class="nc" id="L78">            return factory.createIRI(iri.getIRIString());</span>
+<span class="nc bnc" id="L79" title="All 2 branches missed.">        } else if (object instanceof Literal) {</span>
+<span class="nc" id="L80">            Literal literal = (Literal) object;</span>
+<span class="nc bnc" id="L81" title="All 2 branches missed.">            if (literal.getLanguageTag().isPresent()) {</span>
+<span class="nc" id="L82">                return factory.createLiteral(literal.getLexicalForm(), literal.getLanguageTag().get());</span>
+            } else {
+<span class="nc" id="L84">                return factory.createLiteral(literal.getLexicalForm(), (IRI) internallyMap(literal.getDatatype()));</span>
+            }
+        } else {
+<span class="nc" id="L87">            throw new IllegalArgumentException(&quot;RDFTerm was neither a BlankNode, IRI nor Literal: &quot; + object);</span>
+        }
+    }
+
+    private Triple internallyMap(Triple triple) {
+<span class="fc" id="L92">        BlankNodeOrIRI newSubject = (BlankNodeOrIRI) internallyMap(triple.getSubject());</span>
+<span class="fc" id="L93">        IRI newPredicate = (IRI) internallyMap(triple.getPredicate());</span>
+<span class="fc" id="L94">        RDFTerm newObject = internallyMap(triple.getObject());</span>
+        // Check if any of the object references changed during the mapping, to
+        // avoid creating a new Triple object if possible
+<span class="pc bpc" id="L97" title="2 of 4 branches missed.">        if (newSubject == triple.getSubject() &amp;&amp; newPredicate == triple.getPredicate()</span>
+<span class="pc bpc" id="L98" title="1 of 2 branches missed.">                &amp;&amp; newObject == triple.getObject()) {</span>
+<span class="fc" id="L99">            return triple;</span>
+        } else {
+<span class="nc" id="L101">            return factory.createTriple(newSubject, newPredicate, newObject);</span>
+        }
+    }
+
+    @Override
+    public void clear() {
+<span class="fc" id="L107">        triples.clear();</span>
+<span class="fc" id="L108">    }</span>
+
+    @Override
+    public boolean contains(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+<span class="fc" id="L112">        return stream(subject, predicate, object).findFirst().isPresent();</span>
+    }
+
+    @Override
+    public boolean contains(Triple triple) {
+<span class="fc" id="L117">        return triples.contains(internallyMap(triple));</span>
+    }
+
+    @Override
+    public Stream&lt;Triple&gt; stream() {
+<span class="fc" id="L122">        return triples.parallelStream().unordered();</span>
+    }
+
+    @Override
+    public Stream&lt;Triple&gt; stream(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
+<span class="fc" id="L127">        final BlankNodeOrIRI newSubject = (BlankNodeOrIRI) internallyMap(subject);</span>
+<span class="fc" id="L128">        final IRI newPredicate = (IRI) internallyMap(predicate);</span>
+<span class="fc" id="L129">        final RDFTerm newObject = internallyMap(object);</span>
+
+<span class="fc" id="L131">        return getTriples(t -&gt; {</span>
+            // Lacking the requirement for .equals() we have to be silly
+            // and test ntriples string equivalance
+<span class="fc bfc" id="L134" title="All 4 branches covered.">            if (subject != null &amp;&amp; !t.getSubject().equals(newSubject)) {</span>
+<span class="fc" id="L135">                return false;</span>
+            }
+<span class="fc bfc" id="L137" title="All 4 branches covered.">            if (predicate != null &amp;&amp; !t.getPredicate().equals(newPredicate)) {</span>
+<span class="fc" id="L138">                return false;</span>
+            }
+<span class="fc bfc" id="L140" title="All 4 branches covered.">            if (object != null &amp;&amp; !t.getObject().equals(newObject)) {</span>
+<span class="fc" id="L141">                return false;</span>
+            }
+<span class="fc" id="L143">            return true;</span>
+        });
+    }
+
+    private Stream&lt;Triple&gt; getTriples(final Predicate&lt;Triple&gt; filter) {
+<span class="fc" id="L148">        return stream().filter(filter);</span>
+    }
+
+    @Override
+    public void remove(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
+<span class="fc" id="L153">        Stream&lt;Triple&gt; toRemove = stream(subject, predicate, object);</span>
+<span class="fc bfc" id="L154" title="All 2 branches covered.">        for (Triple t : toRemove.collect(Collectors.toList())) {</span>
+            // Avoid ConcurrentModificationException in ArrayList
+<span class="fc" id="L156">            remove(t);</span>
+<span class="fc" id="L157">        }</span>
+<span class="fc" id="L158">    }</span>
+
+    @Override
+    public void remove(Triple triple) {
+<span class="fc" id="L162">        triples.remove(internallyMap(triple));</span>
+<span class="fc" id="L163">    }</span>
+
+    @Override
+    public long size() {
+<span class="fc" id="L167">        return triples.size();</span>
+    }
+
+    @Override
+    public String toString() {
+<span class="fc" id="L172">        String s = stream().limit(TO_STRING_MAX).map(Object::toString).collect(Collectors.joining(&quot;\n&quot;));</span>
+<span class="pc bpc" id="L173" title="1 of 2 branches missed.">        if (size() &gt; TO_STRING_MAX) {</span>
+<span class="nc" id="L174">            return s + &quot;\n# ... +&quot; + (size() - TO_STRING_MAX) + &quot; more&quot;;</span>
+        } else {
+<span class="fc" id="L176">            return s;</span>
+        }
+    }
+
+}
+</pre><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.6.201602180812</span></div></body></html>
\ No newline at end of file

Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/IRIImpl.html
==============================================================================
--- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/IRIImpl.html (added)
+++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/IRIImpl.html Wed Nov 16 10:57:28 2016
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>IRIImpl</title><script type="text/javascript" src="../.resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Commons RDF impl: Simple</a> &gt; <a href="index.html" class="el_package">org.apache.commons.rdf.simple</a> &gt; <span class="el_class">IRIImpl</span></div><h1>IRIImpl</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a"
  onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 52</td><td class="ctr2">100%</td><td class="bar">0 of 6</td><td class="ctr2">100%</td><td class="ctr1">0</td><td class="ctr2">9</td><td class="ctr1">0</td><td class="ctr
 2">14</td><td class="ctr1">0</td><td class="ctr2">6</td></tr></tfoot><tbody><tr><td id="a0"><a href="IRIImpl.java.html#L56" class="el_method">equals(Object)</a></td><td class="bar" id="b0"><img src="../.resources/greenbar.gif" width="120" height="10" title="21" alt="21"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"><img src="../.resources/greenbar.gif" width="120" height="10" title="6" alt="6"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">4</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">6</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a4"><a href="IRIImpl.java.html#L46" class="el_method">ntriplesString()</a></td><td class="bar" id="b1"><img src="../.resources/greenbar.gif" width="68" height="10" title="12" alt="12"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">1
 </td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i2">1</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a3"><a href="IRIImpl.java.html#L31" class="el_method">IRIImpl(String)</a></td><td class="bar" id="b2"><img src="../.resources/greenbar.gif" width="51" height="10" title="9" alt="9"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i1">4</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a2"><a href="IRIImpl.java.html#L68" class="el_method">hashCode()</a></td><td class="bar" id="b3"><img src="../.resources/greenbar.gif" width="22" height="10" title="4" alt="4"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h3">0</td><t
 d class="ctr2" id="i3">1</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a1"><a href="IRIImpl.java.html#L41" class="el_method">getIRIString()</a></td><td class="bar" id="b4"><img src="../.resources/greenbar.gif" width="17" height="10" title="3" alt="3"/></td><td class="ctr2" id="c4">100%</td><td class="bar" id="d4"/><td class="ctr2" id="e4">n/a</td><td class="ctr1" id="f4">0</td><td class="ctr2" id="g4">1</td><td class="ctr1" id="h4">0</td><td class="ctr2" id="i4">1</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a5"><a href="IRIImpl.java.html#L51" class="el_method">toString()</a></td><td class="bar" id="b5"><img src="../.resources/greenbar.gif" width="17" height="10" title="3" alt="3"/></td><td class="ctr2" id="c5">100%</td><td class="bar" id="d5"/><td class="ctr2" id="e5">n/a</td><td class="ctr1" id="f5">0</td><td class="ctr2" id="g5">1</td><td class="ctr1" id="h5">0</td><td class="ctr2" id="i5">1</td><td class=
 "ctr1" id="j5">0</td><td class="ctr2" id="k5">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.6.201602180812</span></div></body></html>
\ No newline at end of file

Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/IRIImpl.java.html
==============================================================================
--- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/IRIImpl.java.html (added)
+++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/IRIImpl.java.html Wed Nov 16 10:57:28 2016
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>IRIImpl.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Commons RDF impl: Simple</a> &gt; <a href="index.source.html" class="el_package">org.apache.commons.rdf.simple</a> &gt; <span class="el_source">IRIImpl.java</span></div><h1>IR
 IImpl.java</h1><pre class="source lang-java linenums">/**
+ * 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
+ * &quot;License&quot;); 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 &quot;AS IS&quot; 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.simple;
+
+import org.apache.commons.rdf.api.IRI;
+
+import java.net.URI;
+
+/**
+ * A simple implementation of IRI.
+ */
+final class IRIImpl implements IRI, SimpleRDF.SimpleRDFTerm {
+
+    private final String iri;
+
+<span class="fc" id="L31">    public IRIImpl(String iri) {</span>
+        // should throw IllegalArgumentException on most illegal IRIs
+<span class="fc" id="L33">        URI.create(iri);</span>
+        // NOTE: We don't keep the URI as it uses outdated RFC2396 and will get
+        // some IDNs wrong
+<span class="fc" id="L36">        this.iri = iri;</span>
+<span class="fc" id="L37">    }</span>
+
+    @Override
+    public String getIRIString() {
+<span class="fc" id="L41">        return iri;</span>
+    }
+
+    @Override
+    public String ntriplesString() {
+<span class="fc" id="L46">        return &quot;&lt;&quot; + getIRIString() + &quot;&gt;&quot;;</span>
+    }
+
+    @Override
+    public String toString() {
+<span class="fc" id="L51">        return ntriplesString();</span>
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+<span class="fc bfc" id="L56" title="All 2 branches covered.">        if (this == obj) {</span>
+<span class="fc" id="L57">            return true;</span>
+        }
+<span class="fc bfc" id="L59" title="All 4 branches covered.">        if (obj == null || !(obj instanceof IRI)) {</span>
+<span class="fc" id="L60">            return false;</span>
+        }
+<span class="fc" id="L62">        IRI other = (IRI) obj;</span>
+<span class="fc" id="L63">        return getIRIString().equals(other.getIRIString());</span>
+    }
+
+    @Override
+    public int hashCode() {
+<span class="fc" id="L68">        return iri.hashCode();</span>
+    }
+
+}
+</pre><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.6.201602180812</span></div></body></html>
\ No newline at end of file

Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/LiteralImpl.html
==============================================================================
--- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/LiteralImpl.html (added)
+++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.simple/LiteralImpl.html Wed Nov 16 10:57:28 2016
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>LiteralImpl</title><script type="text/javascript" src="../.resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Commons RDF impl: Simple</a> &gt; <a href="index.html" class="el_package">org.apache.commons.rdf.simple</a> &gt; <span class="el_class">LiteralImpl</span></div><h1>LiteralImpl</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sort
 able" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">52 of 221</td><td class="ctr2">76%</td><td class="bar">13 of 20</td><td class="ctr2">35%</td><td class="ctr1">9</td><td class="ctr2">20</td><td class="ctr1">8</td
 ><td class="ctr2">46</td><td class="ctr1">1</td><td class="ctr2">10</td></tr></tfoot><tbody><tr><td id="a0"><a href="LiteralImpl.java.html#L121" class="el_method">equals(Object)</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="60" height="10" title="32" alt="32"/><img src="../.resources/greenbar.gif" width="9" height="10" title="5" alt="5"/></td><td class="ctr2" id="c8">14%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="110" height="10" title="11" alt="11"/><img src="../.resources/greenbar.gif" width="10" height="10" title="1" alt="1"/></td><td class="ctr2" id="e3">8%</td><td class="ctr1" id="f0">6</td><td class="ctr2" id="g0">7</td><td class="ctr1" id="h0">5</td><td class="ctr2" id="i2">7</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a6"><a href="LiteralImpl.java.html#L43" class="el_method">LiteralImpl(String, IRI)</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="22" hei
 ght="10" title="12" alt="12"/><img src="../.resources/greenbar.gif" width="47" height="10" title="25" alt="25"/></td><td class="ctr2" id="c7">68%</td><td class="bar" id="d1"><img src="../.resources/redbar.gif" width="10" height="10" title="1" alt="1"/><img src="../.resources/greenbar.gif" width="10" height="10" title="1" alt="1"/></td><td class="ctr2" id="e1">50%</td><td class="ctr1" id="f1">1</td><td class="ctr2" id="g2">2</td><td class="ctr1" id="h1">1</td><td class="ctr2" id="i3">7</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a7"><a href="LiteralImpl.java.html#L53" class="el_method">LiteralImpl(String, String)</a></td><td class="bar" id="b2"><img src="../.resources/redbar.gif" width="9" height="10" title="5" alt="5"/><img src="../.resources/greenbar.gif" width="80" height="10" title="42" alt="42"/></td><td class="ctr2" id="c6">89%</td><td class="bar" id="d2"><img src="../.resources/redbar.gif" width="10" height="10" title="1" alt="1"/><img sr
 c="../.resources/greenbar.gif" width="10" height="10" title="1" alt="1"/></td><td class="ctr2" id="e2">50%</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g3">2</td><td class="ctr1" id="h2">1</td><td class="ctr2" id="i1">11</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a9"><a href="LiteralImpl.java.html#L111" class="el_method">toString()</a></td><td class="bar" id="b3"><img src="../.resources/redbar.gif" width="5" height="10" title="3" alt="3"/></td><td class="ctr2" id="c9">0%</td><td class="bar" id="d4"/><td class="ctr2" id="e4">n/a</td><td class="ctr1" id="f3">1</td><td class="ctr2" id="g4">1</td><td class="ctr1" id="h3">1</td><td class="ctr2" id="i5">1</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a8"><a href="LiteralImpl.java.html#L88" class="el_method">ntriplesString()</a></td><td class="bar" id="b4"><img src="../.resources/greenbar.gif" width="120" height="10" title="63" alt="63"/></td><td class=
 "ctr2" id="c0">100%</td><td class="bar" id="d3"><img src="../.resources/greenbar.gif" width="40" height="10" title="4" alt="4"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f4">0</td><td class="ctr2" id="g1">3</td><td class="ctr1" id="h4">0</td><td class="ctr2" id="i0">14</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a4"><a href="LiteralImpl.java.html#L116" class="el_method">hashCode()</a></td><td class="bar" id="b5"><img src="../.resources/greenbar.gif" width="36" height="10" title="19" alt="19"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d5"/><td class="ctr2" id="e5">n/a</td><td class="ctr1" id="f5">0</td><td class="ctr2" id="g5">1</td><td class="ctr1" id="h5">0</td><td class="ctr2" id="i6">1</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a5"><a href="LiteralImpl.java.html#L40" class="el_method">LiteralImpl(String)</a></td><td class="bar" id="b6"><img src="../.resources/greenbar
 .gif" width="9" height="10" title="5" alt="5"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d6"/><td class="ctr2" id="e6">n/a</td><td class="ctr1" id="f6">0</td><td class="ctr2" id="g6">1</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i4">2</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a2"><a href="LiteralImpl.java.html#L78" class="el_method">getLanguageTag()</a></td><td class="bar" id="b7"><img src="../.resources/greenbar.gif" width="7" height="10" title="4" alt="4"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d7"/><td class="ctr2" id="e7">n/a</td><td class="ctr1" id="f7">0</td><td class="ctr2" id="g7">1</td><td class="ctr1" id="h7">0</td><td class="ctr2" id="i7">1</td><td class="ctr1" id="j7">0</td><td class="ctr2" id="k7">1</td></tr><tr><td id="a1"><a href="LiteralImpl.java.html#L73" class="el_method">getDatatype()</a></td><td class="bar" id="b8"><img src="../.resources/greenbar.gif" width="5" height="10" 
 title="3" alt="3"/></td><td class="ctr2" id="c4">100%</td><td class="bar" id="d8"/><td class="ctr2" id="e8">n/a</td><td class="ctr1" id="f8">0</td><td class="ctr2" id="g8">1</td><td class="ctr1" id="h8">0</td><td class="ctr2" id="i8">1</td><td class="ctr1" id="j8">0</td><td class="ctr2" id="k8">1</td></tr><tr><td id="a3"><a href="LiteralImpl.java.html#L83" class="el_method">getLexicalForm()</a></td><td class="bar" id="b9"><img src="../.resources/greenbar.gif" width="5" height="10" title="3" alt="3"/></td><td class="ctr2" id="c5">100%</td><td class="bar" id="d9"/><td class="ctr2" id="e9">n/a</td><td class="ctr1" id="f9">0</td><td class="ctr2" id="g9">1</td><td class="ctr1" id="h9">0</td><td class="ctr2" id="i9">1</td><td class="ctr1" id="j9">0</td><td class="ctr2" id="k9">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.6.201602180812</span></div></body></html>
\ No newline at end of file



Mime
View raw message