Modified: websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jena/impl/JenaTripleImpl.html ============================================================================== --- websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jena/impl/JenaTripleImpl.html (original) +++ websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jena/impl/JenaTripleImpl.html Tue Nov 22 07:55:35 2016 @@ -38,11 +38,11 @@ <a class="jxr_linenumber" name="L30" href="#L30">30</a> <a class="jxr_linenumber" name="L31" href="#L31">31</a> <strong class="jxr_keyword">class</strong> <a href="../../../../../../org/apache/commons/rdf/jena/impl/JenaTripleImpl.html">JenaTripleImpl</a> <strong class="jxr_keyword">extends</strong> AbstractQuadLike<BlankNodeOrIRI, IRI, RDFTerm, RDFTerm> <strong class="jxr_keyword">implements</strong> <a href="../../../../../../org/apache/commons/rdf/jena/JenaTriple.html">JenaTriple</a> { <a class="jxr_linenumber" name="L32" href="#L32">32</a> -<a class="jxr_linenumber" name="L33" href="#L33">33</a> <a href="../../../../../../org/apache/commons/rdf/jena/impl/JenaTripleImpl.html">JenaTripleImpl</a>(<a href="../../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <a href="../../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <a href="../../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { +<a class="jxr_linenumber" name="L33" href="#L33">33</a> <a href="../../../../../../org/apache/commons/rdf/jena/impl/JenaTripleImpl.html">JenaTripleImpl</a>(<strong class="jxr_keyword">final</strong> <a href="../../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <strong class="jxr_keyword">final</strong> <a href="../../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <strong class="jxr_keyword">final</strong> <a href="../../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { <a class="jxr_linenumber" name="L34" href="#L34">34</a> <strong class="jxr_keyword">super</strong>(subject, predicate, object); <a class="jxr_linenumber" name="L35" href="#L35">35</a> } <a class="jxr_linenumber" name="L36" href="#L36">36</a> -<a class="jxr_linenumber" name="L37" href="#L37">37</a> <a href="../../../../../../org/apache/commons/rdf/jena/impl/JenaTripleImpl.html">JenaTripleImpl</a>(org.apache.jena.graph.Triple triple, UUID salt) <strong class="jxr_keyword">throws</strong> ConversionException { +<a class="jxr_linenumber" name="L37" href="#L37">37</a> <a href="../../../../../../org/apache/commons/rdf/jena/impl/JenaTripleImpl.html">JenaTripleImpl</a>(<strong class="jxr_keyword">final</strong> org.apache.jena.graph.Triple triple, <strong class="jxr_keyword">final</strong> UUID salt) <strong class="jxr_keyword">throws</strong> ConversionException { <a class="jxr_linenumber" name="L38" href="#L38">38</a> <strong class="jxr_keyword">super</strong>(triple, salt); <a class="jxr_linenumber" name="L39" href="#L39">39</a> <em class="jxr_comment">// Check the conversion</em> <a class="jxr_linenumber" name="L40" href="#L40">40</a> <strong class="jxr_keyword">if</strong> (!(subject instanceof BlankNodeOrIRI) || !(predicate instanceof IRI) || !(object instanceof RDFTerm)) { @@ -51,24 +51,27 @@ <a class="jxr_linenumber" name="L43" href="#L43">43</a> } <a class="jxr_linenumber" name="L44" href="#L44">44</a> <a class="jxr_linenumber" name="L45" href="#L45">45</a> @Override -<a class="jxr_linenumber" name="L46" href="#L46">46</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> equals(Object other) { -<a class="jxr_linenumber" name="L47" href="#L47">47</a> <strong class="jxr_keyword">if</strong> (other == <strong class="jxr_keyword">this</strong>) +<a class="jxr_linenumber" name="L46" href="#L46">46</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> equals(<strong class="jxr_keyword">final</strong> Object other) { +<a class="jxr_linenumber" name="L47" href="#L47">47</a> <strong class="jxr_keyword">if</strong> (other == <strong class="jxr_keyword">this</strong>) { <a class="jxr_linenumber" name="L48" href="#L48">48</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>; -<a class="jxr_linenumber" name="L49" href="#L49">49</a> <strong class="jxr_keyword">if</strong> (other == <strong class="jxr_keyword">null</strong>) -<a class="jxr_linenumber" name="L50" href="#L50">50</a> <strong class="jxr_keyword">return</strong> false; -<a class="jxr_linenumber" name="L51" href="#L51">51</a> <strong class="jxr_keyword">if</strong> (!(other instanceof Triple)) -<a class="jxr_linenumber" name="L52" href="#L52">52</a> <strong class="jxr_keyword">return</strong> false; -<a class="jxr_linenumber" name="L53" href="#L53">53</a> <a href="../../../../../../org/apache/commons/rdf/api/Triple.html">Triple</a> triple = (Triple) other; -<a class="jxr_linenumber" name="L54" href="#L54">54</a> <strong class="jxr_keyword">return</strong> getSubject().equals(triple.getSubject()) && getPredicate().equals(triple.getPredicate()) -<a class="jxr_linenumber" name="L55" href="#L55">55</a> && getObject().equals(triple.getObject()); -<a class="jxr_linenumber" name="L56" href="#L56">56</a> } -<a class="jxr_linenumber" name="L57" href="#L57">57</a> -<a class="jxr_linenumber" name="L58" href="#L58">58</a> @Override -<a class="jxr_linenumber" name="L59" href="#L59">59</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> hashCode() { -<a class="jxr_linenumber" name="L60" href="#L60">60</a> <strong class="jxr_keyword">return</strong> Objects.hash(getSubject(), getPredicate(), getObject()); -<a class="jxr_linenumber" name="L61" href="#L61">61</a> } -<a class="jxr_linenumber" name="L62" href="#L62">62</a> -<a class="jxr_linenumber" name="L63" href="#L63">63</a> } +<a class="jxr_linenumber" name="L49" href="#L49">49</a> } +<a class="jxr_linenumber" name="L50" href="#L50">50</a> <strong class="jxr_keyword">if</strong> (other == <strong class="jxr_keyword">null</strong>) { +<a class="jxr_linenumber" name="L51" href="#L51">51</a> <strong class="jxr_keyword">return</strong> false; +<a class="jxr_linenumber" name="L52" href="#L52">52</a> } +<a class="jxr_linenumber" name="L53" href="#L53">53</a> <strong class="jxr_keyword">if</strong> (!(other instanceof Triple)) { +<a class="jxr_linenumber" name="L54" href="#L54">54</a> <strong class="jxr_keyword">return</strong> false; +<a class="jxr_linenumber" name="L55" href="#L55">55</a> } +<a class="jxr_linenumber" name="L56" href="#L56">56</a> <strong class="jxr_keyword">final</strong> <a href="../../../../../../org/apache/commons/rdf/api/Triple.html">Triple</a> triple = (Triple) other; +<a class="jxr_linenumber" name="L57" href="#L57">57</a> <strong class="jxr_keyword">return</strong> getSubject().equals(triple.getSubject()) && getPredicate().equals(triple.getPredicate()) +<a class="jxr_linenumber" name="L58" href="#L58">58</a> && getObject().equals(triple.getObject()); +<a class="jxr_linenumber" name="L59" href="#L59">59</a> } +<a class="jxr_linenumber" name="L60" href="#L60">60</a> +<a class="jxr_linenumber" name="L61" href="#L61">61</a> @Override +<a class="jxr_linenumber" name="L62" href="#L62">62</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> hashCode() { +<a class="jxr_linenumber" name="L63" href="#L63">63</a> <strong class="jxr_keyword">return</strong> Objects.hash(getSubject(), getPredicate(), getObject()); +<a class="jxr_linenumber" name="L64" href="#L64">64</a> } +<a class="jxr_linenumber" name="L65" href="#L65">65</a> +<a class="jxr_linenumber" name="L66" href="#L66">66</a> } </pre> <hr/> <div id="footer">Copyright © 2015–2016 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>
Modified: websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jena/impl/package-frame.html ============================================================================== --- websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jena/impl/package-frame.html (original) +++ websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jena/impl/package-frame.html Tue Nov 22 07:55:35 2016 @@ -3,7 +3,7 @@ <html xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <title>Commons RDF 0.3.0-incubating Reference Package org.apache.commons.rdf.jena.impl</title> + <title>Commons RDF 0.4.0-incubating-SNAPSHOT Reference Package org.apache.commons.rdf.jena.impl</title> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="style" /> </head> <body> Modified: websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jena/impl/package-summary.html ============================================================================== --- websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jena/impl/package-summary.html (original) +++ websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jena/impl/package-summary.html Tue Nov 22 07:55:35 2016 @@ -3,7 +3,7 @@ <html xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <title>Commons RDF 0.3.0-incubating Reference Package org.apache.commons.rdf.jena.impl</title> + <title>Commons RDF 0.4.0-incubating-SNAPSHOT Reference Package org.apache.commons.rdf.jena.impl</title> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="style" /> </head> <body> Modified: websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jena/package-frame.html ============================================================================== --- websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jena/package-frame.html (original) +++ websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jena/package-frame.html Tue Nov 22 07:55:35 2016 @@ -3,7 +3,7 @@ <html xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <title>Commons RDF 0.3.0-incubating Reference Package org.apache.commons.rdf.jena</title> + <title>Commons RDF 0.4.0-incubating-SNAPSHOT Reference Package org.apache.commons.rdf.jena</title> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" /> </head> <body> Modified: websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jena/package-summary.html ============================================================================== --- websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jena/package-summary.html (original) +++ websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jena/package-summary.html Tue Nov 22 07:55:35 2016 @@ -3,7 +3,7 @@ <html xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <title>Commons RDF 0.3.0-incubating Reference Package org.apache.commons.rdf.jena</title> + <title>Commons RDF 0.4.0-incubating-SNAPSHOT Reference Package org.apache.commons.rdf.jena</title> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" /> </head> <body> Modified: websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.html ============================================================================== --- websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.html (original) +++ websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.html Tue Nov 22 07:55:35 2016 @@ -33,9 +33,9 @@ <a class="jxr_linenumber" name="L25" href="#L25">25</a> } <a class="jxr_linenumber" name="L26" href="#L26">26</a> <a class="jxr_linenumber" name="L27" href="#L27">27</a> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.html">JsonLdBlankNodeImpl</a> <strong class="jxr_keyword">extends</strong> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdTerm.html">JsonLdTermImpl</a> <strong class="jxr_keyword">implements</strong> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.html">JsonLdBlankNode</a> { -<a class="jxr_linenumber" name="L28" href="#L28">28</a> <strong class="jxr_keyword">private</strong> String blankNodePrefix; +<a class="jxr_linenumber" name="L28" href="#L28">28</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> String blankNodePrefix; <a class="jxr_linenumber" name="L29" href="#L29">29</a> -<a class="jxr_linenumber" name="L30" href="#L30">30</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.html">JsonLdBlankNodeImpl</a>(Node node, String blankNodePrefix) { +<a class="jxr_linenumber" name="L30" href="#L30">30</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdBlankNode.html">JsonLdBlankNodeImpl</a>(<strong class="jxr_keyword">final</strong> Node node, <strong class="jxr_keyword">final</strong> String blankNodePrefix) { <a class="jxr_linenumber" name="L31" href="#L31">31</a> <strong class="jxr_keyword">super</strong>(node); <a class="jxr_linenumber" name="L32" href="#L32">32</a> <strong class="jxr_keyword">this</strong>.blankNodePrefix = blankNodePrefix; <a class="jxr_linenumber" name="L33" href="#L33">33</a> <strong class="jxr_keyword">if</strong> (!node.isBlankNode()) { @@ -55,11 +55,11 @@ <a class="jxr_linenumber" name="L47" href="#L47">47</a> } <a class="jxr_linenumber" name="L48" href="#L48">48</a> <a class="jxr_linenumber" name="L49" href="#L49">49</a> @Override -<a class="jxr_linenumber" name="L50" href="#L50">50</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> equals(Object obj) { +<a class="jxr_linenumber" name="L50" href="#L50">50</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> equals(<strong class="jxr_keyword">final</strong> Object obj) { <a class="jxr_linenumber" name="L51" href="#L51">51</a> <strong class="jxr_keyword">if</strong> (!(obj instanceof BlankNode)) { <a class="jxr_linenumber" name="L52" href="#L52">52</a> <strong class="jxr_keyword">return</strong> false; <a class="jxr_linenumber" name="L53" href="#L53">53</a> } -<a class="jxr_linenumber" name="L54" href="#L54">54</a> <a href="../../../../../org/apache/commons/rdf/api/BlankNode.html">BlankNode</a> other = (BlankNode) obj; +<a class="jxr_linenumber" name="L54" href="#L54">54</a> <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/BlankNode.html">BlankNode</a> other = (BlankNode) obj; <a class="jxr_linenumber" name="L55" href="#L55">55</a> <strong class="jxr_keyword">return</strong> uniqueReference().equals(other.uniqueReference()); <a class="jxr_linenumber" name="L56" href="#L56">56</a> } <a class="jxr_linenumber" name="L57" href="#L57">57</a> Modified: websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdDataset.html ============================================================================== --- websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdDataset.html (original) +++ websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdDataset.html Tue Nov 22 07:55:35 2016 @@ -45,25 +45,25 @@ <a class="jxr_linenumber" name="L37" href="#L37">37</a> <a class="jxr_linenumber" name="L38" href="#L38">38</a> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdDataset.html">JsonLdDatasetImpl</a> <strong class="jxr_keyword">extends</strong> AbstractJsonLdGraphLike<org.apache.commons.rdf.api.Quad> <strong class="jxr_keyword">implements</strong> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdDataset.html">JsonLdDataset</a> { <a class="jxr_linenumber" name="L39" href="#L39">39</a> -<a class="jxr_linenumber" name="L40" href="#L40">40</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdDataset.html">JsonLdDatasetImpl</a>(RDFDataset rdfDataSet) { +<a class="jxr_linenumber" name="L40" href="#L40">40</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdDataset.html">JsonLdDatasetImpl</a>(<strong class="jxr_keyword">final</strong> RDFDataset rdfDataSet) { <a class="jxr_linenumber" name="L41" href="#L41">41</a> <strong class="jxr_keyword">super</strong>(rdfDataSet); <a class="jxr_linenumber" name="L42" href="#L42">42</a> } <a class="jxr_linenumber" name="L43" href="#L43">43</a> -<a class="jxr_linenumber" name="L44" href="#L44">44</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdDataset.html">JsonLdDatasetImpl</a>(RDFDataset rdfDataset, String bnodePrefix) { +<a class="jxr_linenumber" name="L44" href="#L44">44</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdDataset.html">JsonLdDatasetImpl</a>(<strong class="jxr_keyword">final</strong> RDFDataset rdfDataset, <strong class="jxr_keyword">final</strong> String bnodePrefix) { <a class="jxr_linenumber" name="L45" href="#L45">45</a> <strong class="jxr_keyword">super</strong>(rdfDataset, bnodePrefix); <a class="jxr_linenumber" name="L46" href="#L46">46</a> } <a class="jxr_linenumber" name="L47" href="#L47">47</a> -<a class="jxr_linenumber" name="L48" href="#L48">48</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdDataset.html">JsonLdDatasetImpl</a>(String bnodePrefix) { +<a class="jxr_linenumber" name="L48" href="#L48">48</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdDataset.html">JsonLdDatasetImpl</a>(<strong class="jxr_keyword">final</strong> String bnodePrefix) { <a class="jxr_linenumber" name="L49" href="#L49">49</a> <strong class="jxr_keyword">super</strong>(bnodePrefix); <a class="jxr_linenumber" name="L50" href="#L50">50</a> } <a class="jxr_linenumber" name="L51" href="#L51">51</a> <a class="jxr_linenumber" name="L52" href="#L52">52</a> @Override -<a class="jxr_linenumber" name="L53" href="#L53">53</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> add(<a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> graphName, <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { +<a class="jxr_linenumber" name="L53" href="#L53">53</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> add(<strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> graphName, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { <a class="jxr_linenumber" name="L54" href="#L54">54</a> <strong class="jxr_keyword">super</strong>.add(graphName, subject, predicate, object); <a class="jxr_linenumber" name="L55" href="#L55">55</a> } <a class="jxr_linenumber" name="L56" href="#L56">56</a> <a class="jxr_linenumber" name="L57" href="#L57">57</a> @Override -<a class="jxr_linenumber" name="L58" href="#L58">58</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> contains(Optional<BlankNodeOrIRI> graphName, <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { +<a class="jxr_linenumber" name="L58" href="#L58">58</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> contains(<strong class="jxr_keyword">final</strong> Optional<BlankNodeOrIRI> graphName, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { <a class="jxr_linenumber" name="L59" href="#L59">59</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">super</strong>.contains(graphName, subject, predicate, object); <a class="jxr_linenumber" name="L60" href="#L60">60</a> } <a class="jxr_linenumber" name="L61" href="#L61">61</a> @@ -73,7 +73,7 @@ <a class="jxr_linenumber" name="L65" href="#L65">65</a> } <a class="jxr_linenumber" name="L66" href="#L66">66</a> <a class="jxr_linenumber" name="L67" href="#L67">67</a> @Override -<a class="jxr_linenumber" name="L68" href="#L68">68</a> <strong class="jxr_keyword">public</strong> Optional<Graph> getGraph(<a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> graphName) { +<a class="jxr_linenumber" name="L68" href="#L68">68</a> <strong class="jxr_keyword">public</strong> Optional<Graph> getGraph(<strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> graphName) { <a class="jxr_linenumber" name="L69" href="#L69">69</a> <strong class="jxr_keyword">if</strong> (graphName == <strong class="jxr_keyword">null</strong>) { <a class="jxr_linenumber" name="L70" href="#L70">70</a> <strong class="jxr_keyword">return</strong> Optional.of(getGraph()); <a class="jxr_linenumber" name="L71" href="#L71">71</a> } @@ -89,18 +89,18 @@ <a class="jxr_linenumber" name="L81" href="#L81">81</a> } <a class="jxr_linenumber" name="L82" href="#L82">82</a> <a class="jxr_linenumber" name="L83" href="#L83">83</a> @Override -<a class="jxr_linenumber" name="L84" href="#L84">84</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> remove(Optional<BlankNodeOrIRI> graphName, <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { +<a class="jxr_linenumber" name="L84" href="#L84">84</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> remove(<strong class="jxr_keyword">final</strong> Optional<BlankNodeOrIRI> graphName, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { <a class="jxr_linenumber" name="L85" href="#L85">85</a> <strong class="jxr_keyword">super</strong>.remove(graphName, subject, predicate, object); <a class="jxr_linenumber" name="L86" href="#L86">86</a> } <a class="jxr_linenumber" name="L87" href="#L87">87</a> <a class="jxr_linenumber" name="L88" href="#L88">88</a> @Override -<a class="jxr_linenumber" name="L89" href="#L89">89</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> remove(<a href="../../../../../org/apache/commons/rdf/api/Quad.html">Quad</a> q) { +<a class="jxr_linenumber" name="L89" href="#L89">89</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> remove(<strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/Quad.html">Quad</a> q) { <a class="jxr_linenumber" name="L90" href="#L90">90</a> remove(q.getGraphName(), q.getSubject(), q.getPredicate(), q.getObject()); <a class="jxr_linenumber" name="L91" href="#L91">91</a> } <a class="jxr_linenumber" name="L92" href="#L92">92</a> <a class="jxr_linenumber" name="L93" href="#L93">93</a> @Override -<a class="jxr_linenumber" name="L94" href="#L94">94</a> <strong class="jxr_keyword">public</strong> Stream<? <strong class="jxr_keyword">extends</strong> Quad> stream(Optional<BlankNodeOrIRI> graphName, <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, -<a class="jxr_linenumber" name="L95" href="#L95">95</a> <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { +<a class="jxr_linenumber" name="L94" href="#L94">94</a> <strong class="jxr_keyword">public</strong> Stream<? <strong class="jxr_keyword">extends</strong> Quad> stream(<strong class="jxr_keyword">final</strong> Optional<BlankNodeOrIRI> graphName, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, +<a class="jxr_linenumber" name="L95" href="#L95">95</a> <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { <a class="jxr_linenumber" name="L96" href="#L96">96</a> <strong class="jxr_keyword">return</strong> filteredGraphs(graphName).flatMap(List::stream).filter(quadFilter(subject, predicate, object)) <a class="jxr_linenumber" name="L97" href="#L97">97</a> .map(factory::asQuad); <a class="jxr_linenumber" name="L98" href="#L98">98</a> } @@ -112,7 +112,7 @@ <a class="jxr_linenumber" name="L104" href="#L104">104</a> } <a class="jxr_linenumber" name="L105" href="#L105">105</a> <a class="jxr_linenumber" name="L106" href="#L106">106</a> @Override -<a class="jxr_linenumber" name="L107" href="#L107">107</a> <a href="../../../../../org/apache/commons/rdf/api/Quad.html">Quad</a> asTripleOrQuad(com.github.jsonldjava.core.RDFDataset.Quad jsonldQuad) { +<a class="jxr_linenumber" name="L107" href="#L107">107</a> <a href="../../../../../org/apache/commons/rdf/api/Quad.html">Quad</a> asTripleOrQuad(<strong class="jxr_keyword">final</strong> com.github.jsonldjava.core.RDFDataset.Quad jsonldQuad) { <a class="jxr_linenumber" name="L108" href="#L108">108</a> <strong class="jxr_keyword">return</strong> factory.asQuad(jsonldQuad); <a class="jxr_linenumber" name="L109" href="#L109">109</a> } <a class="jxr_linenumber" name="L110" href="#L110">110</a> Modified: websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdGraph.html ============================================================================== --- websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdGraph.html (original) +++ websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdGraph.html Tue Nov 22 07:55:35 2016 @@ -49,17 +49,17 @@ <a class="jxr_linenumber" name="L41" href="#L41">41</a> <a class="jxr_linenumber" name="L42" href="#L42">42</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> Optional<BlankNodeOrIRI> graphName; <a class="jxr_linenumber" name="L43" href="#L43">43</a> -<a class="jxr_linenumber" name="L44" href="#L44">44</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdGraph.html">JsonLdGraphImpl</a>(RDFDataset rdfDataSet) { +<a class="jxr_linenumber" name="L44" href="#L44">44</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdGraph.html">JsonLdGraphImpl</a>(<strong class="jxr_keyword">final</strong> RDFDataset rdfDataSet) { <a class="jxr_linenumber" name="L45" href="#L45">45</a> <strong class="jxr_keyword">super</strong>(rdfDataSet); <a class="jxr_linenumber" name="L46" href="#L46">46</a> <strong class="jxr_keyword">this</strong>.graphName = Optional.empty(); <a class="jxr_linenumber" name="L47" href="#L47">47</a> } <a class="jxr_linenumber" name="L48" href="#L48">48</a> -<a class="jxr_linenumber" name="L49" href="#L49">49</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdGraph.html">JsonLdGraphImpl</a>(RDFDataset rdfDataSet, Optional<BlankNodeOrIRI> graphName, String bnodePrefix) { +<a class="jxr_linenumber" name="L49" href="#L49">49</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdGraph.html">JsonLdGraphImpl</a>(<strong class="jxr_keyword">final</strong> RDFDataset rdfDataSet, <strong class="jxr_keyword">final</strong> Optional<BlankNodeOrIRI> graphName, <strong class="jxr_keyword">final</strong> String bnodePrefix) { <a class="jxr_linenumber" name="L50" href="#L50">50</a> <strong class="jxr_keyword">super</strong>(rdfDataSet, bnodePrefix); <a class="jxr_linenumber" name="L51" href="#L51">51</a> <strong class="jxr_keyword">this</strong>.graphName = Objects.requireNonNull(graphName); <a class="jxr_linenumber" name="L52" href="#L52">52</a> } <a class="jxr_linenumber" name="L53" href="#L53">53</a> -<a class="jxr_linenumber" name="L54" href="#L54">54</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdGraph.html">JsonLdGraphImpl</a>(String bnodePrefix) { +<a class="jxr_linenumber" name="L54" href="#L54">54</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdGraph.html">JsonLdGraphImpl</a>(<strong class="jxr_keyword">final</strong> String bnodePrefix) { <a class="jxr_linenumber" name="L55" href="#L55">55</a> <strong class="jxr_keyword">super</strong>(bnodePrefix); <a class="jxr_linenumber" name="L56" href="#L56">56</a> <strong class="jxr_keyword">this</strong>.graphName = Optional.empty(); <a class="jxr_linenumber" name="L57" href="#L57">57</a> } @@ -70,51 +70,51 @@ <a class="jxr_linenumber" name="L62" href="#L62">62</a> } <a class="jxr_linenumber" name="L63" href="#L63">63</a> <a class="jxr_linenumber" name="L64" href="#L64">64</a> @Override -<a class="jxr_linenumber" name="L65" href="#L65">65</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> add(<a href="../../../../../org/apache/commons/rdf/api/Triple.html">Triple</a> t) { +<a class="jxr_linenumber" name="L65" href="#L65">65</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> add(<strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/Triple.html">Triple</a> t) { <a class="jxr_linenumber" name="L66" href="#L66">66</a> <em class="jxr_comment">// Ensure it's added in the correct graph</em> <a class="jxr_linenumber" name="L67" href="#L67">67</a> <strong class="jxr_keyword">super</strong>.add(graphName.orElse(<strong class="jxr_keyword">null</strong>), t.getSubject(), t.getPredicate(), t.getObject()); <a class="jxr_linenumber" name="L68" href="#L68">68</a> } <a class="jxr_linenumber" name="L69" href="#L69">69</a> <a class="jxr_linenumber" name="L70" href="#L70">70</a> @Override -<a class="jxr_linenumber" name="L71" href="#L71">71</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> add(<a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { +<a class="jxr_linenumber" name="L71" href="#L71">71</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> add(<strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { <a class="jxr_linenumber" name="L72" href="#L72">72</a> <strong class="jxr_keyword">super</strong>.add(graphName.orElse(<strong class="jxr_keyword">null</strong>), subject, predicate, object); <a class="jxr_linenumber" name="L73" href="#L73">73</a> } <a class="jxr_linenumber" name="L74" href="#L74">74</a> <a class="jxr_linenumber" name="L75" href="#L75">75</a> @Override -<a class="jxr_linenumber" name="L76" href="#L76">76</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> contains(<a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { +<a class="jxr_linenumber" name="L76" href="#L76">76</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> contains(<strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { <a class="jxr_linenumber" name="L77" href="#L77">77</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">super</strong>.contains(graphName, subject, predicate, object); <a class="jxr_linenumber" name="L78" href="#L78">78</a> } <a class="jxr_linenumber" name="L79" href="#L79">79</a> <a class="jxr_linenumber" name="L80" href="#L80">80</a> @Override -<a class="jxr_linenumber" name="L81" href="#L81">81</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> contains(<a href="../../../../../org/apache/commons/rdf/api/Triple.html">Triple</a> t) { +<a class="jxr_linenumber" name="L81" href="#L81">81</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> contains(<strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/Triple.html">Triple</a> t) { <a class="jxr_linenumber" name="L82" href="#L82">82</a> <strong class="jxr_keyword">return</strong> contains(graphName, t.getSubject(), t.getPredicate(), t.getObject()); <a class="jxr_linenumber" name="L83" href="#L83">83</a> } <a class="jxr_linenumber" name="L84" href="#L84">84</a> <a class="jxr_linenumber" name="L85" href="#L85">85</a> @Override -<a class="jxr_linenumber" name="L86" href="#L86">86</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> remove(<a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { +<a class="jxr_linenumber" name="L86" href="#L86">86</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> remove(<strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { <a class="jxr_linenumber" name="L87" href="#L87">87</a> <strong class="jxr_keyword">super</strong>.remove(graphName, subject, predicate, object); <a class="jxr_linenumber" name="L88" href="#L88">88</a> } <a class="jxr_linenumber" name="L89" href="#L89">89</a> <a class="jxr_linenumber" name="L90" href="#L90">90</a> @Override -<a class="jxr_linenumber" name="L91" href="#L91">91</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> remove(<a href="../../../../../org/apache/commons/rdf/api/Triple.html">Triple</a> t) { +<a class="jxr_linenumber" name="L91" href="#L91">91</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> remove(<strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/Triple.html">Triple</a> t) { <a class="jxr_linenumber" name="L92" href="#L92">92</a> <em class="jxr_comment">// Only remove from the particular graph</em> <a class="jxr_linenumber" name="L93" href="#L93">93</a> remove(graphName, t.getSubject(), t.getPredicate(), t.getObject()); <a class="jxr_linenumber" name="L94" href="#L94">94</a> } <a class="jxr_linenumber" name="L95" href="#L95">95</a> <a class="jxr_linenumber" name="L96" href="#L96">96</a> @Override <a class="jxr_linenumber" name="L97" href="#L97">97</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">long</strong> size() { -<a class="jxr_linenumber" name="L98" href="#L98">98</a> String g = graphName.map(factory::asJsonLdString).orElse(<span class="jxr_string">"@default"</span>); +<a class="jxr_linenumber" name="L98" href="#L98">98</a> <strong class="jxr_keyword">final</strong> String g = graphName.map(factory::asJsonLdString).orElse(<span class="jxr_string">"@default"</span>); <a class="jxr_linenumber" name="L99" href="#L99">99</a> <strong class="jxr_keyword">return</strong> Optional.ofNullable(rdfDataSet.getQuads(g)).map(List::size).orElse(0); <a class="jxr_linenumber" name="L100" href="#L100">100</a> } <a class="jxr_linenumber" name="L101" href="#L101">101</a> <a class="jxr_linenumber" name="L102" href="#L102">102</a> @Override -<a class="jxr_linenumber" name="L103" href="#L103">103</a> <strong class="jxr_keyword">public</strong> Stream<JsonLdTriple> stream(<a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { +<a class="jxr_linenumber" name="L103" href="#L103">103</a> <strong class="jxr_keyword">public</strong> Stream<JsonLdTriple> stream(<strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { <a class="jxr_linenumber" name="L104" href="#L104">104</a> <strong class="jxr_keyword">return</strong> filteredGraphs(graphName).flatMap(List::stream).filter(quadFilter(subject, predicate, object)) <a class="jxr_linenumber" name="L105" href="#L105">105</a> .map(factory::asTriple); <a class="jxr_linenumber" name="L106" href="#L106">106</a> } <a class="jxr_linenumber" name="L107" href="#L107">107</a> <a class="jxr_linenumber" name="L108" href="#L108">108</a> @Override -<a class="jxr_linenumber" name="L109" href="#L109">109</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdTriple.html">JsonLdTriple</a> asTripleOrQuad(com.github.jsonldjava.core.RDFDataset.Quad jsonldQuad) { +<a class="jxr_linenumber" name="L109" href="#L109">109</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdTriple.html">JsonLdTriple</a> asTripleOrQuad(<strong class="jxr_keyword">final</strong> com.github.jsonldjava.core.RDFDataset.Quad jsonldQuad) { <a class="jxr_linenumber" name="L110" href="#L110">110</a> <strong class="jxr_keyword">return</strong> factory.asTriple(jsonldQuad); <a class="jxr_linenumber" name="L111" href="#L111">111</a> } <a class="jxr_linenumber" name="L112" href="#L112">112</a> } Modified: websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdGraphLike.html ============================================================================== --- websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdGraphLike.html (original) +++ websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdGraphLike.html Tue Nov 22 07:55:35 2016 @@ -88,26 +88,26 @@ <a class="jxr_linenumber" name="L80" href="#L80">80</a> <em class="jxr_javadoccomment"> */</em> <a class="jxr_linenumber" name="L81" href="#L81">81</a> RDFDataset rdfDataSet; <a class="jxr_linenumber" name="L82" href="#L82">82</a> -<a class="jxr_linenumber" name="L83" href="#L83">83</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdGraphLike.html">AbstractJsonLdGraphLike</a>(RDFDataset rdfDataSet) { +<a class="jxr_linenumber" name="L83" href="#L83">83</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdGraphLike.html">AbstractJsonLdGraphLike</a>(<strong class="jxr_keyword">final</strong> RDFDataset rdfDataSet) { <a class="jxr_linenumber" name="L84" href="#L84">84</a> <strong class="jxr_keyword">this</strong>(rdfDataSet, <span class="jxr_string">"urn:uuid:"</span> + SALT + <span class="jxr_string">"#"</span> + <span class="jxr_string">"g"</span> + System.identityHashCode(rdfDataSet)); <a class="jxr_linenumber" name="L85" href="#L85">85</a> } <a class="jxr_linenumber" name="L86" href="#L86">86</a> -<a class="jxr_linenumber" name="L87" href="#L87">87</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdGraphLike.html">AbstractJsonLdGraphLike</a>(RDFDataset rdfDataSet, String bnodePrefix) { +<a class="jxr_linenumber" name="L87" href="#L87">87</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdGraphLike.html">AbstractJsonLdGraphLike</a>(<strong class="jxr_keyword">final</strong> RDFDataset rdfDataSet, <strong class="jxr_keyword">final</strong> String bnodePrefix) { <a class="jxr_linenumber" name="L88" href="#L88">88</a> <strong class="jxr_keyword">this</strong>.rdfDataSet = Objects.requireNonNull(rdfDataSet); <a class="jxr_linenumber" name="L89" href="#L89">89</a> <strong class="jxr_keyword">this</strong>.bnodePrefix = Objects.requireNonNull(bnodePrefix); <a class="jxr_linenumber" name="L90" href="#L90">90</a> <strong class="jxr_keyword">this</strong>.factory = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdRDF.html">JsonLdRDF</a>(bnodePrefix); <a class="jxr_linenumber" name="L91" href="#L91">91</a> } <a class="jxr_linenumber" name="L92" href="#L92">92</a> -<a class="jxr_linenumber" name="L93" href="#L93">93</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdGraphLike.html">AbstractJsonLdGraphLike</a>(String bnodePrefix) { +<a class="jxr_linenumber" name="L93" href="#L93">93</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdGraphLike.html">AbstractJsonLdGraphLike</a>(<strong class="jxr_keyword">final</strong> String bnodePrefix) { <a class="jxr_linenumber" name="L94" href="#L94">94</a> <strong class="jxr_keyword">this</strong>(<strong class="jxr_keyword">new</strong> RDFDataset(), bnodePrefix); <a class="jxr_linenumber" name="L95" href="#L95">95</a> } <a class="jxr_linenumber" name="L96" href="#L96">96</a> <a class="jxr_linenumber" name="L97" href="#L97">97</a> @Override -<a class="jxr_linenumber" name="L98" href="#L98">98</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> add(T t) { +<a class="jxr_linenumber" name="L98" href="#L98">98</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> add(<strong class="jxr_keyword">final</strong> T t) { <a class="jxr_linenumber" name="L99" href="#L99">99</a> <em class="jxr_comment">// add triples to default graph by default</em> <a class="jxr_linenumber" name="L100" href="#L100">100</a> <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> graphName = <strong class="jxr_keyword">null</strong>; <a class="jxr_linenumber" name="L101" href="#L101">101</a> <strong class="jxr_keyword">if</strong> (t instanceof org.apache.commons.rdf.api.Quad) { -<a class="jxr_linenumber" name="L102" href="#L102">102</a> org.apache.commons.rdf.api.Quad q = (org.apache.commons.rdf.api.Quad) t; +<a class="jxr_linenumber" name="L102" href="#L102">102</a> <strong class="jxr_keyword">final</strong> org.apache.commons.rdf.api.Quad q = (org.apache.commons.rdf.api.Quad) t; <a class="jxr_linenumber" name="L103" href="#L103">103</a> graphName = q.getGraphName().orElse(<strong class="jxr_keyword">null</strong>); <a class="jxr_linenumber" name="L104" href="#L104">104</a> } <a class="jxr_linenumber" name="L105" href="#L105">105</a> <em class="jxr_comment">// FIXME: JSON-LD's rdfDataSet.addQuad method does not support</em> @@ -115,17 +115,17 @@ <a class="jxr_linenumber" name="L107" href="#L107">107</a> add(graphName, (BlankNodeOrIRI) t.getSubject(), (IRI) t.getPredicate(), t.getObject()); <a class="jxr_linenumber" name="L108" href="#L108">108</a> } <a class="jxr_linenumber" name="L109" href="#L109">109</a> -<a class="jxr_linenumber" name="L110" href="#L110">110</a> <strong class="jxr_keyword">void</strong> add(<a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> graphName, <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { -<a class="jxr_linenumber" name="L111" href="#L111">111</a> String g = factory.asJsonLdString(graphName); -<a class="jxr_linenumber" name="L112" href="#L112">112</a> String s = factory.asJsonLdString(subject); -<a class="jxr_linenumber" name="L113" href="#L113">113</a> String p = factory.asJsonLdString(predicate); +<a class="jxr_linenumber" name="L110" href="#L110">110</a> <strong class="jxr_keyword">void</strong> add(<strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> graphName, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { +<a class="jxr_linenumber" name="L111" href="#L111">111</a> <strong class="jxr_keyword">final</strong> String g = factory.asJsonLdString(graphName); +<a class="jxr_linenumber" name="L112" href="#L112">112</a> <strong class="jxr_keyword">final</strong> String s = factory.asJsonLdString(subject); +<a class="jxr_linenumber" name="L113" href="#L113">113</a> <strong class="jxr_keyword">final</strong> String p = factory.asJsonLdString(predicate); <a class="jxr_linenumber" name="L114" href="#L114">114</a> <strong class="jxr_keyword">if</strong> (object instanceof BlankNodeOrIRI) { -<a class="jxr_linenumber" name="L115" href="#L115">115</a> String o = factory.asJsonLdString((BlankNodeOrIRI) object); +<a class="jxr_linenumber" name="L115" href="#L115">115</a> <strong class="jxr_keyword">final</strong> String o = factory.asJsonLdString((BlankNodeOrIRI) object); <a class="jxr_linenumber" name="L116" href="#L116">116</a> rdfDataSet.addQuad(s, p, o, g); <a class="jxr_linenumber" name="L117" href="#L117">117</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (object instanceof Literal) { -<a class="jxr_linenumber" name="L118" href="#L118">118</a> <a href="../../../../../org/apache/commons/rdf/api/Literal.html">Literal</a> literal = (Literal) object; -<a class="jxr_linenumber" name="L119" href="#L119">119</a> String language = literal.getLanguageTag().orElse(<strong class="jxr_keyword">null</strong>); -<a class="jxr_linenumber" name="L120" href="#L120">120</a> String datatype = literal.getDatatype().getIRIString(); +<a class="jxr_linenumber" name="L118" href="#L118">118</a> <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/Literal.html">Literal</a> literal = (Literal) object; +<a class="jxr_linenumber" name="L119" href="#L119">119</a> <strong class="jxr_keyword">final</strong> String language = literal.getLanguageTag().orElse(<strong class="jxr_keyword">null</strong>); +<a class="jxr_linenumber" name="L120" href="#L120">120</a> <strong class="jxr_keyword">final</strong> String datatype = literal.getDatatype().getIRIString(); <a class="jxr_linenumber" name="L121" href="#L121">121</a> rdfDataSet.addQuad(s, p, literal.getLexicalForm(), datatype, language, g); <a class="jxr_linenumber" name="L122" href="#L122">122</a> } <a class="jxr_linenumber" name="L123" href="#L123">123</a> } @@ -147,86 +147,87 @@ <a class="jxr_linenumber" name="L139" href="#L139">139</a> } <a class="jxr_linenumber" name="L140" href="#L140">140</a> <a class="jxr_linenumber" name="L141" href="#L141">141</a> @Override -<a class="jxr_linenumber" name="L142" href="#L142">142</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> contains(T tripleOrQuad) { +<a class="jxr_linenumber" name="L142" href="#L142">142</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> contains(<strong class="jxr_keyword">final</strong> T tripleOrQuad) { <a class="jxr_linenumber" name="L143" href="#L143">143</a> <strong class="jxr_keyword">return</strong> stream().anyMatch(Predicate.isEqual(tripleOrQuad)); <a class="jxr_linenumber" name="L144" href="#L144">144</a> } <a class="jxr_linenumber" name="L145" href="#L145">145</a> -<a class="jxr_linenumber" name="L146" href="#L146">146</a> <strong class="jxr_keyword">public</strong> RDFDataset getRdfDataSet() { -<a class="jxr_linenumber" name="L147" href="#L147">147</a> <strong class="jxr_keyword">return</strong> rdfDataSet; -<a class="jxr_linenumber" name="L148" href="#L148">148</a> } -<a class="jxr_linenumber" name="L149" href="#L149">149</a> -<a class="jxr_linenumber" name="L150" href="#L150">150</a> @Override -<a class="jxr_linenumber" name="L151" href="#L151">151</a> <strong class="jxr_keyword">public</strong> Stream<? <strong class="jxr_keyword">extends</strong> T> stream() { -<a class="jxr_linenumber" name="L152" href="#L152">152</a> <strong class="jxr_keyword">return</strong> rdfDataSet.graphNames().parallelStream().map(rdfDataSet::getQuads) -<a class="jxr_linenumber" name="L153" href="#L153">153</a> .flatMap(List<RDFDataset.Quad>::parallelStream).map(<strong class="jxr_keyword">this</strong>::asTripleOrQuad); -<a class="jxr_linenumber" name="L154" href="#L154">154</a> } -<a class="jxr_linenumber" name="L155" href="#L155">155</a> -<a class="jxr_linenumber" name="L156" href="#L156">156</a> <em class="jxr_javadoccomment">/**</em> -<a class="jxr_linenumber" name="L157" href="#L157">157</a> <em class="jxr_javadoccomment"> * Convert JsonLd Quad to a Commons RDF {@link Triple} or</em> -<a class="jxr_linenumber" name="L158" href="#L158">158</a> <em class="jxr_javadoccomment"> * {@link org.apache.commons.rdf.api.Quad}</em> -<a class="jxr_linenumber" name="L159" href="#L159">159</a> <em class="jxr_javadoccomment"> * </em> +<a class="jxr_linenumber" name="L146" href="#L146">146</a> @Override +<a class="jxr_linenumber" name="L147" href="#L147">147</a> <strong class="jxr_keyword">public</strong> RDFDataset getRdfDataSet() { +<a class="jxr_linenumber" name="L148" href="#L148">148</a> <strong class="jxr_keyword">return</strong> rdfDataSet; +<a class="jxr_linenumber" name="L149" href="#L149">149</a> } +<a class="jxr_linenumber" name="L150" href="#L150">150</a> +<a class="jxr_linenumber" name="L151" href="#L151">151</a> @Override +<a class="jxr_linenumber" name="L152" href="#L152">152</a> <strong class="jxr_keyword">public</strong> Stream<? <strong class="jxr_keyword">extends</strong> T> stream() { +<a class="jxr_linenumber" name="L153" href="#L153">153</a> <strong class="jxr_keyword">return</strong> rdfDataSet.graphNames().parallelStream().map(rdfDataSet::getQuads) +<a class="jxr_linenumber" name="L154" href="#L154">154</a> .flatMap(List<RDFDataset.Quad>::parallelStream).map(<strong class="jxr_keyword">this</strong>::asTripleOrQuad); +<a class="jxr_linenumber" name="L155" href="#L155">155</a> } +<a class="jxr_linenumber" name="L156" href="#L156">156</a> +<a class="jxr_linenumber" name="L157" href="#L157">157</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L158" href="#L158">158</a> <em class="jxr_javadoccomment"> * Convert JsonLd Quad to a Commons RDF {@link Triple} or</em> +<a class="jxr_linenumber" name="L159" href="#L159">159</a> <em class="jxr_javadoccomment"> * {@link org.apache.commons.rdf.api.Quad}</em> <a class="jxr_linenumber" name="L160" href="#L160">160</a> <em class="jxr_javadoccomment"> * </em> -<a class="jxr_linenumber" name="L161" href="#L161">161</a> <em class="jxr_javadoccomment"> * @see JsonLdRDF#asTriple(Quad)</em> -<a class="jxr_linenumber" name="L162" href="#L162">162</a> <em class="jxr_javadoccomment"> * @see JsonLdRDF#asQuad(Quad)</em> -<a class="jxr_linenumber" name="L163" href="#L163">163</a> <em class="jxr_javadoccomment"> * @param jsonldQuad</em> -<a class="jxr_linenumber" name="L164" href="#L164">164</a> <em class="jxr_javadoccomment"> * jsonld quad to convert</em> -<a class="jxr_linenumber" name="L165" href="#L165">165</a> <em class="jxr_javadoccomment"> * @return converted {@link TripleLike}</em> -<a class="jxr_linenumber" name="L166" href="#L166">166</a> <em class="jxr_javadoccomment"> */</em> -<a class="jxr_linenumber" name="L167" href="#L167">167</a> <strong class="jxr_keyword">abstract</strong> T asTripleOrQuad(RDFDataset.Quad jsonldQuad); -<a class="jxr_linenumber" name="L168" href="#L168">168</a> -<a class="jxr_linenumber" name="L169" href="#L169">169</a> <em class="jxr_comment">// This will be made public in JsonLdDataset</em> -<a class="jxr_linenumber" name="L170" href="#L170">170</a> <em class="jxr_comment">// and is used by the other methods.</em> -<a class="jxr_linenumber" name="L171" href="#L171">171</a> <strong class="jxr_keyword">boolean</strong> contains(Optional<BlankNodeOrIRI> graphName, <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> s, <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> p, <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> o) { -<a class="jxr_linenumber" name="L172" href="#L172">172</a> <strong class="jxr_keyword">return</strong> filteredGraphs(graphName).flatMap(List::stream).anyMatch(quadFilter(s, p, o)); -<a class="jxr_linenumber" name="L173" href="#L173">173</a> } -<a class="jxr_linenumber" name="L174" href="#L174">174</a> -<a class="jxr_linenumber" name="L175" href="#L175">175</a> Stream<List<RDFDataset.Quad>> filteredGraphs(Optional<BlankNodeOrIRI> graphName) { -<a class="jxr_linenumber" name="L176" href="#L176">176</a> <strong class="jxr_keyword">return</strong> rdfDataSet.graphNames().parallelStream() -<a class="jxr_linenumber" name="L177" href="#L177">177</a> <em class="jxr_comment">// if graphName == null (wildcard), select all graphs,</em> -<a class="jxr_linenumber" name="L178" href="#L178">178</a> <em class="jxr_comment">// otherwise check its jsonld string</em> -<a class="jxr_linenumber" name="L179" href="#L179">179</a> <em class="jxr_comment">// (including @default for default graph)</em> -<a class="jxr_linenumber" name="L180" href="#L180">180</a> .filter(g -> graphName == <strong class="jxr_keyword">null</strong> || g.equals(graphName.map(factory::asJsonLdString).orElse(<span class="jxr_string">"@default"</span>))) -<a class="jxr_linenumber" name="L181" href="#L181">181</a> <em class="jxr_comment">// remove the quads which match our filter (which could have</em> -<a class="jxr_linenumber" name="L182" href="#L182">182</a> <em class="jxr_comment">// nulls as wildcards)</em> -<a class="jxr_linenumber" name="L183" href="#L183">183</a> .map(rdfDataSet::getQuads); -<a class="jxr_linenumber" name="L184" href="#L184">184</a> } -<a class="jxr_linenumber" name="L185" href="#L185">185</a> -<a class="jxr_linenumber" name="L186" href="#L186">186</a> String graphNameAsJsonLdString(T tripleOrQuad) { -<a class="jxr_linenumber" name="L187" href="#L187">187</a> <strong class="jxr_keyword">if</strong> (tripleOrQuad instanceof org.apache.commons.rdf.api.Quad) { -<a class="jxr_linenumber" name="L188" href="#L188">188</a> org.apache.commons.rdf.api.Quad quad = (org.apache.commons.rdf.api.Quad) tripleOrQuad; -<a class="jxr_linenumber" name="L189" href="#L189">189</a> <strong class="jxr_keyword">return</strong> quad.getGraphName().map(factory::asJsonLdString).orElse(<span class="jxr_string">"@default"</span>); -<a class="jxr_linenumber" name="L190" href="#L190">190</a> } -<a class="jxr_linenumber" name="L191" href="#L191">191</a> <strong class="jxr_keyword">return</strong> <span class="jxr_string">"@default"</span>; -<a class="jxr_linenumber" name="L192" href="#L192">192</a> } -<a class="jxr_linenumber" name="L193" href="#L193">193</a> -<a class="jxr_linenumber" name="L194" href="#L194">194</a> Predicate<RDFDataset.Quad> quadFilter(<a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { -<a class="jxr_linenumber" name="L195" href="#L195">195</a> Optional<Node> subjectNode = Optional.ofNullable(subject).map(factory::asJsonLdNode); -<a class="jxr_linenumber" name="L196" href="#L196">196</a> Optional<Node> predicateNode = Optional.ofNullable(predicate).map(factory::asJsonLdNode); -<a class="jxr_linenumber" name="L197" href="#L197">197</a> Optional<Node> objectNode = Optional.ofNullable(object).map(factory::asJsonLdNode); -<a class="jxr_linenumber" name="L198" href="#L198">198</a> -<a class="jxr_linenumber" name="L199" href="#L199">199</a> <strong class="jxr_keyword">return</strong> q -> { -<a class="jxr_linenumber" name="L200" href="#L200">200</a> <strong class="jxr_keyword">if</strong> (subjectNode.isPresent() && subjectNode.get().compareTo(q.getSubject()) != 0) { -<a class="jxr_linenumber" name="L201" href="#L201">201</a> <strong class="jxr_keyword">return</strong> false; -<a class="jxr_linenumber" name="L202" href="#L202">202</a> } -<a class="jxr_linenumber" name="L203" href="#L203">203</a> <strong class="jxr_keyword">if</strong> (predicateNode.isPresent() && predicateNode.get().compareTo(q.getPredicate()) != 0) { -<a class="jxr_linenumber" name="L204" href="#L204">204</a> <strong class="jxr_keyword">return</strong> false; -<a class="jxr_linenumber" name="L205" href="#L205">205</a> } -<a class="jxr_linenumber" name="L206" href="#L206">206</a> <strong class="jxr_keyword">if</strong> (objectNode.isPresent() && objectNode.get().compareTo(q.getObject()) != 0) { -<a class="jxr_linenumber" name="L207" href="#L207">207</a> <strong class="jxr_keyword">return</strong> false; -<a class="jxr_linenumber" name="L208" href="#L208">208</a> } -<a class="jxr_linenumber" name="L209" href="#L209">209</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>; -<a class="jxr_linenumber" name="L210" href="#L210">210</a> }; -<a class="jxr_linenumber" name="L211" href="#L211">211</a> } -<a class="jxr_linenumber" name="L212" href="#L212">212</a> -<a class="jxr_linenumber" name="L213" href="#L213">213</a> <em class="jxr_comment">// NOTE: This is made public in JsonLdDataset and is used by the other</em> -<a class="jxr_linenumber" name="L214" href="#L214">214</a> <em class="jxr_comment">// remove methods.</em> -<a class="jxr_linenumber" name="L215" href="#L215">215</a> <strong class="jxr_keyword">void</strong> remove(Optional<BlankNodeOrIRI> graphName, <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { -<a class="jxr_linenumber" name="L216" href="#L216">216</a> <em class="jxr_comment">// remove the quads which match our filter (which could have nulls as</em> -<a class="jxr_linenumber" name="L217" href="#L217">217</a> <em class="jxr_comment">// wildcards)</em> -<a class="jxr_linenumber" name="L218" href="#L218">218</a> filteredGraphs(graphName).forEach(t -> t.removeIf(quadFilter(subject, predicate, object))); -<a class="jxr_linenumber" name="L219" href="#L219">219</a> } -<a class="jxr_linenumber" name="L220" href="#L220">220</a> -<a class="jxr_linenumber" name="L221" href="#L221">221</a> } +<a class="jxr_linenumber" name="L161" href="#L161">161</a> <em class="jxr_javadoccomment"> * </em> +<a class="jxr_linenumber" name="L162" href="#L162">162</a> <em class="jxr_javadoccomment"> * @see JsonLdRDF#asTriple(Quad)</em> +<a class="jxr_linenumber" name="L163" href="#L163">163</a> <em class="jxr_javadoccomment"> * @see JsonLdRDF#asQuad(Quad)</em> +<a class="jxr_linenumber" name="L164" href="#L164">164</a> <em class="jxr_javadoccomment"> * @param jsonldQuad</em> +<a class="jxr_linenumber" name="L165" href="#L165">165</a> <em class="jxr_javadoccomment"> * jsonld quad to convert</em> +<a class="jxr_linenumber" name="L166" href="#L166">166</a> <em class="jxr_javadoccomment"> * @return converted {@link TripleLike}</em> +<a class="jxr_linenumber" name="L167" href="#L167">167</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L168" href="#L168">168</a> <strong class="jxr_keyword">abstract</strong> T asTripleOrQuad(RDFDataset.Quad jsonldQuad); +<a class="jxr_linenumber" name="L169" href="#L169">169</a> +<a class="jxr_linenumber" name="L170" href="#L170">170</a> <em class="jxr_comment">// This will be made public in JsonLdDataset</em> +<a class="jxr_linenumber" name="L171" href="#L171">171</a> <em class="jxr_comment">// and is used by the other methods.</em> +<a class="jxr_linenumber" name="L172" href="#L172">172</a> <strong class="jxr_keyword">boolean</strong> contains(<strong class="jxr_keyword">final</strong> Optional<BlankNodeOrIRI> graphName, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> s, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> p, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> o) { +<a class="jxr_linenumber" name="L173" href="#L173">173</a> <strong class="jxr_keyword">return</strong> filteredGraphs(graphName).flatMap(List::stream).anyMatch(quadFilter(s, p, o)); +<a class="jxr_linenumber" name="L174" href="#L174">174</a> } +<a class="jxr_linenumber" name="L175" href="#L175">175</a> +<a class="jxr_linenumber" name="L176" href="#L176">176</a> Stream<List<RDFDataset.Quad>> filteredGraphs(<strong class="jxr_keyword">final</strong> Optional<BlankNodeOrIRI> graphName) { +<a class="jxr_linenumber" name="L177" href="#L177">177</a> <strong class="jxr_keyword">return</strong> rdfDataSet.graphNames().parallelStream() +<a class="jxr_linenumber" name="L178" href="#L178">178</a> <em class="jxr_comment">// if graphName == null (wildcard), select all graphs,</em> +<a class="jxr_linenumber" name="L179" href="#L179">179</a> <em class="jxr_comment">// otherwise check its jsonld string</em> +<a class="jxr_linenumber" name="L180" href="#L180">180</a> <em class="jxr_comment">// (including @default for default graph)</em> +<a class="jxr_linenumber" name="L181" href="#L181">181</a> .filter(g -> graphName == <strong class="jxr_keyword">null</strong> || g.equals(graphName.map(factory::asJsonLdString).orElse(<span class="jxr_string">"@default"</span>))) +<a class="jxr_linenumber" name="L182" href="#L182">182</a> <em class="jxr_comment">// remove the quads which match our filter (which could have</em> +<a class="jxr_linenumber" name="L183" href="#L183">183</a> <em class="jxr_comment">// nulls as wildcards)</em> +<a class="jxr_linenumber" name="L184" href="#L184">184</a> .map(rdfDataSet::getQuads); +<a class="jxr_linenumber" name="L185" href="#L185">185</a> } +<a class="jxr_linenumber" name="L186" href="#L186">186</a> +<a class="jxr_linenumber" name="L187" href="#L187">187</a> String graphNameAsJsonLdString(<strong class="jxr_keyword">final</strong> T tripleOrQuad) { +<a class="jxr_linenumber" name="L188" href="#L188">188</a> <strong class="jxr_keyword">if</strong> (tripleOrQuad instanceof org.apache.commons.rdf.api.Quad) { +<a class="jxr_linenumber" name="L189" href="#L189">189</a> <strong class="jxr_keyword">final</strong> org.apache.commons.rdf.api.Quad quad = (org.apache.commons.rdf.api.Quad) tripleOrQuad; +<a class="jxr_linenumber" name="L190" href="#L190">190</a> <strong class="jxr_keyword">return</strong> quad.getGraphName().map(factory::asJsonLdString).orElse(<span class="jxr_string">"@default"</span>); +<a class="jxr_linenumber" name="L191" href="#L191">191</a> } +<a class="jxr_linenumber" name="L192" href="#L192">192</a> <strong class="jxr_keyword">return</strong> <span class="jxr_string">"@default"</span>; +<a class="jxr_linenumber" name="L193" href="#L193">193</a> } +<a class="jxr_linenumber" name="L194" href="#L194">194</a> +<a class="jxr_linenumber" name="L195" href="#L195">195</a> Predicate<RDFDataset.Quad> quadFilter(<strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { +<a class="jxr_linenumber" name="L196" href="#L196">196</a> <strong class="jxr_keyword">final</strong> Optional<Node> subjectNode = Optional.ofNullable(subject).map(factory::asJsonLdNode); +<a class="jxr_linenumber" name="L197" href="#L197">197</a> <strong class="jxr_keyword">final</strong> Optional<Node> predicateNode = Optional.ofNullable(predicate).map(factory::asJsonLdNode); +<a class="jxr_linenumber" name="L198" href="#L198">198</a> <strong class="jxr_keyword">final</strong> Optional<Node> objectNode = Optional.ofNullable(object).map(factory::asJsonLdNode); +<a class="jxr_linenumber" name="L199" href="#L199">199</a> +<a class="jxr_linenumber" name="L200" href="#L200">200</a> <strong class="jxr_keyword">return</strong> q -> { +<a class="jxr_linenumber" name="L201" href="#L201">201</a> <strong class="jxr_keyword">if</strong> (subjectNode.isPresent() && subjectNode.get().compareTo(q.getSubject()) != 0) { +<a class="jxr_linenumber" name="L202" href="#L202">202</a> <strong class="jxr_keyword">return</strong> false; +<a class="jxr_linenumber" name="L203" href="#L203">203</a> } +<a class="jxr_linenumber" name="L204" href="#L204">204</a> <strong class="jxr_keyword">if</strong> (predicateNode.isPresent() && predicateNode.get().compareTo(q.getPredicate()) != 0) { +<a class="jxr_linenumber" name="L205" href="#L205">205</a> <strong class="jxr_keyword">return</strong> false; +<a class="jxr_linenumber" name="L206" href="#L206">206</a> } +<a class="jxr_linenumber" name="L207" href="#L207">207</a> <strong class="jxr_keyword">if</strong> (objectNode.isPresent() && objectNode.get().compareTo(q.getObject()) != 0) { +<a class="jxr_linenumber" name="L208" href="#L208">208</a> <strong class="jxr_keyword">return</strong> false; +<a class="jxr_linenumber" name="L209" href="#L209">209</a> } +<a class="jxr_linenumber" name="L210" href="#L210">210</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>; +<a class="jxr_linenumber" name="L211" href="#L211">211</a> }; +<a class="jxr_linenumber" name="L212" href="#L212">212</a> } +<a class="jxr_linenumber" name="L213" href="#L213">213</a> +<a class="jxr_linenumber" name="L214" href="#L214">214</a> <em class="jxr_comment">// NOTE: This is made public in JsonLdDataset and is used by the other</em> +<a class="jxr_linenumber" name="L215" href="#L215">215</a> <em class="jxr_comment">// remove methods.</em> +<a class="jxr_linenumber" name="L216" href="#L216">216</a> <strong class="jxr_keyword">void</strong> remove(<strong class="jxr_keyword">final</strong> Optional<BlankNodeOrIRI> graphName, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/BlankNodeOrIRI.html">BlankNodeOrIRI</a> subject, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> predicate, <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/RDFTerm.html">RDFTerm</a> object) { +<a class="jxr_linenumber" name="L217" href="#L217">217</a> <em class="jxr_comment">// remove the quads which match our filter (which could have nulls as</em> +<a class="jxr_linenumber" name="L218" href="#L218">218</a> <em class="jxr_comment">// wildcards)</em> +<a class="jxr_linenumber" name="L219" href="#L219">219</a> filteredGraphs(graphName).forEach(t -> t.removeIf(quadFilter(subject, predicate, object))); +<a class="jxr_linenumber" name="L220" href="#L220">220</a> } +<a class="jxr_linenumber" name="L221" href="#L221">221</a> +<a class="jxr_linenumber" name="L222" href="#L222">222</a> } </pre> <hr/> <div id="footer">Copyright © 2015–2016 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div> Modified: websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdIRI.html ============================================================================== --- websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdIRI.html (original) +++ websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdIRI.html Tue Nov 22 07:55:35 2016 @@ -35,14 +35,14 @@ <a class="jxr_linenumber" name="L27" href="#L27">27</a> <a class="jxr_linenumber" name="L28" href="#L28">28</a> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdIRI.html">JsonLdIRIImpl</a> <strong class="jxr_keyword">extends</strong> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdTerm.html">JsonLdTermImpl</a> <strong class="jxr_keyword">implements</strong> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdIRI.html">JsonLdIRI</a> { <a class="jxr_linenumber" name="L29" href="#L29">29</a> -<a class="jxr_linenumber" name="L30" href="#L30">30</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdIRI.html">JsonLdIRIImpl</a>(Node node) { +<a class="jxr_linenumber" name="L30" href="#L30">30</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdIRI.html">JsonLdIRIImpl</a>(<strong class="jxr_keyword">final</strong> Node node) { <a class="jxr_linenumber" name="L31" href="#L31">31</a> <strong class="jxr_keyword">super</strong>(node); <a class="jxr_linenumber" name="L32" href="#L32">32</a> <strong class="jxr_keyword">if</strong> (!node.isIRI()) { <a class="jxr_linenumber" name="L33" href="#L33">33</a> <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> IllegalArgumentException(<span class="jxr_string">"Node is not an IRI:"</span> + node); <a class="jxr_linenumber" name="L34" href="#L34">34</a> } <a class="jxr_linenumber" name="L35" href="#L35">35</a> } <a class="jxr_linenumber" name="L36" href="#L36">36</a> -<a class="jxr_linenumber" name="L37" href="#L37">37</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdIRI.html">JsonLdIRIImpl</a>(String iri) { +<a class="jxr_linenumber" name="L37" href="#L37">37</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdIRI.html">JsonLdIRIImpl</a>(<strong class="jxr_keyword">final</strong> String iri) { <a class="jxr_linenumber" name="L38" href="#L38">38</a> <strong class="jxr_keyword">super</strong>(<strong class="jxr_keyword">new</strong> RDFDataset.IRI(iri)); <a class="jxr_linenumber" name="L39" href="#L39">39</a> } <a class="jxr_linenumber" name="L40" href="#L40">40</a> @@ -62,11 +62,11 @@ <a class="jxr_linenumber" name="L54" href="#L54">54</a> } <a class="jxr_linenumber" name="L55" href="#L55">55</a> <a class="jxr_linenumber" name="L56" href="#L56">56</a> @Override -<a class="jxr_linenumber" name="L57" href="#L57">57</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> equals(Object obj) { +<a class="jxr_linenumber" name="L57" href="#L57">57</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> equals(<strong class="jxr_keyword">final</strong> Object obj) { <a class="jxr_linenumber" name="L58" href="#L58">58</a> <strong class="jxr_keyword">if</strong> (!(obj instanceof IRI)) { <a class="jxr_linenumber" name="L59" href="#L59">59</a> <strong class="jxr_keyword">return</strong> false; <a class="jxr_linenumber" name="L60" href="#L60">60</a> } -<a class="jxr_linenumber" name="L61" href="#L61">61</a> <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> other = (IRI) obj; +<a class="jxr_linenumber" name="L61" href="#L61">61</a> <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/IRI.html">IRI</a> other = (IRI) obj; <a class="jxr_linenumber" name="L62" href="#L62">62</a> <strong class="jxr_keyword">return</strong> node.getValue().equals(other.getIRIString()); <a class="jxr_linenumber" name="L63" href="#L63">63</a> } <a class="jxr_linenumber" name="L64" href="#L64">64</a> } Modified: websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdLiteral.html ============================================================================== --- websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdLiteral.html (original) +++ websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdLiteral.html Tue Nov 22 07:55:35 2016 @@ -39,7 +39,7 @@ <a class="jxr_linenumber" name="L31" href="#L31">31</a> <a class="jxr_linenumber" name="L32" href="#L32">32</a> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdLiteral.html">JsonLdLiteralImpl</a> <strong class="jxr_keyword">extends</strong> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdTerm.html">JsonLdTermImpl</a> <strong class="jxr_keyword">implements</strong> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdLiteral.html">JsonLdLiteral</a> { <a class="jxr_linenumber" name="L33" href="#L33">33</a> -<a class="jxr_linenumber" name="L34" href="#L34">34</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdLiteral.html">JsonLdLiteralImpl</a>(Node node) { +<a class="jxr_linenumber" name="L34" href="#L34">34</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdLiteral.html">JsonLdLiteralImpl</a>(<strong class="jxr_keyword">final</strong> Node node) { <a class="jxr_linenumber" name="L35" href="#L35">35</a> <strong class="jxr_keyword">super</strong>(node); <a class="jxr_linenumber" name="L36" href="#L36">36</a> <strong class="jxr_keyword">if</strong> (!node.isLiteral()) { <a class="jxr_linenumber" name="L37" href="#L37">37</a> <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> IllegalArgumentException(<span class="jxr_string">"Node is not a Literal:"</span> + node); @@ -48,7 +48,7 @@ <a class="jxr_linenumber" name="L40" href="#L40">40</a> <a class="jxr_linenumber" name="L41" href="#L41">41</a> @Override <a class="jxr_linenumber" name="L42" href="#L42">42</a> <strong class="jxr_keyword">public</strong> String ntriplesString() { -<a class="jxr_linenumber" name="L43" href="#L43">43</a> StringBuilder sb = <strong class="jxr_keyword">new</strong> StringBuilder(); +<a class="jxr_linenumber" name="L43" href="#L43">43</a> <strong class="jxr_keyword">final</strong> StringBuilder sb = <strong class="jxr_keyword">new</strong> StringBuilder(); <a class="jxr_linenumber" name="L44" href="#L44">44</a> sb.append('"'); <a class="jxr_linenumber" name="L45" href="#L45">45</a> <em class="jxr_comment">// Escape special characters</em> <a class="jxr_linenumber" name="L46" href="#L46">46</a> sb.append(getLexicalForm().replace(<span class="jxr_string">"\\"</span>, <span class="jxr_string">"\\\\"</span>). <em class="jxr_comment">// escaped to \\</em> @@ -90,13 +90,13 @@ <a class="jxr_linenumber" name="L82" href="#L82">82</a> } <a class="jxr_linenumber" name="L83" href="#L83">83</a> <a class="jxr_linenumber" name="L84" href="#L84">84</a> @Override -<a class="jxr_linenumber" name="L85" href="#L85">85</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> equals(Object obj) { +<a class="jxr_linenumber" name="L85" href="#L85">85</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> equals(<strong class="jxr_keyword">final</strong> Object obj) { <a class="jxr_linenumber" name="L86" href="#L86">86</a> <strong class="jxr_keyword">if</strong> (obj instanceof JsonLdLiteral) { -<a class="jxr_linenumber" name="L87" href="#L87">87</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdLiteral.html">JsonLdLiteral</a> other = (JsonLdLiteral) obj; +<a class="jxr_linenumber" name="L87" href="#L87">87</a> <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdLiteral.html">JsonLdLiteral</a> other = (JsonLdLiteral) obj; <a class="jxr_linenumber" name="L88" href="#L88">88</a> <strong class="jxr_keyword">return</strong> asJsonLdNode().compareTo(other.asJsonLdNode()) == 0; <a class="jxr_linenumber" name="L89" href="#L89">89</a> } <a class="jxr_linenumber" name="L90" href="#L90">90</a> <strong class="jxr_keyword">if</strong> (obj instanceof Literal) { -<a class="jxr_linenumber" name="L91" href="#L91">91</a> <a href="../../../../../org/apache/commons/rdf/api/Literal.html">Literal</a> other = (Literal) obj; +<a class="jxr_linenumber" name="L91" href="#L91">91</a> <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/rdf/api/Literal.html">Literal</a> other = (Literal) obj; <a class="jxr_linenumber" name="L92" href="#L92">92</a> <strong class="jxr_keyword">return</strong> getLexicalForm().equals(other.getLexicalForm()) && getDatatype().equals(other.getDatatype()) <a class="jxr_linenumber" name="L93" href="#L93">93</a> && getLanguageTag().equals(other.getLanguageTag()); <a class="jxr_linenumber" name="L94" href="#L94">94</a> } Modified: websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdQuad.html ============================================================================== --- websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdQuad.html (original) +++ websites/production/commonsrdf/content/xref/org/apache/commons/rdf/jsonldjava/JsonLdQuad.html Tue Nov 22 07:55:35 2016 @@ -39,19 +39,19 @@ <a class="jxr_linenumber" name="L31" href="#L31">31</a> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdQuad.html">JsonLdQuadImpl</a> <strong class="jxr_keyword">extends</strong> JsonLdQuadLikeImpl<BlankNodeOrIRI, IRI, RDFTerm, BlankNodeOrIRI> <a class="jxr_linenumber" name="L32" href="#L32">32</a> <strong class="jxr_keyword">implements</strong> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdQuad.html">JsonLdQuad</a> { <a class="jxr_linenumber" name="L33" href="#L33">33</a> -<a class="jxr_linenumber" name="L34" href="#L34">34</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdQuad.html">JsonLdQuadImpl</a>(com.github.jsonldjava.core.RDFDataset.Quad quad, String blankNodePrefix) { +<a class="jxr_linenumber" name="L34" href="#L34">34</a> <a href="../../../../../org/apache/commons/rdf/jsonldjava/JsonLdQuad.html">JsonLdQuadImpl</a>(<strong class="jxr_keyword">final</strong> com.github.jsonldjava.core.RDFDataset.Quad quad, <strong class="jxr_keyword">final</strong> String blankNodePrefix) { <a class="jxr_linenumber" name="L35" href="#L35">35</a> <strong class="jxr_keyword">super</strong>(quad, blankNodePrefix); <a class="jxr_linenumber" name="L36" href="#L36">36</a> } <a class="jxr_linenumber" name="L37" href="#L37">37</a> <a class="jxr_linenumber" name="L38" href="#L38">38</a> @Override -<a class="jxr_linenumber" name="L39" href="#L39">39</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> equals(Object obj) { +<a class="jxr_linenumber" name="L39" href="#L39">39</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> equals(<strong class="jxr_keyword">final</strong> Object obj) { <a class="jxr_linenumber" name="L40" href="#L40">40</a> <strong class="jxr_keyword">if</strong> (obj == <strong class="jxr_keyword">this</strong>) { <a class="jxr_linenumber" name="L41" href="#L41">41</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>; <a class="jxr_linenumber" name="L42" href="#L42">42</a> } <a class="jxr_linenumber" name="L43" href="#L43">43</a> <strong class="jxr_keyword">if</strong> (!(obj instanceof org.apache.commons.rdf.api.Quad)) { <a class="jxr_linenumber" name="L44" href="#L44">44</a> <strong class="jxr_keyword">return</strong> false; <a class="jxr_linenumber" name="L45" href="#L45">45</a> } -<a class="jxr_linenumber" name="L46" href="#L46">46</a> org.apache.commons.rdf.api.Quad other = (org.apache.commons.rdf.api.Quad) obj; +<a class="jxr_linenumber" name="L46" href="#L46">46</a> <strong class="jxr_keyword">final</strong> org.apache.commons.rdf.api.Quad other = (org.apache.commons.rdf.api.Quad) obj; <a class="jxr_linenumber" name="L47" href="#L47">47</a> <strong class="jxr_keyword">return</strong> getGraphName().equals(other.getGraphName()) && getSubject().equals(other.getSubject()) <a class="jxr_linenumber" name="L48" href="#L48">48</a> && getPredicate().equals(other.getPredicate()) && getObject().equals(other.getObject()); <a class="jxr_linenumber" name="L49" href="#L49">49</a> }