Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/IRIImpl.java.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/IRIImpl.java.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/IRIImpl.java.html Wed Nov 16 11:00:15 2016 @@ -0,0 +1,65 @@ +<?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: RDF4j</a> > <a href="index.source.html" class="el_package">org.apache.commons.rdf.rdf4j.impl</a> > <span class="el_source">IRIImpl.java</span></div><h1 >IRIImpl.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 + * "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.rdf4j.impl; + +import org.apache.commons.rdf.rdf4j.RDF4JIRI; + +final class IRIImpl extends AbstractRDFTerm<org.eclipse.rdf4j.model.IRI> implements RDF4JIRI { + + IRIImpl(org.eclipse.rdf4j.model.IRI iri) { +<span class="fc" id="L25"> super(iri);</span> +<span class="fc" id="L26"> }</span> + + @Override + public boolean equals(Object obj) { +<span class="pc bpc" id="L30" title="1 of 2 branches missed."> if (obj == this) {</span> +<span class="nc" id="L31"> return true;</span> + } +<span class="pc bpc" id="L33" title="1 of 2 branches missed."> if (obj instanceof IRIImpl) {</span> +<span class="fc" id="L34"> IRIImpl impl = (IRIImpl) obj;</span> +<span class="fc" id="L35"> return asValue().equals(impl.asValue());</span> + } +<span class="nc bnc" id="L37" title="All 2 branches missed."> if (obj instanceof org.apache.commons.rdf.api.IRI) {</span> +<span class="nc" id="L38"> org.apache.commons.rdf.api.IRI iri = (org.apache.commons.rdf.api.IRI) obj;</span> +<span class="nc" id="L39"> return value.toString().equals(iri.getIRIString());</span> + } +<span class="nc" id="L41"> return false;</span> + } + + @Override + public String getIRIString() { +<span class="fc" id="L46"> return value.toString();</span> + } + + public int hashCode() { + // Same definition +<span class="fc" id="L51"> return value.hashCode();</span> + } + + @Override + public String ntriplesString() { +<span class="fc" id="L56"> return "<" + value.toString() + ">";</span> + } + + @Override + public String toString() { +<span class="fc" id="L61"> return value.toString();</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.rdf4j.impl/InternalRDF4JFactory.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/InternalRDF4JFactory.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/InternalRDF4JFactory.html Wed Nov 16 11:00:15 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>InternalRDF4JFactory</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: RDF4j</a> > <a href="index.html" class="el_package">org.apache.commons.rdf.rdf4j.impl</a> > <span class="el_class">InternalRDF4JFactory</span></div><h1>InternalRDF4JFactory</h1><table class="coverage" cellspacing="0" id="coveragetab le"><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 54</td><td class="ctr2">100%</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">0</td><td class="ctr2">9< /td><td class="ctr1">0</td><td class="ctr2">9</td><td class="ctr1">0</td><td class="ctr2">9</td></tr></tfoot><tbody><tr><td id="a6"><a href="InternalRDF4JFactory.java.html#L167" class="el_method">createRepositoryGraphImpl(Repository, boolean, boolean, Resource[])</a></td><td class="bar" id="b0"><img src="../.resources/greenbar.gif" width="120" height="10" title="9" alt="9"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">1</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a5"><a href="InternalRDF4JFactory.java.html#L142" class="el_method">createRepositoryDatasetImpl(Repository, boolean, boolean)</a></td><td class="bar" id="b1"><img src="../.resources/greenbar.gif" width="106" height="10" title="8" alt="8"/></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="i1">1</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a0"><a href="InternalRDF4JFactory.java.html#L70" class="el_method">createBlankNodeImpl(BNode, UUID)</a></td><td class="bar" id="b2"><img src="../.resources/greenbar.gif" width="80" height="10" title="6" alt="6"/></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="i2">1</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a3"><a href="InternalRDF4JFactory.java.html#L107" class="el_method">createModelGraphImpl(Model, RDF4J)</a></td><td class="bar" id="b3"><img src="../.resources/greenbar.gif" width="80" height="10" title="6" alt="6"/></td><td class="ctr2" id="c3">100%</td><td class="b ar" 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><td class="ctr2" id="i3">1</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a4"><a href="InternalRDF4JFactory.java.html#L120" class="el_method">createQuadImpl(Statement, UUID)</a></td><td class="bar" id="b4"><img src="../.resources/greenbar.gif" width="80" height="10" title="6" alt="6"/></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="a7"><a href="InternalRDF4JFactory.java.html#L181" class="el_method">createTripleImpl(Statement, UUID)</a></td><td class="bar" id="b5"><img src="../.resources/greenbar.gif" width="80" height="10" title="6" alt="6"/></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><tr><td id="a1"><a href="InternalRDF4JFactory.java.html#L81" class="el_method">createIRIImpl(IRI)</a></td><td class="bar" id="b6"><img src="../.resources/greenbar.gif" width="66" height="10" title="5" alt="5"/></td><td class="ctr2" id="c6">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="i6">1</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a2"><a href="InternalRDF4JFactory.java.html#L92" class="el_method">createLiteralImpl(Literal)</a></td><td class="bar" id="b7"><img src="../.resources/greenbar.gif" width="66" height="10" title="5" alt="5"/></td><td class= "ctr2" id="c7">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="a8"><a href="InternalRDF4JFactory.java.html#L57" class="el_method">InternalRDF4JFactory()</a></td><td class="bar" id="b8"><img src="../.resources/greenbar.gif" width="40" height="10" title="3" alt="3"/></td><td class="ctr2" id="c8">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></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.rdf4j.impl/InternalRDF4JFactory.java.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/InternalRDF4JFactory.java.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/InternalRDF4JFactory.java.html Wed Nov 16 11:00:15 2016 @@ -0,0 +1,185 @@ +<?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>InternalRDF4JFactory.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: RDF4j</a> > <a href="index.source.html" class="el_package">org.apache.commons.rdf.rdf4j.impl</a> > <span class="el_source">InternalRDF4JFa ctory.java</span></div><h1>InternalRDF4JFactory.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 + * "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.rdf4j.impl; + +import java.util.UUID; + +import org.apache.commons.rdf.api.BlankNode; +import org.apache.commons.rdf.rdf4j.RDF4JBlankNode; +import org.apache.commons.rdf.rdf4j.RDF4JDataset; +import org.apache.commons.rdf.rdf4j.RDF4JGraph; +import org.apache.commons.rdf.rdf4j.RDF4JIRI; +import org.apache.commons.rdf.rdf4j.RDF4JLiteral; +import org.apache.commons.rdf.rdf4j.RDF4JQuad; +import org.apache.commons.rdf.rdf4j.RDF4JTerm; +import org.apache.commons.rdf.rdf4j.RDF4J; +import org.apache.commons.rdf.rdf4j.RDF4J.Option; +import org.apache.commons.rdf.rdf4j.RDF4JTriple; +import org.eclipse.rdf4j.model.BNode; +import org.eclipse.rdf4j.model.IRI; +import org.eclipse.rdf4j.model.Literal; +import org.eclipse.rdf4j.model.Model; +import org.eclipse.rdf4j.model.Resource; +import org.eclipse.rdf4j.model.Statement; +import org.eclipse.rdf4j.repository.Repository; + +/** + * Factory for {@link RDF4JTerm} instances. + * <p> + * <strong>Internal class:</strong> This "abstract" class is intended for + * internal use by Commons RDF and may change in any minor update. Use instead + * {@link RDF4J} methods like {@link RDF4J#createBlankNode()}, + * {@link RDF4J#asRDFTerm(org.eclipse.rdf4j.model.Value)} and + * {@link RDF4J#asGraph(Repository, Option...)} + * <p> + * This class exists as a <code>public</code> bridge between the packages + * {@link org.apache.commons.rdf.rdf4j} and + * {@link org.apache.commons.rdf.rdf4j.impl} by exposing the package-public + * constructors. + * + * @see RDF4J + */ +<span class="fc" id="L57">public abstract class InternalRDF4JFactory {</span> + + /** + * Construct a {@link RDF4JBlankNode} from a RDF4J {@link BNode}. + * + * @param bNode + * RDF4J {@link BNode} to adapt + * @param salt + * {@link UUID} to use for {@link BlankNode#uniqueReference()} in + * combination with {@link BNode#getID()} + * @return Adapted {@link RDF4JBlankNode} + */ + public RDF4JBlankNode createBlankNodeImpl(BNode bNode, UUID salt) { +<span class="fc" id="L70"> return new BlankNodeImpl(bNode, salt);</span> + } + + /** + * Construct a {@link RDF4JIRI} from a RDF4J {@link IRI}. + * + * @param iri + * RDF4J {@link IRI} to adapt + * @return Adapted {@link RDF4JIRI} + */ + public RDF4JIRI createIRIImpl(IRI iri) { +<span class="fc" id="L81"> return new IRIImpl(iri);</span> + } + + /** + * Construct a {@link RDF4JLiteral} from a RDF4J {@link Literal}. + * + * @param literal + * RDF4J {@link Literal} + * @return Adapted {@link RDF4JLiteral} + */ + public RDF4JLiteral createLiteralImpl(Literal literal) { +<span class="fc" id="L92"> return new LiteralImpl(literal);</span> + } + + /** + * Construct a {@link RDF4JGraph} from a RDF4J {@link Model}. + * <p> + * Changes in the graph will be reflected in the model, and vice versa. + * + * @param model + * RDF4J {@link Model} to adapt + * @param rdf4jTermFactory + * factory to use for adapting graph triples + * @return Adapted {@link RDF4JGraph} + */ + public RDF4JGraph createModelGraphImpl(Model model, RDF4J rdf4jTermFactory) { +<span class="fc" id="L107"> return new ModelGraphImpl(model, rdf4jTermFactory);</span> + } + + /** + * Construct a {@link RDF4JQuad} from a RDF4J {@link Statement}. + * + * @param statement + * RDF4J {@link Statement} to adapt + * @param salt + * {@link UUID} for adapting any {@link BNode}s + * @return Adapted {@link RDF4JQuad} + */ + public RDF4JQuad createQuadImpl(Statement statement, UUID salt) { +<span class="fc" id="L120"> return new QuadImpl(statement, salt);</span> + } + + /** + * Construct a {@link RDF4JDataset} from a RDF4J {@link Repository}. + * <p> + * Changes in the dataset will be reflected in the repsitory, and vice + * versa. + * + * @param repository + * RDF4J {@link Repository} to adapt + * @param handleInitAndShutdown + * If <code>true</code>, the {@link RDF4JDataset} will initialize + * the repository (if needed), and shut it down on + * {@link RDF4JDataset#close()}. + * @param includeInferred + * If true, any inferred quads are included in the dataset + * + * @return Adapted {@link RDF4JDataset} + */ + public RDF4JDataset createRepositoryDatasetImpl(Repository repository, boolean handleInitAndShutdown, + boolean includeInferred) { +<span class="fc" id="L142"> return new RepositoryDatasetImpl(repository, UUID.randomUUID(), handleInitAndShutdown, includeInferred);</span> + } + + /** + * Construct a {@link RDF4JGraph} from a RDF4J {@link Model}. + * <p> + * Changes in the graph will be reflected in the model, and vice versa. + * + * @param repository + * RDF4J {@link Repository} to adapt + * @param handleInitAndShutdown + * If <code>true</code>, the {@link RDF4JGraph} will initialize + * the repository (if needed), and shut it down on + * {@link RDF4JGraph#close()}. + * @param includeInferred + * If true, any inferred quads are included in the dataset + * @param contextMask + * Zero or more {@link Resource}s contexts. The array may contain + * the value <code>null</code> for the default graph - however + * care must be taken to not provide a null-array + * <code>(Resource[]) null</code>. + * @return Adapted {@link RDF4JGraph} + */ + public RDF4JGraph createRepositoryGraphImpl(Repository repository, boolean handleInitAndShutdown, + boolean includeInferred, Resource... contextMask) { +<span class="fc" id="L167"> return new RepositoryGraphImpl(repository, UUID.randomUUID(), handleInitAndShutdown, includeInferred,</span> + contextMask); + } + + /** + * Construct a {@link RDF4JTriple} from a RDF4J {@link Statement}. + * + * @param statement + * RDF4J {@link Statement} to adapt + * @param salt + * {@link UUID} for adapting any {@link BNode}s + * @return Adapted {@link RDF4JTriple} + */ + public RDF4JTriple createTripleImpl(Statement statement, UUID salt) { +<span class="fc" id="L181"> return new TripleImpl(statement, salt);</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.rdf4j.impl/LiteralImpl.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/LiteralImpl.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/LiteralImpl.html Wed Nov 16 11:00:15 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: RDF4j</a> > <a href="index.html" class="el_package">org.apache.commons.rdf.rdf4j.impl</a> > <span class="el_class">LiteralImpl</span></div><h1>LiteralImpl</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="s ortable" 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">8 of 149</td><td class="ctr2">95%</td><td class="bar">5 of 14</td><td class="ctr2">64%</td><td class="ctr1">6</td><td class="ctr2">15</td><td class="ctr1">3</t d><td class="ctr2">20</td><td class="ctr1">1</td><td class="ctr2">8</td></tr></tfoot><tbody><tr><td id="a0"><a href="LiteralImpl.java.html#L37" class="el_method">equals(Object)</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="9" height="10" title="5" alt="5"/><img src="../.resources/greenbar.gif" width="56" height="10" title="30" alt="30"/></td><td class="ctr2" id="c6">86%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="60" height="10" title="5" alt="5"/><img src="../.resources/greenbar.gif" width="60" height="10" title="5" alt="5"/></td><td class="ctr2" id="e1">50%</td><td class="ctr1" id="f0">5</td><td class="ctr2" id="g0">6</td><td class="ctr1" id="h0">2</td><td class="ctr2" id="i0">7</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a7"><a href="LiteralImpl.java.html#L83" class="el_method">toString()</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="5" height="10" title="3" alt="3"/></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="f1">1</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h1">1</td><td class="ctr2" id="i3">1</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a6"><a href="LiteralImpl.java.html#L71" class="el_method">ntriplesString()</a></td><td class="bar" id="b2"><img src="../.resources/greenbar.gif" width="120" height="10" title="64" alt="64"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d1"><img src="../.resources/greenbar.gif" width="48" height="10" title="4" alt="4"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g1">3</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i1">6</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a4"><a href="LiteralImpl.java.html#L65" class="el_method">hashCode()</a></td><td class="bar" id="b3"><img src="../ .resources/greenbar.gif" width="46" height="10" title="25" alt="25"/></td><td class="ctr2" id="c1">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><td class="ctr2" id="i4">1</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a1"><a href="LiteralImpl.java.html#L51" class="el_method">getDatatype()</a></td><td class="bar" id="b4"><img src="../.resources/greenbar.gif" width="15" height="10" title="8" alt="8"/></td><td class="ctr2" id="c2">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="i5">1</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a2"><a href="LiteralImpl.java.html#L56" class="el_method">getLanguageTag()</a></td><td class="bar" id="b5"><img src="../.resources/greenbar.gif" width="9" height="10" title="5" alt="5"/></td><td class="ctr2" id="c3">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="a3"><a href="LiteralImpl.java.html#L61" class="el_method">getLexicalForm()</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="c4">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="i7">1</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a5"><a href="LiteralImpl.java.html#L32" class="el_method">LiteralImpl(Literal)</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="c5">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="i2">2</td><td class="ctr1" id="j7">0</td><td class="ctr2" id="k7">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.rdf4j.impl/LiteralImpl.java.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/LiteralImpl.java.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/LiteralImpl.java.html Wed Nov 16 11:00:15 2016 @@ -0,0 +1,86 @@ +<?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.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: RDF4j</a> > <a href="index.source.html" class="el_package">org.apache.commons.rdf.rdf4j.impl</a> > <span class="el_source">LiteralImpl.java</span>< /div><h1>LiteralImpl.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 + * "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.rdf4j.impl; + +import java.util.Objects; +import java.util.Optional; + +import org.apache.commons.rdf.rdf4j.RDF4JLiteral; +import org.eclipse.rdf4j.model.vocabulary.XMLSchema; +import org.eclipse.rdf4j.rio.turtle.TurtleUtil; + +final class LiteralImpl extends AbstractRDFTerm<org.eclipse.rdf4j.model.Literal> implements RDF4JLiteral { + + private static final String QUOTE = "\""; + + LiteralImpl(org.eclipse.rdf4j.model.Literal literal) { +<span class="fc" id="L32"> super(literal);</span> +<span class="fc" id="L33"> }</span> + + @Override + public boolean equals(Object obj) { +<span class="pc bpc" id="L37" title="1 of 2 branches missed."> if (obj == this) {</span> +<span class="nc" id="L38"> return true;</span> + } +<span class="pc bpc" id="L40" title="1 of 2 branches missed."> if (obj instanceof org.apache.commons.rdf.api.Literal) {</span> +<span class="fc" id="L41"> org.apache.commons.rdf.api.Literal other = (org.apache.commons.rdf.api.Literal) obj;</span> +<span class="pc bpc" id="L42" title="2 of 4 branches missed."> return getLexicalForm().equals(other.getLexicalForm()) && getDatatype().equals(other.getDatatype())</span> +<span class="pc bpc" id="L43" title="1 of 2 branches missed."> && getLanguageTag().equals(other.getLanguageTag());</span> + + } +<span class="nc" id="L46"> return false;</span> + } + + @Override + public org.apache.commons.rdf.api.IRI getDatatype() { +<span class="fc" id="L51"> return new IRIImpl(value.getDatatype());</span> + } + + @Override + public Optional<String> getLanguageTag() { +<span class="fc" id="L56"> return value.getLanguage();</span> + } + + @Override + public String getLexicalForm() { +<span class="fc" id="L61"> return value.getLabel();</span> + } + + public int hashCode() { +<span class="fc" id="L65"> return Objects.hash(value.getLabel(), value.getDatatype(), value.getLanguage());</span> + } + + @Override + public String ntriplesString() { + // TODO: Use a more efficient StringBuffer +<span class="fc" id="L71"> String escaped = QUOTE + TurtleUtil.encodeString(value.getLabel()) + QUOTE;</span> +<span class="fc bfc" id="L72" title="All 2 branches covered."> if (value.getLanguage().isPresent()) {</span> +<span class="fc" id="L73"> return escaped + "@" + value.getLanguage().get();</span> + } +<span class="fc bfc" id="L75" title="All 2 branches covered."> if (value.getDatatype().equals(XMLSchema.STRING)) {</span> +<span class="fc" id="L76"> return escaped;</span> + } +<span class="fc" id="L78"> return escaped + "^^<" + TurtleUtil.encodeURIString(value.getDatatype().toString()) + ">";</span> + } + + @Override + public String toString() { +<span class="nc" id="L83"> return ntriplesString();</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.rdf4j.impl/ModelGraphImpl$1.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/ModelGraphImpl$1.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/ModelGraphImpl$1.html Wed Nov 16 11:00:15 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>ModelGraphImpl.new ClosableIterable() {...}</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: RDF4j</a> > <a href="index.html" class="el_package">org.apache.commons.rdf.rdf4j.impl</a> > <span class="el_class">ModelGraphImpl.new ClosableIterable() {...}</span></div><h1>ModelGraphImpl.new ClosableIterabl e() {...}</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 29</td><td class="ctr2">100%</td><td class="bar">0 of 0</t d><td class="ctr2">n/a</td><td class="ctr1">0</td><td class="ctr2">3</td><td class="ctr1">0</td><td class="ctr2">4</td><td class="ctr1">0</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a2"><a href="ModelGraphImpl.java.html#L131" class="el_method">{...}</a></td><td class="bar" id="b0"><img src="../.resources/greenbar.gif" width="120" height="10" title="15" alt="15"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i1">1</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a1"><a href="ModelGraphImpl.java.html#L136" class="el_method">iterator()</a></td><td class="bar" id="b1"><img src="../.resources/greenbar.gif" width="104" height="10" title="13" alt="13"/></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="i0">2</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a0"><a href="ModelGraphImpl.java.html#L143" class="el_method">close()</a></td><td class="bar" id="b2"><img src="../.resources/greenbar.gif" width="8" height="10" title="1" alt="1"/></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="i2">1</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">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.rdf4j.impl/ModelGraphImpl.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/ModelGraphImpl.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/ModelGraphImpl.html Wed Nov 16 11:00:15 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>ModelGraphImpl</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: RDF4j</a> > <a href="index.html" class="el_package">org.apache.commons.rdf.rdf4j.impl</a> > <span class="el_class">ModelGraphImpl</span></div><h1>ModelGraphImpl</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">13 of 177</td><td class="ctr2">93%</td><td class="bar">1 of 2</td><td class="ctr2">50%</td><td class="ctr1">4</td><td class="ctr2">17</td><td class="c tr1">4</td><td class="ctr2">32</td><td class="ctr1">3</td><td class="ctr2">16</td></tr></tfoot><tbody><tr><td id="a13"><a href="ModelGraphImpl.java.html#L99" class="el_method">size()</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="21" height="10" title="5" alt="5"/><img src="../.resources/greenbar.gif" width="42" height="10" title="10" alt="10"/></td><td class="ctr2" id="c12">67%</td><td class="bar" id="d0"><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="e0">50%</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">2</td><td class="ctr1" id="h0">1</td><td class="ctr2" id="i0">4</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a2"><a href="ModelGraphImpl.java.html#L62" class="el_method">asModel()</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="17" height="10 " title="4" alt="4"/></td><td class="ctr2" id="c13">0%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">1</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">1</td><td class="ctr2" id="i9">1</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a3"><a href="ModelGraphImpl.java.html#L67" class="el_method">asRepository()</a></td><td class="bar" id="b2"><img src="../.resources/redbar.gif" width="8" height="10" title="2" alt="2"/></td><td class="ctr2" id="c14">0%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">1</td><td class="ctr2" id="i10">1</td><td class="ctr1" id="j1">1</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a7"><a href="ModelGraphImpl.java.html#L125" class="el_method">getContextMask()</a></td><td class="bar" id="b3"><img src="../.resources/redbar.gif" width="8" height="10" title="2" alt="2"/></td ><td class="ctr2" id="c15">0%</td><td class="bar" id="d3"/><td class="ctr2" >id="e3">n/a</td><td class="ctr1" id="f3">1</td><td class="ctr2" >id="g3">1</td><td class="ctr1" id="h3">1</td><td class="ctr2" >id="i11">1</td><td class="ctr1" id="j2">1</td><td class="ctr2" >id="k3">1</td></tr><tr><td id="a15"><a href="ModelGraphImpl.java.html#L117" >class="el_method">stream(BlankNodeOrIRI, IRI, RDFTerm)</a></td><td >class="bar" id="b4"><img src="../.resources/greenbar.gif" width="120" >height="10" title="28" alt="28"/></td><td class="ctr2" id="c0">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="i2">3</td><td class="ctr1" >id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a0"><a >href="ModelGraphImpl.java.html#L52" class="el_method">add(BlankNodeOrIRI, >IRI, RDFTerm)</a></td><td class="bar" id="b5"><img >src="../.resources/greenbar.gif" width="90" height="10 " title="21" alt="21"/></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="i3">3</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a11"><a href="ModelGraphImpl.java.html#L88" class="el_method">remove(BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b6"><img src="../.resources/greenbar.gif" width="90" height="10" title="21" alt="21"/></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">3</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a5"><a href="ModelGraphImpl.java.html#L77" class="el_method">contains(BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b7"><img src="../.resources/green bar.gif" width="85" height="10" title="20" alt="20"/></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="i5">2</td><td class="ctr1" id="j7">0</td><td class="ctr2" id="k7">1</td></tr><tr><td id="a14"><a href="ModelGraphImpl.java.html#L111" class="el_method">stream()</a></td><td class="bar" id="b8"><img src="../.resources/greenbar.gif" width="47" 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="i12">1</td><td class="ctr1" id="j8">0</td><td class="ctr2" id="k8">1</td></tr><tr><td id="a10"><a href="ModelGraphImpl.java.html#L45" class="el_method">ModelGraphImpl(Model, RDF4J)</a></td><td class="bar" id="b9"><img src="../.resources/greenbar.g if" width="38" height="10" title="9" alt="9"/></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="i1">4</td><td class="ctr1" id="j9">0</td><td class="ctr2" id="k9">1</td></tr><tr><td id="a1"><a href="ModelGraphImpl.java.html#L58" class="el_method">add(Triple)</a></td><td class="bar" id="b10"><img src="../.resources/greenbar.gif" width="38" 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="i6">2</td><td class="ctr1" id="j10">0</td><td class="ctr2" id="k10">1</td></tr><tr><td id="a12"><a href="ModelGraphImpl.java.html#L94" class="el_method">remove(Triple)</a></td><td class="bar" id="b11"><img src="../.resources/greenbar.gif" width="38" height="10" title="9" alt="9"/></td><td class="ctr2" id="c7">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="i7">2</td><td class="ctr1" id="j11">0</td><td class="ctr2" id="k11">1</td></tr><tr><td id="a6"><a href="ModelGraphImpl.java.html#L83" class="el_method">contains(Triple)</a></td><td class="bar" id="b12"><img src="../.resources/greenbar.gif" width="34" height="10" title="8" alt="8"/></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="a9"><a href="ModelGraphImpl.java.html#L131" class="el_method">iterate(BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b13"><img src="../.resources/gr eenbar.gif" width="34" height="10" title="8" alt="8"/></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="a8"><a href="ModelGraphImpl.java.html#L149" class="el_method">iterate()</a></td><td class="bar" id="b14"><img src="../.resources/greenbar.gif" width="25" 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="a4"><a href="ModelGraphImpl.java.html#L72" class="el_method">clear()</a></td><td class="bar" id="b15"><img src="../.resources/greenbar.gif" w idth="17" height="10" title="4" alt="4"/></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="i8">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.rdf4j.impl/ModelGraphImpl.java.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/ModelGraphImpl.java.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/ModelGraphImpl.java.html Wed Nov 16 11:00:15 2016 @@ -0,0 +1,153 @@ +<?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>ModelGraphImpl.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: RDF4j</a> > <a href="index.source.html" class="el_package">org.apache.commons.rdf.rdf4j.impl</a> > <span class="el_source">ModelGraphImpl.java</ span></div><h1>ModelGraphImpl.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 + * "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.rdf4j.impl; + +import java.util.Collections; +import java.util.ConcurrentModificationException; +import java.util.Iterator; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Stream; + +import org.apache.commons.rdf.api.BlankNodeOrIRI; +import org.apache.commons.rdf.api.IRI; +import org.apache.commons.rdf.api.RDFTerm; +import org.apache.commons.rdf.api.Triple; +import org.apache.commons.rdf.rdf4j.ClosableIterable; +import org.apache.commons.rdf.rdf4j.RDF4JBlankNodeOrIRI; +import org.apache.commons.rdf.rdf4j.RDF4JGraph; +import org.apache.commons.rdf.rdf4j.RDF4J; +import org.apache.commons.rdf.rdf4j.RDF4JTriple; +import org.eclipse.rdf4j.model.Model; +import org.eclipse.rdf4j.model.Resource; +import org.eclipse.rdf4j.repository.Repository; + +final class ModelGraphImpl implements RDF4JGraph { + + private Model model; + private RDF4J rdf4jTermFactory; + +<span class="fc" id="L45"> ModelGraphImpl(Model model, RDF4J rdf4jTermFactory) {</span> +<span class="fc" id="L46"> this.model = model;</span> +<span class="fc" id="L47"> this.rdf4jTermFactory = rdf4jTermFactory;</span> +<span class="fc" id="L48"> }</span> + + @Override + public void add(BlankNodeOrIRI subject, org.apache.commons.rdf.api.IRI predicate, RDFTerm object) { +<span class="fc" id="L52"> model.add((Resource) rdf4jTermFactory.asValue(subject),</span> +<span class="fc" id="L53"> (org.eclipse.rdf4j.model.IRI) rdf4jTermFactory.asValue(predicate), rdf4jTermFactory.asValue(object));</span> +<span class="fc" id="L54"> }</span> + + @Override + public void add(Triple triple) { +<span class="fc" id="L58"> model.add(rdf4jTermFactory.asStatement(triple));</span> +<span class="fc" id="L59"> }</span> + + public Optional<Model> asModel() { +<span class="nc" id="L62"> return Optional.of(model);</span> + } + + @Override + public Optional<Repository> asRepository() { +<span class="nc" id="L67"> return Optional.empty();</span> + } + + @Override + public void clear() { +<span class="fc" id="L72"> model.clear();</span> +<span class="fc" id="L73"> }</span> + + @Override + public boolean contains(BlankNodeOrIRI subject, org.apache.commons.rdf.api.IRI predicate, RDFTerm object) { +<span class="fc" id="L77"> return model.contains((Resource) rdf4jTermFactory.asValue(subject),</span> +<span class="fc" id="L78"> (org.eclipse.rdf4j.model.IRI) rdf4jTermFactory.asValue(predicate), rdf4jTermFactory.asValue(object));</span> + } + + @Override + public boolean contains(Triple triple) { +<span class="fc" id="L83"> return model.contains(rdf4jTermFactory.asStatement(triple));</span> + } + + @Override + public void remove(BlankNodeOrIRI subject, org.apache.commons.rdf.api.IRI predicate, RDFTerm object) { +<span class="fc" id="L88"> model.remove((Resource) rdf4jTermFactory.asValue(subject),</span> +<span class="fc" id="L89"> (org.eclipse.rdf4j.model.IRI) rdf4jTermFactory.asValue(predicate), rdf4jTermFactory.asValue(object));</span> +<span class="fc" id="L90"> }</span> + + @Override + public void remove(Triple triple) { +<span class="fc" id="L94"> model.remove(rdf4jTermFactory.asStatement(triple));</span> +<span class="fc" id="L95"> }</span> + + @Override + public long size() { +<span class="fc" id="L99"> int size = model.size();</span> +<span class="pc bpc" id="L100" title="1 of 2 branches missed."> if (size < Integer.MAX_VALUE) {</span> +<span class="fc" id="L101"> return size;</span> + } else { + // TODO: Check if this can really happen with RDF4J models + // Collection.size() can't help us, we'll have to count +<span class="nc" id="L105"> return model.parallelStream().count();</span> + } + } + + @Override + public Stream<RDF4JTriple> stream() { +<span class="fc" id="L111"> return model.parallelStream().map(rdf4jTermFactory::asTriple);</span> + } + + @Override + public Stream<RDF4JTriple> stream(BlankNodeOrIRI subject, org.apache.commons.rdf.api.IRI predicate, + RDFTerm object) { +<span class="fc" id="L117"> return model.filter((Resource) rdf4jTermFactory.asValue(subject),</span> +<span class="fc" id="L118"> (org.eclipse.rdf4j.model.IRI) rdf4jTermFactory.asValue(predicate), rdf4jTermFactory.asValue(object))</span> +<span class="fc" id="L119"> .parallelStream().map(rdf4jTermFactory::asTriple);</span> + } + + @Override + public Set<RDF4JBlankNodeOrIRI> getContextMask() { + // ModelGraph always do the unionGraph +<span class="nc" id="L125"> return Collections.emptySet();</span> + // TODO: Should we support contextMask like in RepositoryGraphImpl? + } + + @Override + public ClosableIterable<Triple> iterate(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) { +<span class="fc" id="L131"> return new ClosableIterable<Triple>() {</span> + @SuppressWarnings("unchecked") + @Override + public Iterator<Triple> iterator() { + // double-cast to fight Java generics.. +<span class="fc" id="L136"> Stream<? extends Triple> s = stream(subject, predicate, object);</span> +<span class="fc" id="L137"> return (Iterator<Triple>) s.iterator();</span> + } + + @Override + public void close() throws Exception { + // no-op as Model don't have transaction +<span class="fc" id="L143"> }</span> + }; + } + + @Override + public ClosableIterable<Triple> iterate() throws ConcurrentModificationException, IllegalStateException { +<span class="fc" id="L149"> return iterate(null, null, null);</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.rdf4j.impl/QuadImpl.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/QuadImpl.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/QuadImpl.html Wed Nov 16 11:00:15 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>QuadImpl</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: RDF4j</a> > <a href="index.html" class="el_package">org.apache.commons.rdf.rdf4j.impl</a> > <span class="el_class">QuadImpl</span></div><h1>QuadImpl</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">42 of 135</td><td class="ctr2">69%</td><td class="bar">8 of 14</td><td class="ctr2">43%</td><td class="ctr1">9</td><td class="ctr2">17</td><td class="ctr1">6</td><td cl ass="ctr2">25</td><td class="ctr1">2</td><td class="ctr2">10</td></tr></tfoot><tbody><tr><td id="a7"><a href="QuadImpl.java.html#L90" class="el_method">hashCode()</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="110" height="10" title="33" alt="33"/></td><td class="ctr2" id="c8">0%</td><td class="bar" id="d1"><img src="../.resources/redbar.gif" width="24" height="10" title="2" alt="2"/></td><td class="ctr2" id="e2">0%</td><td class="ctr1" id="f1">2</td><td class="ctr2" id="g1">2</td><td class="ctr1" id="h0">3</td><td class="ctr2" id="i3">3</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a9"><a href="QuadImpl.java.html#L98" class="el_method">toString()</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="13" height="10" title="4" alt="4"/></td><td class="ctr2" id="c9">0%</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g3">1</td><td class ="ctr1" id="h1">1</td><td class="ctr2" id="i4">1</td><td class="ctr1" id="j1">1</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a2"><a href="QuadImpl.java.html#L54" class="el_method">equals(Object)</a></td><td class="bar" id="b2"><img src="../.resources/redbar.gif" width="10" height="10" title="3" alt="3"/><img src="../.resources/greenbar.gif" width="110" height="10" title="33" alt="33"/></td><td class="ctr2" id="c6">92%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="60" height="10" title="5" alt="5"/><img src="../.resources/greenbar.gif" width="60" height="10" title="5" alt="5"/></td><td class="ctr2" id="e0">50%</td><td class="ctr1" id="f0">5</td><td class="ctr2" id="g0">6</td><td class="ctr1" id="h2">1</td><td class="ctr2" id="i0">7</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a3"><a href="QuadImpl.java.html#L66" class="el_method">getGraphName()</a></td><td class="bar" id="b3"><img src="../.resources/redbar.gif" wid th="6" height="10" title="2" alt="2"/><img src="../.resources/greenbar.gif" width="50" height="10" title="15" alt="15"/></td><td class="ctr2" id="c7">88%</td><td class="bar" id="d2"><img src="../.resources/redbar.gif" width="12" height="10" title="1" alt="1"/><img src="../.resources/greenbar.gif" width="12" height="10" title="1" alt="1"/></td><td class="ctr2" id="e1">50%</td><td class="ctr1" id="f3">1</td><td class="ctr2" id="g2">2</td><td class="ctr1" id="h3">1</td><td class="ctr2" id="i2">4</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a8"><a href="QuadImpl.java.html#L33" class="el_method">QuadImpl(Statement, UUID)</a></td><td class="bar" id="b4"><img src="../.resources/greenbar.gif" width="40" height="10" title="12" alt="12"/></td><td class="ctr2" id="c0">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="i1">5</td> <td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a1"><a href="QuadImpl.java.html#L49" class="el_method">asTriple()</a></td><td class="bar" id="b5"><img src="../.resources/greenbar.gif" width="26" height="10" title="8" alt="8"/></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="i5">1</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a6"><a href="QuadImpl.java.html#L85" class="el_method">getSubject()</a></td><td class="bar" id="b6"><img src="../.resources/greenbar.gif" width="26" height="10" title="8" alt="8"/></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="i6">1</td><td class="ctr1" id="j6">0</td><td clas s="ctr2" id="k6">1</td></tr><tr><td id="a4"><a href="QuadImpl.java.html#L75" class="el_method">getObject()</a></td><td class="bar" id="b7"><img src="../.resources/greenbar.gif" width="23" height="10" title="7" alt="7"/></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="a5"><a href="QuadImpl.java.html#L80" class="el_method">getPredicate()</a></td><td class="bar" id="b8"><img src="../.resources/greenbar.gif" width="23" height="10" title="7" alt="7"/></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="a0"><a href="QuadImpl.java.html#L44" class="el_method">asStatement()</a></td><td class="bar" id="b9"><img src="../.resources/greenbar.gif" width="10" 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 Added: websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/QuadImpl.java.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/QuadImpl.java.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/QuadImpl.java.html Wed Nov 16 11:00:15 2016 @@ -0,0 +1,101 @@ +<?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>QuadImpl.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: RDF4j</a> > <a href="index.source.html" class="el_package">org.apache.commons.rdf.rdf4j.impl</a> > <span class="el_source">QuadImpl.java</span></div>< h1>QuadImpl.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 + * "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.rdf4j.impl; + +import java.util.Objects; +import java.util.Optional; +import java.util.UUID; + +import org.apache.commons.rdf.api.BlankNodeOrIRI; +import org.apache.commons.rdf.api.Quad; +import org.apache.commons.rdf.api.RDFTerm; +import org.apache.commons.rdf.api.Triple; +import org.apache.commons.rdf.rdf4j.RDF4JQuad; +import org.apache.commons.rdf.rdf4j.RDF4J; +import org.eclipse.rdf4j.model.Statement; + +final class QuadImpl implements Quad, RDF4JQuad { +<span class="fc" id="L33"> private transient int hashCode = 0;</span> + private UUID salt; + private final Statement statement; + +<span class="fc" id="L37"> QuadImpl(Statement statement, UUID salt) {</span> +<span class="fc" id="L38"> this.statement = statement;</span> +<span class="fc" id="L39"> this.salt = salt;</span> +<span class="fc" id="L40"> }</span> + + @Override + public Statement asStatement() { +<span class="fc" id="L44"> return statement;</span> + } + + @Override + public Triple asTriple() { +<span class="fc" id="L49"> return new TripleImpl(statement, salt);</span> + } + + @Override + public boolean equals(Object obj) { +<span class="pc bpc" id="L54" title="1 of 2 branches missed."> if (obj instanceof Quad) {</span> +<span class="fc" id="L55"> Quad quad = (Quad) obj;</span> +<span class="pc bpc" id="L56" title="1 of 2 branches missed."> return getGraphName().equals(quad.getGraphName()) &&</span> +<span class="pc bpc" id="L57" title="1 of 2 branches missed."> getSubject().equals(quad.getSubject()) && </span> +<span class="pc bpc" id="L58" title="1 of 2 branches missed."> getPredicate().equals(quad.getPredicate()) &&</span> +<span class="pc bpc" id="L59" title="1 of 2 branches missed."> getObject().equals(quad.getObject());</span> + } +<span class="nc" id="L61"> return false;</span> + } + + @Override + public Optional<BlankNodeOrIRI> getGraphName() { +<span class="pc bpc" id="L66" title="1 of 2 branches missed."> if (statement.getContext() == null) {</span> +<span class="nc" id="L67"> return Optional.empty();</span> + } +<span class="fc" id="L69"> BlankNodeOrIRI g = (BlankNodeOrIRI) RDF4J.asRDFTerm(statement.getContext(), salt);</span> +<span class="fc" id="L70"> return Optional.of(g);</span> + } + + @Override + public RDFTerm getObject() { +<span class="fc" id="L75"> return RDF4J.asRDFTerm(statement.getObject(), salt);</span> + } + + @Override + public org.apache.commons.rdf.api.IRI getPredicate() { +<span class="fc" id="L80"> return (org.apache.commons.rdf.api.IRI) RDF4J.asRDFTerm(statement.getPredicate(), null);</span> + } + + @Override + public BlankNodeOrIRI getSubject() { +<span class="fc" id="L85"> return (BlankNodeOrIRI) RDF4J.asRDFTerm(statement.getSubject(), salt);</span> + } + + @Override + public int hashCode() { +<span class="nc bnc" id="L90" title="All 2 branches missed."> if (hashCode != 0) {</span> +<span class="nc" id="L91"> return hashCode;</span> + } +<span class="nc" id="L93"> return hashCode = Objects.hash(getSubject(), getPredicate(), getObject(), getGraphName());</span> + } + + @Override + public String toString() { +<span class="nc" id="L98"> return statement.toString();</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.rdf4j.impl/RepositoryDatasetImpl.html ============================================================================== --- websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/RepositoryDatasetImpl.html (added) +++ websites/production/commonsrdf/content/jacoco/org.apache.commons.rdf.rdf4j.impl/RepositoryDatasetImpl.html Wed Nov 16 11:00:15 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>RepositoryDatasetImpl</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: RDF4j</a> > <a href="index.html" class="el_package">org.apache.commons.rdf.rdf4j.impl</a> > <span class="el_class">RepositoryDatasetImpl</span></div><h1>RepositoryDatasetImpl</h1><table class="coverage" cellspacing="0" id="coverage table"><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">259 of 716</td><td class="ctr2">64%</td><td class="bar">52 of 72</td><td class="ctr2">28%</td><td class="ctr1">36</td><td class=" ctr2">55</td><td class="ctr1">3</td><td class="ctr2">85</td><td class="ctr1">1</td><td class="ctr2">19</td></tr></tfoot><tbody><tr><td id="a16"><a href="RepositoryDatasetImpl.java.html#L84" class="el_method">size()</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="51" height="10" title="34" alt="34"/><img src="../.resources/greenbar.gif" width="31" height="10" title="21" alt="21"/></td><td class="ctr2" id="c17">38%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="84" height="10" title="7" alt="7"/><img src="../.resources/greenbar.gif" width="36" height="10" title="3" alt="3"/></td><td class="ctr2" id="e1">30%</td><td class="ctr1" id="f0">5</td><td class="ctr2" id="g0">6</td><td class="ctr1" id="h0">1</td><td class="ctr2" id="i7">5</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a0"><a href="RepositoryDatasetImpl.java.html#L96" class="el_method">add(BlankNodeOrIRI, BlankNodeOrIRI, IRI, RDFTerm)</a></td> <td class="bar" id="b1"><img src="../.resources/redbar.gif" width="45" height="10" title="30" alt="30"/><img src="../.resources/greenbar.gif" width="74" height="10" title="49" alt="49"/></td><td class="ctr2" id="c10">62%</td><td class="bar" id="d1"><img src="../.resources/redbar.gif" width="72" height="10" title="6" alt="6"/><img src="../.resources/greenbar.gif" width="24" height="10" title="2" alt="2"/></td><td class="ctr2" id="e2">25%</td><td class="ctr1" id="f1">4</td><td class="ctr2" id="g1">5</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i1">9</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a5"><a href="RepositoryDatasetImpl.java.html#L108" class="el_method">contains(Optional, BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b2"><img src="../.resources/redbar.gif" width="45" height="10" title="30" alt="30"/><img src="../.resources/greenbar.gif" width="65" height="10" title="43" alt="43"/></td><td class="ctr2" id="c11">59%</t d><td class="bar" id="d2"><img src="../.resources/redbar.gif" width="72" height="10" title="6" alt="6"/><img src="../.resources/greenbar.gif" width="24" height="10" title="2" alt="2"/></td><td class="ctr2" id="e3">25%</td><td class="ctr1" id="f2">4</td><td class="ctr2" id="g2">5</td><td class="ctr1" id="h4">0</td><td class="ctr2" id="i3">7</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a13"><a href="RepositoryDatasetImpl.java.html#L132" class="el_method">remove(Optional, BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b3"><img src="../.resources/redbar.gif" width="45" height="10" title="30" alt="30"/><img src="../.resources/greenbar.gif" width="63" height="10" title="42" alt="42"/></td><td class="ctr2" id="c12">58%</td><td class="bar" id="d3"><img src="../.resources/redbar.gif" width="72" height="10" title="6" alt="6"/><img src="../.resources/greenbar.gif" width="24" height="10" title="2" alt="2"/></td><td class="ctr2" id="e4">25%</td><t d class="ctr1" id="f3">4</td><td class="ctr2" id="g3">5</td><td class="ctr1" id="h5">0</td><td class="ctr2" id="i2">9</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a6"><a href="RepositoryDatasetImpl.java.html#L59" class="el_method">contains(Quad)</a></td><td class="bar" id="b4"><img src="../.resources/redbar.gif" width="45" height="10" title="30" alt="30"/><img src="../.resources/greenbar.gif" width="39" height="10" title="26" alt="26"/></td><td class="ctr2" id="c13">46%</td><td class="bar" id="d4"><img src="../.resources/redbar.gif" width="72" height="10" title="6" alt="6"/><img src="../.resources/greenbar.gif" width="24" height="10" title="2" alt="2"/></td><td class="ctr2" id="e5">25%</td><td class="ctr1" id="f4">4</td><td class="ctr2" id="g4">5</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i10">4</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a1"><a href="RepositoryDatasetImpl.java.html#L50" class= "el_method">add(Quad)</a></td><td class="bar" id="b5"><img src="../.resources/redbar.gif" width="45" height="10" title="30" alt="30"/><img src="../.resources/greenbar.gif" width="37" height="10" title="25" alt="25"/></td><td class="ctr2" id="c14">45%</td><td class="bar" id="d5"><img src="../.resources/redbar.gif" width="72" height="10" title="6" alt="6"/><img src="../.resources/greenbar.gif" width="24" height="10" title="2" alt="2"/></td><td class="ctr2" id="e6">25%</td><td class="ctr1" id="f5">4</td><td class="ctr2" id="g5">5</td><td class="ctr1" id="h7">0</td><td class="ctr2" id="i4">6</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a14"><a href="RepositoryDatasetImpl.java.html#L67" class="el_method">remove(Quad)</a></td><td class="bar" id="b6"><img src="../.resources/redbar.gif" width="45" height="10" title="30" alt="30"/><img src="../.resources/greenbar.gif" width="37" height="10" title="25" alt="25"/></td><td class="ctr2" id="c15">45%</td><td class="bar" id="d6"><img src="../.resources/redbar.gif" width="72" height="10" title="6" alt="6"/><img src="../.resources/greenbar.gif" width="24" height="10" title="2" alt="2"/></td><td class="ctr2" id="e7">25%</td><td class="ctr1" id="f6">4</td><td class="ctr2" id="g6">5</td><td class="ctr1" id="h8">0</td><td class="ctr2" id="i5">6</td><td class="ctr1" id="j7">0</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a4"><a href="RepositoryDatasetImpl.java.html#L76" class="el_method">clear()</a></td><td class="bar" id="b7"><img src="../.resources/redbar.gif" width="45" height="10" title="30" alt="30"/><img src="../.resources/greenbar.gif" width="28" height="10" title="19" alt="19"/></td><td class="ctr2" id="c16">39%</td><td class="bar" id="d7"><img src="../.resources/redbar.gif" width="72" height="10" title="6" alt="6"/><img src="../.resources/greenbar.gif" width="24" height="10" title="2" alt="2"/></td><td class="ctr2" id="e8">25%</td><td class="ctr1" id="f7">4</td><td class="ctr2" i d="g7">5</td><td class="ctr1" id="h9">0</td><td class="ctr2" id="i8">5</td><td class="ctr1" id="j8">0</td><td class="ctr2" id="k7">1</td></tr><tr><td id="a18"><a href="RepositoryDatasetImpl.java.html#L151" class="el_method">stream(Optional, BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b8"><img src="../.resources/redbar.gif" width="15" height="10" title="10" alt="10"/><img src="../.resources/greenbar.gif" width="85" height="10" title="56" alt="56"/></td><td class="ctr2" id="c9">85%</td><td class="bar" id="d8"><img src="../.resources/redbar.gif" width="36" height="10" title="3" alt="3"/><img src="../.resources/greenbar.gif" width="12" height="10" title="1" alt="1"/></td><td class="ctr2" id="e9">25%</td><td class="ctr1" id="f8">2</td><td class="ctr2" id="g8">3</td><td class="ctr1" id="h1">1</td><td class="ctr2" id="i0">11</td><td class="ctr1" id="j9">0</td><td class="ctr2" id="k8">1</td></tr><tr><td id="a3"><a href="RepositoryDatasetImpl.java.html#L196" class="el_method">a sTripleLike(Statement)</a></td><td class="bar" id="b9"><img src="../.resources/redbar.gif" width="7" height="10" title="5" alt="5"/></td><td class="ctr2" id="c18">0%</td><td class="bar" id="d10"/><td class="ctr2" id="e10">n/a</td><td class="ctr1" id="f9">1</td><td class="ctr2" id="g10">1</td><td class="ctr1" id="h2">1</td><td class="ctr2" id="i14">1</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k9">1</td></tr><tr><td id="a11"><a href="RepositoryDatasetImpl.java.html#L186" class="el_method">iterate(Optional, BlankNodeOrIRI, IRI, RDFTerm)</a></td><td class="bar" id="b10"><img src="../.resources/greenbar.gif" width="56" height="10" title="37" alt="37"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d11"/><td class="ctr2" id="e11">n/a</td><td class="ctr1" id="f10">0</td><td class="ctr2" id="g11">1</td><td class="ctr1" id="h10">0</td><td class="ctr2" id="i9">5</td><td class="ctr1" id="j10">0</td><td class="ctr2" id="k10">1</td></tr><tr><td id="a2"><a href="Repositor yDatasetImpl.java.html#L119" class="el_method">asContexts(Optional)</a></td><td class="bar" id="b11"><img src="../.resources/greenbar.gif" width="39" height="10" title="26" alt="26"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d9"><img src="../.resources/greenbar.gif" width="24" height="10" title="2" alt="2"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f11">0</td><td class="ctr2" id="g9">2</td><td class="ctr1" id="h11">0</td><td class="ctr2" id="i6">6</td><td class="ctr1" id="j11">0</td><td class="ctr2" id="k11">1</td></tr><tr><td id="a8"><a href="RepositoryDatasetImpl.java.html#L210" class="el_method">getGraph(BlankNodeOrIRI)</a></td><td class="bar" id="b12"><img src="../.resources/greenbar.gif" width="36" height="10" title="24" alt="24"/></td><td class="ctr2" id="c2">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">2</td><td class="ctr1" id="j12">0</td><td class="ctr2" id="k12">1</td></tr><tr><td id="a9"><a href="RepositoryDatasetImpl.java.html#L218" class="el_method">getGraphNames()</a></td><td class="bar" id="b13"><img src="../.resources/greenbar.gif" width="28" height="10" title="19" alt="19"/></td><td class="ctr2" id="c3">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="i11">4</td><td class="ctr1" id="j13">0</td><td class="ctr2" id="k13">1</td></tr><tr><td id="a7"><a href="RepositoryDatasetImpl.java.html#L204" class="el_method">getGraph()</a></td><td class="bar" id="b14"><img src="../.resources/greenbar.gif" width="27" height="10" title="18" alt="18"/></td><td class="ctr2" id="c4">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 cla ss="ctr2" id="i15">1</td><td class="ctr1" id="j14">0</td><td class="ctr2" id="k14">1</td></tr><tr><td id="a15"><a href="RepositoryDatasetImpl.java.html#L45" class="el_method">RepositoryDatasetImpl(Repository, UUID, boolean, boolean)</a></td><td class="bar" id="b15"><img src="../.resources/greenbar.gif" width="10" height="10" title="7" alt="7"/></td><td class="ctr2" id="c5">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="i13">2</td><td class="ctr1" id="j15">0</td><td class="ctr2" id="k15">1</td></tr><tr><td id="a17"><a href="RepositoryDatasetImpl.java.html#L145" class="el_method">stream()</a></td><td class="bar" id="b16"><img src="../.resources/greenbar.gif" width="10" height="10" title="7" alt="7"/></td><td class="ctr2" id="c6">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="i16">1</td><td class="ctr1" id="j16">0</td><td class="ctr2" id="k16">1</td></tr><tr><td id="a10"><a href="RepositoryDatasetImpl.java.html#L180" class="el_method">iterate()</a></td><td class="bar" id="b17"><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="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="i17">1</td><td class="ctr1" id="j17">0</td><td class="ctr2" id="k17">1</td></tr><tr><td id="a12"><a href="RepositoryDatasetImpl.java.html#L220" class="el_method">lambda$getGraphNames$0(Resource)</a></td><td class="bar" id="b18"><img src="../.resources/greenbar.gif" width="9" height="10" title="6" alt="6"/></td><td class="ctr2" id="c8">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="i18">1</td><td class="ctr1" id="j18">0</td><td class="ctr2" >id="k18">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